linux 开机启动脚本方法
vim /etc/rc.local
然后在里面写你要执行的语句, 比如我现在要启动nginx 加PHP-fpm
#开启nginx
nginx >> /tmp/rc.local.nginx 2> &1 &
#开启php-fpm7
/usr/local/php-7.0.8/sbin/php-fpm &
exit 0
要记住, 每条后面要加上 &
设置完之后 wq保存
reboot 看下效果呗
linux 开机启动脚本方法
vim /etc/rc.local
然后在里面写你要执行的语句, 比如我现在要启动nginx 加PHP-fpm
#开启nginx
nginx >> /tmp/rc.local.nginx 2> &1 &
#开启php-fpm7
/usr/local/php-7.0.8/sbin/php-fpm &
exit 0
要记住, 每条后面要加上 &
设置完之后 wq保存
reboot 看下效果呗
本文标题:linux开机启动脚本方法
本文链接:https://www.haomeiwen.com/subject/oxuwyxtx.html
网友评论