mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-05-06 00:36:35 +00:00
add serviceman to postgres
This commit is contained in:
@@ -19,6 +19,28 @@ Use `@x.y.z` for a specific version.
|
||||
> 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):
|
||||
|
||||
```bash
|
||||
postgres -D $HOME/.local/share/postgres/var -p 5432
|
||||
```
|
||||
|
||||
Run as a system service on Linux:
|
||||
|
||||
```bash
|
||||
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
|
||||
|
||||
```bash
|
||||
psql 'postgres://postgres:postgres@localhost:5432/postgres'
|
||||
```
|
||||
|
||||
### Initialize a database with a password
|
||||
|
||||
```bash
|
||||
@@ -31,15 +53,3 @@ initdb -D $HOME/.local/share/postgres/var/ \
|
||||
|
||||
rm /tmp/pwfile
|
||||
```
|
||||
|
||||
### Start the postgres server
|
||||
|
||||
```bash
|
||||
postgres -D $HOME/.local/share/postgres/var -p 5432
|
||||
```
|
||||
|
||||
### Connect with the psql client
|
||||
|
||||
```bash
|
||||
psql 'postgres://postgres:postgres@localhost:5432/postgres'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user