add tips for pgsql

This commit is contained in:
老周部落 2024-03-07 19:07:38 +08:00
parent 9ddc5096b3
commit 0344c518c9
No known key found for this signature in database
GPG key ID: C72181CD85C6B738

View file

@ -94,12 +94,16 @@ sudo apt install -y -V postgresql-16-pgdg-pgroonga
Create Firefish database, user and PGroonga extension. Create Firefish database, user and PGroonga extension.
Please not forget prompt database password in console.
```sh ```sh
sudo --user=postgres createuser --no-createdb --no-createrole --no-superuser --encrypted --pwprompt firefish sudo --user=postgres createuser --no-createdb --no-createrole --no-superuser --encrypted --pwprompt firefish
sudo --user=postgres createdb --encoding='UTF8' --owner=firefish firefish_db sudo --user=postgres createdb --encoding='UTF8' --owner=firefish firefish_db
sudo --user=postgres psql --command='CREATE EXTENSION pgroonga;' --dbname=firefish_db sudo --user=postgres psql --command='CREATE EXTENSION pgroonga;' --dbname=firefish_db
``` ```
If you forgot it, run `sudo -u postgres psql -c "ALTER USER firefish PASSWORD 'password';"` to set a password for firefish.
## Install Redis, Python 3 and build-essential ## Install Redis, Python 3 and build-essential
```sh ```sh