dikar 发表于 2013-1-26 15:55:15

Linux下使用chkconfig设置自启动脚本

转载自:http://www.blogjava.net/idkkk/archive/2007/11/26/163094.html
 
 

<span style="font-family: Arial; font-size: 14px; line-height: 21px;">Linux下使用chkconfig设置自启动脚本

<div class="postbody">(以配置自启动Tomcat为例子)
1) 在/etc/rc.d/init.d/下新建startTomcat,添加如下内容:
#!/bin/sh
# chkconfig: 345 63 37
# description: tomcat server init script
su - root -c '/usr/local/tomcat/bin/startup.sh'
2) 修改文件属性为可以执行权限
#chmod 755 startTomcat
3) 配置脚本
#chkconfig --level 345 startTomcat on
页: [1]
查看完整版本: Linux下使用chkconfig设置自启动脚本