首页 > 系统 > Linux > 正文

linux中root无法启动php-fpm问题解决办法

2024-08-27 23:59:00
字体:
来源:转载
供稿:网友

root用户是linux最高权限的用户了,而php-fpm是php的一个加速工具了,按理来说root启动php-fpm是没有问题的,但小编测试发现root无法启动php-fpm了,下面一起来看解决办法.

centos 6.5 64位的机器,用yum装的php-fpm,因为特殊原因需要用root账号启动php-fpm,但是发现,启动不了.

1,修改user和group

  1. # vim /etc/php-fpm.d/www.conf    
  2.    
  3. ; RPM: apache Choosed to be able to access some dir as httpd   
  4. user = root        //改为root   
  5. ; RPM: Keep a group allowed to write in log dir.   
  6. group = root      //改为root 

重启php-fpm时,报以下错误.

ERROR:[pool www] please specify user and group other than root [09-Jan-2015 16:54:26] ERROR: FPM initialization failed

解决办法:

  1. # /etc/init.d/php-fpm stop   //关闭php-fpm 
  2. # nohup /usr/sbin/php-fpm -R >/dev/null 2>&1 &   
  3. //Vevb.com 
  4. echo "nohup /usr/sbin/php-fpm -R >/dev/null 2>&1 &" >> /etc/rc.local  //加入开机启动

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表