Error message
No package nginx available
Error:Nothing to do
solution:
method one,
replacement source
backup
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Run Yum Makecache to generate the cache
Method 2:
use EPEL to install nginx:
sudo yum install epel-release
yum update
yum install nginx