1.yum安裝
yum安裝 http://nginx.org/packages/centos/7/noarch/RPMS/
第一步:
安裝命令: yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-nr-agent-2.0.0-12.el7.ngx.noarch.rpm
檢測是否安裝成功
yum repolist enabled | grep 'nginx*'
第二步:
安裝nginx yum -y install nginx
啟動nginx systemctl nginx start / restart 或者 service nginx start / restart
設置nginx服務開機自動開啟 systemctl enabled nginx.service
檢測nginx開機啟動是否成功 systemctl list-dependencies | grep nginx
2.源碼安裝。。