rm -fr /etc/yum.repos.d/*
cat << EOF >> /etc/yum.repos.d/hk-mirrors.repo
[base]
name=base
baseurl=https://mirror.xtom.com.hk/centos/7/os/x86_64/
enabled=1
gpgcheck=0
[extras]
name=extras
baseurl=https://mirror.xtom.com.hk/centos/7/extras/x86_64/
enabled=1
gpgcheck=0
[updates]
name=updates
baseurl=https://mirror.xtom.com.hk/centos/7/updates/x86_64/
enabled=1
gpgcheck=0
[epel]
name=epel
baseurl=https://mirror.xtom.com.hk/epel/7Server/x86_64/
enabled=1
gpgcheck=0
EOF
增加额外nginx最新资源库
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install nginx