自启动

linux开机自启动命令

本小妞迷上赌 提交于 2019-11-29 09:59:47
需求,开机自启动命令例如: service iptables stop service mysqld start svnserve -d -r /root/svndata/ ... 步骤: 1.su 2.vi /ect/rc.d/rc.local 3.脚本如下: # want to do the full Sys V style init stuff. touch /var/lock/subsys/local /usr/bin/svnserve -d -r /root/svndata/ /usr/local/bin/redis-server /usr/local/redis-3.0.4/redis.conf /etc/init.d/mysqld start export JAVA_HOME=/usr/local/jdk1.7.0_79 /usr/local/apache-tomcat-7.0.64/bin/startup.sh start 4.保存,reboot测试是否生效,测试结果为生效 备注:测试环境为Redhat enterprise Linux 6.0 64位和CenterOS6.5 64位 来源: oschina 链接: https://my.oschina.net/u/555061/blog/682710