1. 程式人生 > >centos7 yum 方式安裝nginx

centos7 yum 方式安裝nginx

centos7系統庫中預設是沒有nginx的rpm包的,所以我們自己需要先更新下rpm依賴庫

(1)使用yum安裝nginx需要包括Nginx的庫,安裝Nginx的庫

#rpm-Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

(2)使用下面命令安裝nginx

#yum install nginx

(3)啟動Nginx

#service nginx start

#systemctl start nginx.service