[root@VM_0_10_centos ~]#yum install -y nginx
[root@VM_0_10_centos ~]# systemctl start nginx.service
Job for nginx.service failed because the control process exited with error code. See "systemctl status ngi
#端口可能被占用,需要检查下
netstat -tnlp
[root@VM_0_10_centos ~]# systemctl start nginx.service
[root@VM_0_10_centos ~]#
[root@VM_0_10_centos ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 1562/./redis-server
tcp 0 0 0.0.0.0:33965 0.0.0.0:* LISTEN 21092/xe_d000_XE
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8360/nginx: master
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3983/tnslsnr
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 3983/tnslsnr
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 711/sshd
tcp6 0 0 :::3306 :::* LISTEN 30029/docker-proxy-
tcp6 0 0 :::80 :::* LISTEN 8360/nginx: master
[root@VM_0_10_centos ~]#
访问80端口验证是否安装成功