重启lnmp的时候Starting php_fpm Failed loading /usr/local/zend/ZendOptimizer.so: /usr/

重启lnmp的时候

 

Starting php_fpm Failed loading /usr/local/zend/ZendOptimizer.so: /usr/local/zend/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied

动态链接库加载出错:cannot restore segment prot after reloc: Permission denied

执行:/usr/local/php/sbin/php-fpm restart

提示:

Shutting down php_fpm . done

Starting php_fpm Failed loading /usr/local/Zend/lib/ZendOptimizer.so: /usr/local/Zend/lib/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied

done

原来这是SELinux搞的鬼,解决办法:

关闭SELINX,执行:/usr/sbin/setenforce 0

禁止掉SELinux

更改/etc/sysconfig/selinux 文件的内容为 SELINUX=disabled

 

当然不想关闭SWlinux,我们可以这样:chcon -t textrel_shlib_t /usr/local/zend/ZendOptimizer.so

你可能感兴趣的:(LNMP)