Linux builds java web environment

1. Install JDK

(1) Download Jdk linux version from the official website

(2) Create a folder [mkdir java] in the usr directory, and upload the jdk download package to this folder [flashfxp can be used]

(3) Unzip the download package [ tar -xzvf  package name]

(4) Configuration file, enter the profile file in the etc directory to edit [vi /etc/profile, enter i, enter the editing mode, enter the information after entering: wq! That is, save and exit, pay attention to enter the installation path]

              export JAVA_HOME=/usr/local/java/jdk1.8.0_131

      export JRE_HOME=/usr/local/java/jdk1.8.0_131/jre
      export PATH=$PATH:/usr/local/java/jdk1.8.0_131/bin
      export CLASSPATH=./:/usr/local/java/jdk1.8.0_131/lib:/usr/local/java/jdk1.8.0_131/jre/lib
(5) Make the configuration take effect [source /etc/profile]

(6) Whether the test is successful [java -version detects version information javac displays compilation information]

2. Install TOMCAT

(1) Download the tomcat installation package from the official website

(2) Unzip the installation package, pay attention to turn off the Linux firewall

(3) Start tomcat, enter the bin directory of tomcat, ./startup.sh 


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325647344&siteId=291194637