CentOS安裝管理Nginx

[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端口驗證是否安裝成功

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章