Skip to content

Instantly share code, notes, and snippets.

@brentmcconnell
Last active June 9, 2025 19:45
Show Gist options
  • Save brentmcconnell/3ef659d88370b391c2c5630b76ab7550 to your computer and use it in GitHub Desktop.
Save brentmcconnell/3ef659d88370b391c2c5630b76ab7550 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Add MSFT repos
sudo yum update -y --disablerepo='*' --enablerepo='*microsoft*'
# Update package repository
sudo yum update -y
# Install nginx
sudo yum install -y nginx
# Enable nginx to start on boot
sudo systemctl enable nginx
# Start nginx service
sudo systemctl start nginx
# Show nginx status
sudo systemctl status nginx
# Write some custom html to ensure it all works
echo `hostname` | sudo tee /usr/share/nginx/html/brent.html
# Allow firewall to let traffic through
sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment