headermask image

header image

centos把tomcat做成service

1 把catalina.sh拷贝到/etc/init.d目录下,重命名为tomcat
2 vi tomcat 添加如下代码:
#chkconfig:2345 10 90
#description:tomcat8 service
export CATALINA_HOME=/usr/local/workshop/tomcat8
export JAVA_HOME=/usr/local/workshop/jdk1.8.0_05

其中前两行的注释符号不要去掉,添加服务用的
3 service tomcat start 就可以启动了
4 chkconfig –add tomcat 加到服务中,下次就可以开机启动了



If you liked my post, feel free to subscribe to my rss feeds

One Comment

  1. 微乐怎么注册?点这里

    1. 微乐怎么注册? on 三月 19th, 2015 at 2:20 下午

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*