[root@localhost bin]# service httpd restart
httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied
1关闭SELINUX的方法:
vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled 需要重启
2不关闭SELINUX的方法:
# setenforce 0
# chcon -c -v -R -u system_u -r object_r -t
textrel_shlib_t /usr/local/apache/modules/libphp5.so
# service httpd restart
# setenforce 1
[root@localhost bin]# setenforce 0
[root@localhost bin]# chcon -c -v -R -u system_u -r object_r -t textrel_shlib_t /usr/local/apache/modules/libphp5.so
context of /usr/local/apache/modules/libphp5.so changed to system_u:object_r:textrel_shlib_t
[root@localhost bin]# service httpd restart
httpd not running, trying to start
[root@localhost bin]#
文章评论