17 lines
255 B
Bash
17 lines
255 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Catch errors
|
||
|
set -e
|
||
|
|
||
|
# Install updates
|
||
|
sudo apt update && sudo apt upgrade -y
|
||
|
|
||
|
# Install nginx from the latest version of repos
|
||
|
sudo apt install nginx -y
|
||
|
|
||
|
# Enable nginx
|
||
|
sudo systemctl enable nginx
|
||
|
|
||
|
# Start nginx
|
||
|
sudo systemctl start nginx
|