首页 > 代码库 > CentOS新增开机启动项
CentOS新增开机启动项
编辑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 don‘t 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 128m11 12 /opt/activemq/bin/./activemq start13 14 /opt/tomcat/bin/./startup.sh15 16 /usr/local/nginx/sbin/./nginx17 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新增开机启动项
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。