环境信息:[root@t6 ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@t6 ~]# uname -r
2.6.32-358.el6.x86_64
[root@t6 ~]# uname -m
x86_64
[root@t6 ~]#
问题:将编译安装的nginx,php放入/etc/rc.local实现开机自启动。但是服务器重启后,nginx,php没有启动。加入到/etc/rc.local下单touch /tmp/temp也没有执行。
解决:
1) 关闭selinux ,重启后仍不能启动。
selinux配置文件:/etc/selinux/config ,selinux=disabled.
getenforce 查看Linux状态
setenforce 0 ###临时关闭selinux
2)将启动命令放入/etc/rc.d/rc.local下正常启动。
发现的问题:
1)/etc/rc.local 不是链接文件,将/etc/rc.locl重新链接到/etc/rc.d/rc.local
[root@t6 ~]# rm -f /etc/rc.local && ln -s /etc/rc.d/rc.local /etc/rc.local