歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 如何讓你的程序在linux開機時自動啟動

如何讓你的程序在linux開機時自動啟動

日期:2017/3/1 17:14:17   编辑:關於Linux

如何讓你的程序在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
Copyright © Linux教程網 All Rights Reserved