Skip to content

Instantly share code, notes, and snippets.

@jesperronn
Created May 11, 2016 11:15
Show Gist options
  • Save jesperronn/46bde5895f354075587ab20147fb6137 to your computer and use it in GitHub Desktop.
Save jesperronn/46bde5895f354075587ab20147fb6137 to your computer and use it in GitHub Desktop.
#!/bin/bash
FILE=/etc/yum.repos.d/nginx.repo
sudo touch $FILE
sudo chown root:root $FILE
echo "
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1
" | sudo tee $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment