编译时指定了用户而没有创建用户导致报错

解决:

查看你添加的用户是什么,

[root@localhost nginx]# sbin/nginx -V
nginx version: nginx/1.10.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --user=nginx --group=nginx --with-http_ssl_module

我这里是nginx,所以添加nginx用户

添加用户

useradd -s /sbin/nologin nginx

输入绝对路径成功启动nginx

/usr/local/nginx/sbin/nginx

05-11 16:11