yum -y epel-release-latest-7.noarch.rpm
cd /etc/yum.repos.d/
mv a/CentOS-Base.repo CentOS-Media.repo .
mv local.repo a
yum -y install ruby rubygems ruby-dev
gem install rubygems-update -v 2.3.0
gem update --system
gem sources -a http://mirrors.aliyun.com/rubygems/
gem sources --remove https://rubygems.org/
gem sources -l
vim nginx.sh
#!/bin/bash
useradd -M -s /sbin/nologin nginx
ln -s /usr/local/nginx/sbin/nginx /sbin
echo www.crushlinux.com > /usr/local/nginx/html/index.html
nginx
yum -y install rpm-build
fpm -s dir -t rpm -n nginx -v 1.14.2 -d 'pcre-devel,zlib-devel' -f --post-install /root/nginx.sh /usr/local/nginx