#!/bin/bash
cat> /etc/yum.repos.d/nginx.repo <<eof< p="">
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/\$basearch/
gpgcheck=0
enabled=1
EOF
#echo "清除yum缓存"
#yum clean all &>/dev/null
#yum makecache &>/dev/null
echo "准备下载nginx"
yum -y install nginx
rpm -q nginx