[emerg]: getpwnam(“nginx”) failed

[root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx 
nginx: [emerg] getpwnam("nginx") failed

 

没有安装nginx用户导致的无法启动

[root@localhost nginx-1.11.2]# useradd -s /sbin/nologin -M nginx
[root@localhost nginx-1.11.2]# id nginx

 

 

[root@localhost nginx-1.11.2]# /usr/local/nginx/sbin/nginx 
[root@localhost nginx-1.11.2]# netstat -tlunp | grep nginx
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      9709/nginx: master  

  

 

posted @ 2016-10-14 22:45  岁月童话  阅读(49415)  评论(0编辑  收藏  举报