Created
October 30, 2019 21:41
-
-
Save backroot/7c8680ebab7687498eb34455b4b2dbf5 to your computer and use it in GitHub Desktop.
Install Nginx for CentOS 7
This file contains hidden or 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
#!/usr/bin/bash | |
cat <<\EOF > /etc/yum.repos.d/nginx.repo | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/mainline/centos/7/$basearch/ | |
gpgcheck=0 | |
enabled=0 | |
EOF | |
sudo yum install -y nginx --enablerepo=nginx | |
sudo systemctl enable nginx | |
sudo systemctl start nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment