Skip to content

Instantly share code, notes, and snippets.

@hoangdh
Created May 27, 2019 08:49
Show Gist options
  • Save hoangdh/eac59b087975a7a3af830c55dba4fec1 to your computer and use it in GitHub Desktop.
Save hoangdh/eac59b087975a7a3af830c55dba4fec1 to your computer and use it in GitHub Desktop.
#!/bin/bash
cat > /etc/yum.repos.d/nginx.repo << EOF
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/\$releasever/\$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
EOF
yum install nginx -y
systemctl start nginx
systemctl enable nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment