mirror of
https://github.com/kidwellj/proxmox-scripts.git
synced 2025-01-10 05:32:21 +00:00
Removed PostgreSQL LXC Container scripts in README.md
This commit is contained in:
parent
00e87533df
commit
e33a159345
110
README.md
110
README.md
|
@ -92,113 +92,3 @@ After the script completes, If you're dissatisfied with the default settings, cl
|
||||||
____________________________________________________________________________________________
|
____________________________________________________________________________________________
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary markdown="span">PostgreSQL (**without** pgadmin4) LXC</summary>
|
|
||||||
|
|
||||||
<p align="center"><img src="https://www.postgresql.org/media/img/about/press/elephant.png" alt="PostgreSQL"/></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h1 align="center" id="heading"> Proxmox PostgreSQL (**without** pgadmin4) LXC Container </h1>
|
|
||||||
|
|
||||||
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)"
|
|
||||||
```
|
|
||||||
<h3 align="center" id="heading">⚡ Default Settings: 1GB RAM - 4GB Storage - 1vCPU ⚡</h3>
|
|
||||||
|
|
||||||
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`
|
|
||||||
|
|
||||||
____________________________________________________________________________________________
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary markdown="span">PostgreSQL (**with** pgadmin4) LXC</summary>
|
|
||||||
|
|
||||||
<p align="center"><img src="https://www.postgresql.org/media/img/about/press/elephant.png" alt="PostgreSQL"/></p>
|
|
||||||
|
|
||||||
|
|
||||||
<h1 align="center" id="heading"> Proxmox PostgreSQL (**with** pgadmin4) LXC Container </h1>
|
|
||||||
|
|
||||||
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)"
|
|
||||||
```
|
|
||||||
<h3 align="center" id="heading">⚡ Default Settings: 2GB RAM - 8GB Storage - 2vCPU ⚡</h3>
|
|
||||||
|
|
||||||
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
|
|
||||||
____________________________________________________________________________________________
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
Loading…
Reference in a new issue