19 lines
298 B
Bash
19 lines
298 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
|
|
|
|
# Status nginx
|
|
sudo systemctl status nginx |