« PostgreSQL » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
Aucun résumé des modifications |
|||
Ligne 14 : | Ligne 14 : | ||
</kode> | </kode> | ||
== | == Configuration == | ||
<kode lang='bash'> | <kode lang='bash'> | ||
# switch to the PostgreSQL user | # switch to the PostgreSQL user | ||
Ligne 23 : | Ligne 23 : | ||
# $LANG (en_US.UTF-8) is used to deduce the locale and the encoding | # $LANG (en_US.UTF-8) is used to deduce the locale and the encoding | ||
# or can be defined manually: --locale=en_US.UTF-8 -E UTF8 | # or can be defined manually: --locale=en_US.UTF-8 -E UTF8 | ||
# start the service | |||
sc-start postgresql.service | |||
# create a user | |||
# If the new user has the same name as your Linux user, it allows you to access the PostgreSQL database shell without having to specify a user to login. | |||
createuser --interactive | |||
</kode> | </kode> |
Version du 4 avril 2021 à 17:38
Links
Service
sc-start postgresql.service |
Installation
# will install postgresql-libs, postgresql and create a system user called postgres sudo pacman -S postgresql |
Configuration
# switch to the PostgreSQL user sudo -iu postgres # initialize the database cluster initdb -D /var/lib/postgres/data # $LANG (en_US.UTF-8) is used to deduce the locale and the encoding # or can be defined manually: --locale=en_US.UTF-8 -E UTF8 # start the service sc-start postgresql.service # create a user # If the new user has the same name as your Linux user, it allows you to access the PostgreSQL database shell without having to specify a user to login. createuser --interactive |