码迷,mamicode.com
首页 > 系统相关 > 详细

[Linux] CentOS 加入开机启动

时间:2014-10-09 01:26:37      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   io   os   ar   文件   sp   

1、在/etc/init.d/目录下新建一个文件:autostart.sh

#!/bin/sh
#chkconfig: 2345 80 80
#description: auto start web server
service iptables
start sh /usr/jboss-as-7.1.1.Final/bin/standalone.sh&

前面3句是必需的。

 

2、cd到/etc/init.d目录下,输入命令:

chkconfig --add autostart.sh
chkconfig autostart.sh on

 

3、重启即可。

[Linux] CentOS 加入开机启动

标签:des   style   blog   color   io   os   ar   文件   sp   

原文地址:http://www.cnblogs.com/HD/p/4011479.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!