排障集合———nginx: [emerg] getpwnam(“nginx“) failed报错

出现这种报错是因为nginx用户没有创建,导致无法启动成功

[root@localhost nginx-1.15.9]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
==nginx: [emerg] getpwnam(“nginx”) failed ==
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

解决办法

[root@localhost system]# useradd -s /sbin/nologin -M nginx ##创建程序账户

你可能感兴趣的:(排障集合,nginx,linux,运维,centos)