为 suse linux 设置程序自动启动

时间:2023-03-09 07:35:36
为  suse linux 设置程序自动启动

1.suse linux 程序自动启动

在部署面安装的的时候,重启之后需要去tomcat/bin/startup.sh 下面去执行启动脚本。

设置开机自动启动该服务    在 vim   /etc/init.d/boot.local    下面添加   需要启动的脚本     sh /home/app/tomcat7/bin/startup.sh

shift +zz 保存

或者直接重定向到 /etc/init.d/boot.local

# echo  "sh /home/app/tomcat7/bin/startup.sh" >>/etc/init.d/boot.local

2.redhat 系列  RedHat系统的对应文件是/etc/rc.d/rc.local  在rc.local 里面修改