Skip to main content

Install nginx on CentOS7

CentOS 中无法直接安装 nginx.

yum install epel-release

安装 EPEL repository 后扔无法安装 nginx

rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx

/etc/yum.repos.d/ 目录中多了个名为nginx.repo 的文件