mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 17:49:53 +00:00
1.1 KiB
1.1 KiB
title, homepage, tagline
| title | homepage | tagline |
|---|---|---|
| Postgres | https://www.postgresql.org/ | PostgreSQL: The World's Most Advanced Open Source Relational Database. |
Updating postgres
webi postgres@stable
Use @x.y.z for a specific version.
Cheat Sheet
Postgres is the all-in-one database for beginners and experts alike. It handles SQL, 'NoSQL', JSON, HSTORE, Full-Text Search, Messages Queues and more. Best bang for buck.
Start the postgres server
Run just once (for development):
postgres -D $HOME/.local/share/postgres/var -p 5432
Run as a system service on Linux:
sudo env PATH="$PATH" \
serviceman add --system --username $(whoami) --name postgres -- \
postgres -D "$HOME/.local/share/postgres/var" -p 5432
Connect with the psql client
psql 'postgres://postgres:postgres@localhost:5432/postgres'
Initialize a database with a password
echo "postgres" > /tmp/pwfile
mkdir -p $HOME/.local/share/postgres/var/
initdb -D $HOME/.local/share/postgres/var/ \
--username postgres --pwfile "/tmp/pwfile" \
--auth-local=password --auth-host=password
rm /tmp/pwfile