首页 > 代码库 > CentOS用yum快速安装nginx

CentOS用yum快速安装nginx

增加nginx源

vim  /etc/yum.repos.d/nginx.repo

[nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1

 

安装nginx

yum -y install nginx

 

配置nginx

vim /etc/nginx/nginx.conf

CentOS用yum快速安装nginx