网站地图    收藏   

主页 > 系统 > linux系统 >

如何让你的程序在linux开机时自动启动 - Linux操作

来源:自学PHP网    时间:2015-04-14 11:12 作者: 阅读:

[导读] 如何让你的程序在linux开机时自动启动只需要在/etc/rc.local里添加你的程序即可,例如需要nginx服务在每次开机时自动运行则可以加入如下的配置,添加最后一行/usr/local/nginx/sbin/nginx即可...


如何让你的程序在linux开机时自动启动
 
只需要在/etc/rc.local里添加你的程序即可,例如需要nginx服务在每次开机时
自动运行则可以加入如下的配置,添加最后一行/usr/local/nginx/sbin/nginx即可
  www.2cto.com  
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
 
touch /var/lock/subsys/local
/usr/local/nginx/sbin/nginx
 

自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习

京ICP备14009008号-1@版权所有www.zixuephp.com

网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com

添加评论