Step 1: Extract Tomcat
Command:
Unzip Apache-tomcat-8.5.20.zip
Step 2: Move Tomcat under "/usr/local/src/java/tomcat8.5" and rename
Command:
MV apache-tomcat-8.5.20/usr/local/src/java/tomcat8.5
Step 3: Grant execution permissions, because there is no configuration environment variables, so only in the corresponding Bin directory operation, the following command first line only need to be executed at the time of installation, see "Tomcat started", that is, the boot success.
Command:
chmod u+x *.sh
./startup.sh
Step 4: Configure the Firewall
Command:
Vim/etc/sysconfig/iptables
To add a corresponding port to the configuration file:
-A input-m state--state new-m tcp-p TCP--dport 8080-j ACCEPT
Note: If the row location is the same, the other computers will not be able to access, which is equivalent to an invalid configuration, detected as:
To turn off the firewall:
Service Iptables Stop
Access to other computers, which proves that the appropriate configuration for the firewall is invalid if the access is successful.
To turn on the firewall:
Service Iptables Start
Step 5: Restart the Firewall service
Command:
Service Iptables Restart
Step 6: Detect whether the normal access, as shown, the entire installation is complete!!!!
Installing Tomcat under the Centos-linux system