Created
January 10, 2015 19:21
-
-
Save rmrhz/4e5f51b750b260cee05f to your computer and use it in GitHub Desktop.
Install latest Nginx on CentOs 6.*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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