installation of JDK1.8
First step: Download JDK1.8
1. Baidu Search jdk1.8, open the search result item belonging to Oracle official website
2. Click the Accept Protocol option, then select the 64-bit Linux version jdk you want to download, and click Download directly from the browser.
As shown:
or right-click the copy link and download the JDK installation package via the wget command, assuming we want to place the installation package under the/usr/local path:
Step Two: Unzip the JDK1.8 compression pack
Here found a point, if it is the wget way to download the JDK package, due to the reason of authentication, decompression will fail, had to delete. I downloaded it through a browser and then uploaded it here.
Upload a browser-downloaded JDK package
Decompression by command: TAR-ZXVF jdk-8u181-linux-x64.tar.gz
Extracted directory: jdk1.8.0_181, which is the JDK file
Step three, modify environment variables
Let's finally configure the Java environment variables
Vim/etc/profile
Use the Vim editor to edit the profile and add content at the end of the file (press "I" to edit):
Export java_home=/usr/local/jdk1.8.0_181
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib: $CLASSPATH
Export Java_path=${java_home}/bin:${jre_home}/bin
Export path= $PATH: ${java_path}
:
Then, save and Exit (by: wq!)
After saving, we also need to make this environment variable configuration information in effect.
The profile file takes effect immediately by command Source/etc/profile
Fourth step, test whether the installation is successful
①, command not found error is not present with JAVAC commands
②, using Java-version, there is version information such as Java version "1.8.0_xxx".
To this, the JDK installation is complete.
Installation of TOMCAT8
First step: Download Tomcat8
1. Baidu Search Tomcat8, open a search result item belonging to Apache official website
2. Find the TOMCAT8 entry on the left side of the page
3. Locate the 8.0 Linux version, click the left mouse button to download directly from the browser, or right-click the copy link to download via the wget command, as shown in:
2. Unzip the TOMCAT8 compression pack
Download directly after decompression, get apache-tomcat-8.0.53
For brevity, I rename this here to Tomcat8, as
Here, Tomcat is installed. In fact, is to download the compressed package, decompression on the line, super simple. Unlike the JDK, the environment variables need to be further configured after decompression.
3. Start Tomcat
./tomcat8/bin/startup.sh
4. Firewall port
The outside machine was unable to access Tomcat because the firewall did not open the Tomcat-configured port 8080
Tomcat configuration of the port, requires a firewall open, in order to save trouble, you can directly shut down the firewall.
linux Close firewall:
< Span style= "color: #333333; Font-family:tahoma, song body; font-size:14px; Text-align:justify ">systemctl stop firewalld.service #停止firewall
systemctl Disable Firewalld.service #禁止firewall开机启动
firewall-cmd "-- State #查看默认防火墙状态 (display notrunning after turn off, running on after opening)
This allows the external machine to have normal access to the Tomcat server that was just deployed.
Linux installation jdk.18 and TOMCAT8