OpenBSD 7.2上的PostgreSQL 14.5:
#postgres #database #安装 #服务器

-

OpenBSD において 7.2 のリリースに伴って PostgreSQL が 14.5 にアップデートされました。

æ°°®openbsd - 。

ç°至¢

  • 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

-

æÉé是最好的OW¥¥¥¥¥€«e- funâ

1.postgresqlâµ µ

Portsâ·â·ââââ ¶..

$ doas pkg_add postgresql-server

Å了»¥äst

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

2.¼

â€â»ã ªª âââ‮ -

$ doas su - _postgresql

koude1â® 。 ££££

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

ästRé3(--user=...â€â)奥

Å了»¥äst

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.

ã - kockd8(Kroco9æpãuxembourg但是,Kéææææææ2(2£2æ)自有级别«ªruululullëtzebuerg£\ \«

‾§«readme(/usr/local/share/doc/pkg-readmes/postgresql-server)â®®ÅÅ®Å了€¼招募:

强烈建议您不要使用Postgres DBA帐户
除了创建更多用户和/或数据库或用于管理任务外。
使用PostgreSQL权限系统确保数据库仅是
有权这样做的程序/用户访问。

- â€Å®â¾-en_us.utf-8 - Å®®

ã >

Enter new superuser password: 
Enter it again: 

ä¥â¾¾¾

creating directory /var/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 20
selecting default shared_buffers ... 128MB
selecting default time zone ... Asia/Tokyo
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:

    pg_ctl -D /var/postgresql/data -l logfile start

â€â€Å§ €_postgersql‶¼»§ >

$ exit

3.postgresqlâµ µ

§ èµ·Å—â¾ -

$ doas rcctl enable postgresql
postgresql(ok)

$ doas rcctl start postgresql
postgresql(ok)

4.âµ µ¼¼¼

postgresqlâµμ¼¼ - - - ®

è。 °ketEnæ°°°k之后,看见,miloâ12koude16ã1°Óã1111111111111111111115

è并®

サーバー周りの設定 (英語)âá

咀嚼16

§ - - µ¼¼€¥ç¶§

$ psql -U postgres
Password for user postgres:

v

psql (14.5)
Type "help" for help.

postgres=#

Å