Skip to content

Instantly share code, notes, and snippets.

@rmrhz
Created Jan 10, 2015
Embed
What would you like to do?
Install latest Nginx on CentOs 6.*
# Install Nginx
echo "Installing Nginx.."
sleep 2
cat <<EOF > /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/\$basearch/
gpgcheck=0
enabled=1
EOF
{
yum install nginx -y &> /dev/null
} &> /dev/null
echo "Setting up Nginx.."
sleep 2
{
chkconfig --add nginx
chkconfig --levels 235 nginx on
} &> /dev/null
service nginx start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment