View server firewall status:
ufw status
Display status: inactive means closed active representation on state
View a specific server ports are open:
lsof -i:80
If you turn, there is output, or no output.
Command 2: netstat -aptn
The tomcat ubuntu restart or boot automatically added to startup items:
https://www.cnblogs.com/moy25/p/8243619.html
1, copy catalina.sh to the /etc/init.d directory
/usr/local/tomcat/apache-tomcat-8.0.48/bin/catalina.sh /etc/init.d CP
2, rename
/etc/init.d/catalina.sh Tomcat mv
3, edit the configuration information
we /etc/init.d/tomcat
If no information CATALINA_HOME and JAVA_HOME, CATALINA_HOME the root directory of tomcat, JAVA_HOME to the JDK root directory:
= CATALINA_HOME / usr / local / Tomcat / Apache Tomcat-8.0.48- the JAVA_HOME = / usr / local / Java / jdk1.8.0_151
. 4, set permissions
755 /etc/init.d/tomcat chmod
5, start the service and add to the service from the start
Command to start the service: service tomcat start Add to start service from the command: update-rc.d -f tomcat defaults
shut down the service command: service tomcat stop delete to start service from the command: update-rc.d -f tomcat remove