Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
January 14, 2023 09:24 am GMT

PostgreSQL 14.5 on OpenBSD 7.2:

OpenBSD 7.2 PostgreSQL 14.5

OpenBSD PostgreSQL

  • OS: OpenBSD 7.2
  • : PostgreSQL 14.5


$ doas pkg_add postgresql-server$ doas su - _postgresql$ #  --locale $ #  "postgres" $ initdb -D /var/postgresql/data -U postgres \      -W -A scram-sha-256 -E UTF-8 --locale=xx_XX.UTF-8$ exit$ doas rcctl enable postgresql$ doas rcctl start postgresql

1. PostgreSQL

Ports :

$ doas pkg_add postgresql-server

:

quirks-6.42 signed on 2023-01-13T18:22:41Zpostgresql-server-14.5:postgresql-client-14.5: okuseradd: Warning: home directory `/var/postgresql' doesn't exist, and -m was not specifiedpostgresql-server-14.5: okThe following new rcscripts were installed: /etc/rc.d/postgresqlSee rcctl(8) for details.New and changed readme(s):    /usr/local/share/doc/pkg-readmes/postgresql-server

2.

_postgresql :

$ doas su - _postgresql

init_db
/var/postgresql :

$ initdb -D /var/postgresql/data -U postgres \      -W -A scram-sha-256 -E UTF-8 --locale=xx_XX.UTF-8

-U postgres (--user=... )

:

The files belonging to this database system will be owned by user "_postgresql".This user must also own the server process.The database cluster will be initialized with locale "ja_JP.UTF-8".initdb: could not find suitable text search configuration for locale "ja_JP.UTF-8"The default text search configuration will be set to "simple".Data page checksums are disabled.

-W (--pwprompt )
-W -A scram-sha-256 (--auth=... )

readme (/usr/local/share/doc/pkg-readmes/postgresql-server) :

It is strongly advised that you do not work with the postgres dba account
other than creating more users and/or databases or for administrative tasks.
Use the PostgreSQL permission system to make sure that a database is only
accessed by programs/users that have the right to do so.

--locale=... en_US.UTF-8

:

Enter new superuser password: Enter it again: 

:

creating directory /var/postgresql/data ... okcreating subdirectories ... okselecting dynamic shared memory implementation ... posixselecting default max_connections ... 20selecting default shared_buffers ... 128MBselecting default time zone ... Asia/Tokyocreating configuration files ... okrunning bootstrap script ... okperforming post-bootstrap initialization ... oksyncing data to disk ... okSuccess. You can now start the database server using:    pg_ctl -D /var/postgresql/data -l logfile start

exit _postgersql :

$ exit

3. PostgreSQL

:

$ doas rcctl enable postgresqlpostgresql(ok)$ doas rcctl start postgresqlpostgresql(ok)

4.

Postgresql RDBMS

postgresql.conf pg_hba.conf psql

()

psql

PostgreSQL :

$ psql -U postgresPassword for user postgres:

:)

psql (14.5)Type "help" for help.postgres=#


Original Link: https://dev.to/nabbisen/postgresql-145-on-openbsd-72-insutoru-269f

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To