军哥,CENTOS新手问二个问题
我之前一直用DEBIAN,没发现LNMP不能开机启动,但现在centos不能开机启动。
请问应该怎样加开机启动LNMP
(ps:现在知道是什么原因了,原来真是要等个二分钟就会启动)
第二个问题,LNMP每天0点自动重启动。你的方法是用crontab -e命令
但是这个命令我发现在CENTOS里无法用。。。。。
[ 本帖最后由 wjhhxl 于 2011-3-20 07:39 编辑 ]
回复 1# 的帖子
1、debian用放在/etc/init.d/下面的启动脚本用update-rc.d启动2、可能没有安装crontab命令 我是说centos 无法开机时自动启动lnmp
非要手动才可以,
如何修改rc.local文件?
现在是这样的
#!/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
ulimit -SHn 51200
/usr/local/php/sbin/php-fpm start
/usr/local/nginx/sbin/nginx
要添加什么?? 奇怪了,我自己在虚拟机上测试时,rc.local文件是一样的,但我虚拟机重启时,LNMP也能启动!为什么服务器上的不行。 现在知道是什么原因了,原来是要等个二分钟就会启动!
页:
[1]