Linux deployment Java and Tomcat operating environment
1, upload the downloaded JDK rpm package and Tomcat's tar package, I put in the/opt directory, the file directly to the official website to download.
2, if you have previously installed other versions of the JDK, it is better to rpm-e package_name now, and then directly execute the installation command
RPM-IVH jdk-8u162-linux-x64.rpm
After waiting for installation to complete, the default is to install to the/usr/java directory, perform java-version to see if the installation is successful
3, RPM installation should not need to match environment variables, if not effective manually configure the Vi/etc/profile after adding the following content
Export java_home=/usr/java/jdk1.8.0_162
Export jre_home=/usr/java/jdk1.8.0_162
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar: $CLASSPATH
Export path= $JAVA _home/bin: $PATH
4, Tomcat I put directly into the current directory, directly decompression
TAR-ZXVF apache-tomcat-8.0.23.tar.gz
5, go to the/opt/apache-tomcat-8.0.23/bin directory to start the Tomcat service, found no permissions
chmod 777 *.sh
And then start
./catalina.sh Start
6, from the outside to visit Tomcat found that the Tomcat process is normal, systemctl status Firewalld; Check that the firewall is on and the firewall is blocking it.
/sbin/iptables-i input-p TCP--dport 8080-j ACCEPT open firewall 8080 port
Service Iptables Save #保存防火墙规则
Service iptables Restart #重置防火墙规则
Or simply rude, you shut down the firewall ....
Re-visit, everything is fine, wait for a bag to try
Linux deployment Java and Tomcat operating environment