Skip to content

Instantly share code, notes, and snippets.

@rmrhz
Created January 10, 2015 19:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmrhz/4e5f51b750b260cee05f to your computer and use it in GitHub Desktop.
Save rmrhz/4e5f51b750b260cee05f to your computer and use it in GitHub Desktop.
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