From ed4782d9df023da47ed3990bed8798bee88dce88 Mon Sep 17 00:00:00 2001 From: NiceDevil <17103076+nicedevil007@users.noreply.github.com> Date: Wed, 3 Jan 2024 18:57:27 +0100 Subject: [PATCH] Added Alpine Linux --- Linux/PostgreSQL/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Linux/PostgreSQL/README.md b/Linux/PostgreSQL/README.md index a25ddd3..e4d0e24 100644 --- a/Linux/PostgreSQL/README.md +++ b/Linux/PostgreSQL/README.md @@ -15,4 +15,24 @@ dnf -y install postgresql16-server postgresql16-contrib # Set autostart and start PostgreSQL now systemctl enable --now postgresql-16 +``` + +# PostgreSQL Installation on AlpineLinux + +```javascript +# Install PostgreSQL +apk add postgresql postgresql-client + +# Setup/Initialize Database +rc-service postgresql setup +rc-service postgresql start + +# Create a User that can create a Database +psql -U postgres +CREATE USER pgUSER WITH PASSWORD 'strongpassword'; +ALTER ROLE pgUSER CREATEDB; +\q + +# Set autostart and start PostgreSQL now +rc-update add postgresql ``` \ No newline at end of file