nginx 설치 시작 오류

[root@localhost nginx-1.14.0]# /usr/local/nginx/sbin/nginx 
nginx: [emerg] getpwnam("nginx") failed
[root@localhost nginx-1.14.0]# /usr/local/nginx/sbin/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

nginx 사용자 가 만 들 지 않 았 기 때문에 nginx 사용자 와 nginx 그룹 을 만들어 야 합 니 다.
[root@localhost nginx-1.14.0]# id nginx
id: nginx:    
[root@localhost nginx-1.14.0]# groupadd nginx
[root@localhost nginx-1.14.0]# useradd nginx -g nginx -s /sbin/nologin -M
[root@localhost nginx-1.14.0]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@localhost nginx-1.14.0]# /usr/local/nginx/sbin/nginx
[root@localhost nginx-1.14.0]# lsof -i :80
COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   6839  root    6u  IPv4  50335      0t0  TCP *:http (LISTEN)
nginx   6840 nginx    6u  IPv4  50335      0t0  TCP *:http (LISTEN)
[root@localhost nginx-1.14.0]# 
  !!nginx    

좋은 웹페이지 즐겨찾기