1.进入到/etc/init.d目录中:cd/etc/init.d2.创建tomcat服务配置文件:vitomcat3.将以下代码复制到创建的tomcat配置文件中:#idea-...
#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

2,3,4,5都是开代表跟随系统而启动
到此这篇关于linux系统设置tomcat开机自启介绍的文章就介绍到这了,更多相关Linux tomcat开机自启内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!
沃梦达教程
本文标题为:Linux系统设置tomcat开机自启介绍
基础教程推荐
猜你喜欢
- 安装nginx环境(含lua)时遇到报错ngx_http_lua_common.h:20:20: error: luajit.h: No such file or directory的解决 2024-01-28
- Nginx nginx-auth-ldap认证 2024-01-30
- K8S Pod Sidecar 应用场景之一-加入 NGINX Sidecar 做反代和 web 服务器 2024-01-29
- 【原】Nginx添加Content-MD5头部压测分析 2023-12-11
- nginx启动失败/报错(bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket…permissions) nginx启动失败 2024-01-30
- PHP脚本批量清除nginx缓存的方法 2023-12-09
- windows nginx安装与开机启动 2023-12-11
- 使用ffmpeg+nginx实现简单的点播功能 2023-12-09
- Linux系统运行级别详细介绍 2022-09-15
- nginx open_file_cache指令影响静态文件更新时间 2024-01-28
