First, Java
1, clean the system's own JDK
View the Java JDK with the system
Rpm-qa | grep JDK
Uninstall command
sudo yum remove JDK name
2. Installation
sudo rpm-ivh jdk-8u161-linux-x64.rpm
(default installation path/usr/java/jdk1.8.0_161)
3. Configure Environment variables
Vim/etc/profile
Add to:
1 export java_home=/usr/java/jdk1.8.0_161 2 export classpath=.: $JAVA _home/jre/lib/rt.jar: $JAVA _home/lib/dt.jar: $JAVA _home/lib /tools.jar 3 export Maven_home=/developer/apache-maven-3.5 . 2 4 export catalina_home=/developer/apache-tomcat- 7.0 . 85 5 Export path= $JAVA _home/bin: $MAVEN _home/bin: $PATH
Note: The above is an environment variable configuration for all installations
Save exit, via Vim's ": Wq" command
Make the configuration effective Source/etc/profile
4. Verify that the installation is successful
JDK Validation Java-version
Second, Tomcat
1. Download
wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.85/bin/apache-tomcat-7.0.85.tar.gz
2, Decompression: TAR-ZXVF apache-maven-3.5.2-bin.tar.gz
3, environmental configuration as above
PS: ${catalina_home} stands for your own installation path
Not necessarily port 8080, you specify the port to use
Tomcat decompression can be used
Save exit, via Vim's ": Wq" command
Make the configuration effective source/etc/profile
Third, Maven
Download: wget/http//....... .... .......
Decompression: TAR-ZXVF XXXXXXX
Configure environment variables: as above.
Save exit, via Vim's ": Wq" command
Make the configuration effective source/etc/profile
Verification: Mvn-version
Linux--java+tomcat+maven Installation