2021-04-03 11:13:24 +07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Catch errors
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Update the repository
|
|
|
|
sudo apt-get update
|
|
|
|
|
|
|
|
# Upgrade repository software
|
|
|
|
sudo apt upgrade -y
|
|
|
|
|
|
|
|
# Install postgres and common utils
|
2021-04-03 14:04:27 +07:00
|
|
|
sudo apt install postgresql postgresql-contrib -y
|
|
|
|
|
|
|
|
# Enable postgres
|
|
|
|
sudo systemctl enable postgresql
|
|
|
|
|
|
|
|
# Status nginx
|
|
|
|
sudo systemctl status postgresql
|