Linux CentOS下安装Tomcat9及web项目的部署

2019-01-16 21:38:13王冬梅

shell~#chmod 755 tomcat

添加tomcat服务这里用chkconfig

shell~#chkconfig --add tomcat

如果这里出现提示

insserv: warning: script 'tomcat' missing LSB tags and overrides
insserv: There is a loop between service nginx and tomcat if stopped
insserv: loop involving service tomcat at depth 2
insserv: loop involving service nginx at depth 1
insserv: Stopping tomcat depends on nginx and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!

则需要安装chkconfig安装方法

shell~#apt-get install chkconfig

就可以如出现以下表示成功

tomcat                    0:off  1:off  2:on   3:on   4:on   5:on   6:off

也可以在输入以下命令查看一下

shell~#chkconfig --list tomcat

tomcat                    0:off  1:off  2:on   3:on   4:on   5:on   6:off

如果345 为关闭状态。执行如下命令设置tomcat为开机自启动。

 shell~# chkconfig tomcat on

启动一下看看

shell~# service tomcat start Using CATALINA_BASE: /usr/local/apache-tomcat Using CATALINA_HOME: /usr/local/apache-tomcat Using CATALINA_TMPDIR: /usr/local/apache-tomcat/temp Using JRE_HOME: /usr/java/jdk1.7.0_07 Using CLASSPATH: /usr/local/apache-tomcat/bin/bootstrap.jar:/usr/local/apache-tomcat/bin/tomcat-juli.jar

启动,停止,重启

shell~# service tomcat start shell~# ervice tomcat stop shell~# service tomcat restart

总结

以上所述是小编给大家介绍的Linux CentOS下安装Tomcat9及web项目的部署,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对易采站长站网站的支持!

您可能感兴趣的文章:

Linux centos7环境下tomcat安装教程