Installation under Linux tomcat
1. Go to the / usr / local / directory cd / usr / local /
2. Download tmocat:
to tomcat official website to download tomcat9.0.30 (latest edition) https://tomcat.apache.org/download-90.cgi and use FileZilla linux system copied to
3. Extract: tar -zxvf apache-tomcat-9.0.8.tar.gz
Command: tar -xvf apache-tomcat-9.0.30.tar.gz -C / usr / local decompression to / usr / local
4. In the current directory / usr / local rename: mv apache-tomcat-9.0.8 tomcat
5. Go to the /etc/init.d directory: cd /etc/init.d
6. Create a tomcat service configuration file: vi tomcat
7. The following code to be written to the configuration file tomcat:
#idea - tomcat config start - 2016-05-01 #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 2345 20 80 JAVA_HOME=/usr/local/java/jdk export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH #idea - tomcat config start - 2016-05-01 #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 2345 20 80 JAVA_HOME=/usr/local/java/jdk export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/local/tomcat/ case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0 #chmod 755 tomcat #chkconfig --add tomcat #chkconfig --level 2345 tomcat on
Press exc, enter: wq Enter!.
8. tomcat assign executable permission: chmod + x tomcat
9. Add tomcat as a system service: chkconfig --add tomcat
10. Enter the command: chkconfig --list tomcat
11. Start tomcat command: service tomcat start
12. Remote Access window