码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS新增开机启动项

时间:2014-11-25 12:22:07      阅读:226      评论:0      收藏:0      [点我收藏+]

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

编辑rc.local文件

 vi /etc/rc.d/rc.local

例如

 1 #!/bin/sh
 2 #
 3 # This script will be executed *after* all the other init scripts.
 4 # You can put your own initialization stuff in here if you dont
 5 # want to do the full Sys V style init stuff.
 6 
 7 touch /var/lock/subsys/local
 8 /opt/redis/src/./redis-server /opt/redis/redis.conf
 9 
10 memcached -d -u root -P /tmp/memcached.pid -m 128m
11 
12 /opt/activemq/bin/./activemq start
13 
14 /opt/tomcat/bin/./startup.sh
15 
16 /usr/local/nginx/sbin/./nginx
17 
19 /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

 赋予权限

chmod 775 /etc/rc.d/rc.local

CentOS新增开机启动项

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

原文地址:http://www.cnblogs.com/libaoting/p/4120500.html

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