Install tomcat under centos6.4 Linux

1. Download tomcat

http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.16/bin/apache-tomcat-8.5.16.tar.gz

 

2. Unzip tomcat to the specified directory

  tar -zxvf /home/softwore/apache-tomcat-8.0.36.tar.gz -C /home/tools/

 

3. Start tomcat 

   Enter the bin    directory./startup.sh

 

4. To access centos in Windows environment, you need to open the designated port of the firewall

    Find the configuration file   /etc/sysconfig/iptables

   -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT


   //Put the above sentence above the following two sentences
   -A INPUT -j REJECT --reject-with icmp-host-prohibited
   -A FORWARD -j REJECT --reject-with icmp-host-prohibited

 

5, set the boot to start automatically

          Add in /etc/rc.d/rc.local file 
          echo  "tomcat start..."  
          export JAVA_HOME=/home/tools/jdk1.8.0_131 //need to specify jdk
          /home/tools/apache-tomcat-8.0.36/bin/startup.sh start

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326230108&siteId=291194637