From 4dc162ad4f04fb025e3ac59805b976e3c0919f44 Mon Sep 17 00:00:00 2001 From: Steven Seifried Date: Wed, 29 Dec 2021 20:14:34 +0100 Subject: [PATCH] Updated README.md --- README.md | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/README.md b/README.md index 125f92a..5140c63 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ Scripts for Proxmox VE and Proxmox BS. - Proxmox VE = [Proxmox Virtual Environment](https://proxmox.com/en/proxmox-ve) - Proxmox BS = [Proxmox Backup Server](https://proxmox.com/en/proxmox-backup-server) +**Note:** The LXC Contrainer are currently untested. But they should work. I'll test them soon. +
Proxmox VE 7 Post Install @@ -90,3 +92,113 @@ After the script completes, If you're dissatisfied with the default settings, cl ____________________________________________________________________________________________
+ +
+PostgreSQL (**without** pgadmin4) LXC + +

PostgreSQL

+ + +

Proxmox PostgreSQL (**without** pgadmin4) LXC Container

+ +To create a new Proxmox PostgreSQL (**without** pgadmin4) LXC Container, run the following in the Proxmox web shell. + +``` +bash -c "$(wget -qLO - https://raw.githubusercontent.com/StevenSeifried/proxmox-scripts/main/postgresql_container.sh)" +``` +

⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡

+ +To enable PostgreSQL to listen to remote connections, you need to edit the configuration file. To do this, open the console in your PostgreSQL LXC: +``` +nano /etc/postgresql/14/main/postgresql.conf +``` +Chnage `listen_addresses='localhost'` to `listen_addresses='*'` +Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". + +Restart PostgreSQL with +``` +sudo systemctl restart postgresql +``` + + +Change password of `postgres` user: +``` +sudo -u postgres psql + +\password postgres + +\q +``` + +Create a new user (e.g. for Nextcloud): +``` +sudo -u postgres createuser -P -d nextcloud +``` + +Create a new databse (e.g. for Nextcloud): +``` +sudo -u postgres createdb -O nextcloud nextcloud_db +``` +This create the database `nextcloud_db` and set the ownership to the user `nextcloud` + +____________________________________________________________________________________________ + +
+ +
+PostgreSQL (**with** pgadmin4) LXC + +

PostgreSQL

+ + +

Proxmox PostgreSQL (**with** pgadmin4) LXC Container

+ +To create a new Proxmox PostgreSQL (**with** pgadmin4) LXC Container, run the following in the Proxmox web shell. + +``` +bash -c "$(wget -qLO - https://raw.githubusercontent.com/StevenSeifried/proxmox-scripts/main/postgresql_pgadmin4_container.sh)" +``` +

⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡

+ +To enable PostgreSQL to listen to remote connections, you need to edit the configuration file. To do this, open the console in your PostgreSQL LXC: +``` +nano /etc/postgresql/14/main/postgresql.conf +``` +Chnage `listen_addresses='localhost'` to `listen_addresses='*'` +Save and exit the editor with "Ctrl+O", "Enter" and "Ctrl+X". + +Restart PostgreSQL with +``` +sudo systemctl restart postgresql +``` + + +Change password of `postgres` user: +``` +sudo -u postgres psql + +\password postgres + +\q +``` + +Create a new user (e.g. for Nextcloud): +``` +sudo -u postgres createuser -P -d nextcloud +``` + +Create a new databse (e.g. for Nextcloud): +``` +sudo -u postgres createdb -O nextcloud nextcloud_db +``` +This create the database `nextcloud_db` and set the ownership to the user `nextcloud`. + +To setup pgadmin4, open the console in your PostgreSQL LXC and run the following command: + +``` +/usr/pgadmin4/bin/setup-web.sh +``` +Follow the instructions +____________________________________________________________________________________________ + +