Centos6.5 install tomcat

#Install tomcat
Upload the apache-tomcat-7.0.29.tar.gz file to /usr/local and perform the following operations:
[root@admin local]# cd /usr/local
[root@admin local]# tar -zxv - f apache-tomcat-7.0.29.tar.gz // decompress the archive
[root@admin local]# rm -rf apache-tomcat-7.0.29.tar.gz // delete the archive
[root@admin local]# mv apache-tomcat-7.0.29 tomcat

#Start Tomcat
and perform the following operations:
[root@admin ~]# /usr/local/tomcat/bin/startup.sh //Start tomcat
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR : /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/jdk1.7.0/jre
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli
The above printing information appears in .jar , indicating that it has been successfully started.

#Open port
8080 in the firewall Add port 8080 to the firewall configuration and perform the following operations:
[root@admin ~]# vi + /etc/sysconfig/iptables #Add
the following code
-A RH-Firewall-1-INPUT -m state -- state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

#Restart firewall
[root@admin java]# service iptables restart

 

JAVA technical exchange group 532101200

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326641703&siteId=291194637