linux 开机启动
来源:互联网 发布:vue.js验证手机号码 编辑:程序博客网 时间:2024/06/10 18:26
1.编写shell脚本
#!/bin/sh
#chkconfig: 2345 80 90
#description:开机自动启动的脚本程序
#开启tomcat服务 端口为8081
cd /usr/local/tomcat/bin
./startup.sh -port 8081
#chkconfig: 2345 80 90
#description:开机自动启动的脚本程序
#开启tomcat服务 端口为8081
cd /usr/local/tomcat/bin
./startup.sh -port 8081
2.提交到启动项中
chkconfig --add tomcat.sh
chkconfig tomcat.sh on
阅读全文