# sudo apt-get install postgresql-14
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5 libsensors-config libsensors5
libtypes-serialiser-perl pgdg-keyring postgresql-client-14 postgresql-client-common postgresql-common ssl-cert sysstat
Suggested packages:
lm-sensors postgresql-doc-14 openssl-blacklist isag
The following NEW packages will be installed:
libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5 libsensors-config libsensors5
libtypes-serialiser-perl pgdg-keyring postgresql-14 postgresql-client-14 postgresql-client-common postgresql-common
ssl-cert sysstat
0 upgraded, 15 newly installed, 0 to remove and 7 not upgraded.
Need to get 33.3 MB of archives.
After this operation, 132 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
root@118-27-103-174:~# cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main
root@118-27-103-174:~# sudo apt-get install postgresql-14
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5 libsensors-config libsensors5
libtypes-serialiser-perl pgdg-keyring postgresql-client-14 postgresql-client-common postgresql-common ssl-cert sysstat
Suggested packages:
lm-sensors postgresql-doc-14 openssl-blacklist isag
The following NEW packages will be installed:
libcommon-sense-perl libjson-perl libjson-xs-perl libllvm9 libpq5 libsensors-config libsensors5
libtypes-serialiser-perl pgdg-keyring postgresql-14 postgresql-client-14 postgresql-client-common postgresql-common
ssl-cert sysstat
0 upgraded, 15 newly installed, 0 to remove and 7 not upgraded.
Need to get 33.3 MB of archives.
After this operation, 132 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libcommon-sense-perl amd64 3.74-2build6 [20.1 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libjson-perl all 4.02000-2 [80.9 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libtypes-serialiser-perl all 1.0-1 [12.1 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libjson-xs-perl amd64 4.020-1build1 [83.7 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libllvm9 amd64 1:9.0.1-12 [14.8 MB]
Get:6 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 libpq5 amd64 14.2-1.pgdg20.04+1 [170 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libsensors-config all 1:3.6.0-2ubuntu1 [6,092 B]
Get:8 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 libsensors5 amd64 1:3.6.0-2ubuntu1 [27.4 kB]
Get:9 http://jp.archive.ubuntu.com/ubuntu focal/main amd64 ssl-cert all 1.0.39 [17.0 kB]
Get:10 http://jp.archive.ubuntu.com/ubuntu focal-updates/main amd64 sysstat amd64 12.2.0-2ubuntu0.1 [448 kB]
Get:11 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 pgdg-keyring all 2018.2 [10.7 kB]
Get:12 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 postgresql-client-common all 238.pgdg20.04+1 [92.0 kB]
Get:13 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 postgresql-client-14 amd64 14.2-1.pgdg20.04+1 [1,614 kB]
Get:14 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 postgresql-common all 238.pgdg20.04+1 [229 kB]
Get:15 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 postgresql-14 amd64 14.2-1.pgdg20.04+1 [15.7 MB]
Fetched 33.3 MB in 3s (13.2 MB/s)
Preconfiguring packages ...
Selecting previously unselected package libcommon-sense-perl.
(Reading database ... 109298 files and directories currently installed.)
Preparing to unpack .../00-libcommon-sense-perl_3.74-2build6_amd64.deb ...
Unpacking libcommon-sense-perl (3.74-2build6) ...
Selecting previously unselected package libjson-perl.
Preparing to unpack .../01-libjson-perl_4.02000-2_all.deb ...
Unpacking libjson-perl (4.02000-2) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../02-libtypes-serialiser-perl_1.0-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.0-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../03-libjson-xs-perl_4.020-1build1_amd64.deb ...
Unpacking libjson-xs-perl (4.020-1build1) ...
Selecting previously unselected package libllvm9:amd64.
Preparing to unpack .../04-libllvm9_1%3a9.0.1-12_amd64.deb ...
Unpacking libllvm9:amd64 (1:9.0.1-12) ...
Selecting previously unselected package libpq5:amd64.
Preparing to unpack .../05-libpq5_14.2-1.pgdg20.04+1_amd64.deb ...
Unpacking libpq5:amd64 (14.2-1.pgdg20.04+1) ...
Selecting previously unselected package libsensors-config.
Preparing to unpack .../06-libsensors-config_1%3a3.6.0-2ubuntu1_all.deb ...
Unpacking libsensors-config (1:3.6.0-2ubuntu1) ...
Selecting previously unselected package libsensors5:amd64.
Preparing to unpack .../07-libsensors5_1%3a3.6.0-2ubuntu1_amd64.deb ...
Unpacking libsensors5:amd64 (1:3.6.0-2ubuntu1) ...
Selecting previously unselected package pgdg-keyring.
Preparing to unpack .../08-pgdg-keyring_2018.2_all.deb ...
Unpacking pgdg-keyring (2018.2) ...
Selecting previously unselected package postgresql-client-common.
Preparing to unpack .../09-postgresql-client-common_238.pgdg20.04+1_all.deb ...
Unpacking postgresql-client-common (238.pgdg20.04+1) ...
Selecting previously unselected package postgresql-client-14.
Preparing to unpack .../10-postgresql-client-14_14.2-1.pgdg20.04+1_amd64.deb ...
Unpacking postgresql-client-14 (14.2-1.pgdg20.04+1) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../11-ssl-cert_1.0.39_all.deb ...
Unpacking ssl-cert (1.0.39) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../12-postgresql-common_238.pgdg20.04+1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postgresql-common'
Unpacking postgresql-common (238.pgdg20.04+1) ...
Selecting previously unselected package postgresql-14.
Preparing to unpack .../13-postgresql-14_14.2-1.pgdg20.04+1_amd64.deb ...
Unpacking postgresql-14 (14.2-1.pgdg20.04+1) ...
Selecting previously unselected package sysstat.
Preparing to unpack .../14-sysstat_12.2.0-2ubuntu0.1_amd64.deb ...
Unpacking sysstat (12.2.0-2ubuntu0.1) ...
Setting up pgdg-keyring (2018.2) ...
Setting up libsensors-config (1:3.6.0-2ubuntu1) ...
Setting up libpq5:amd64 (14.2-1.pgdg20.04+1) ...
Setting up libcommon-sense-perl (3.74-2build6) ...
Setting up ssl-cert (1.0.39) ...
Setting up libsensors5:amd64 (1:3.6.0-2ubuntu1) ...
Setting up libtypes-serialiser-perl (1.0-1) ...
Setting up libjson-perl (4.02000-2) ...
Setting up sysstat (12.2.0-2ubuntu0.1) ...
Creating config file /etc/default/sysstat with new version
update-alternatives: using /usr/bin/sar.sysstat to provide /usr/bin/sar (sar) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/sysstat.service → /lib/systemd/system/sysstat.service.
Setting up libllvm9:amd64 (1:9.0.1-12) ...
Setting up postgresql-client-common (238.pgdg20.04+1) ...
Setting up libjson-xs-perl (4.020-1build1) ...
Setting up postgresql-client-14 (14.2-1.pgdg20.04+1) ...
update-alternatives: using /usr/share/postgresql/14/man/man1/psql.1.gz to provide /usr/share/man/man1/psql.1.gz (psql.1.gz) in auto mode
Setting up postgresql-common (238.pgdg20.04+1) ...
Adding user postgres to group ssl-cert
Creating config file /etc/postgresql-common/createcluster.conf with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql.service → /lib/systemd/system/postgresql.service.
Setting up postgresql-14 (14.2-1.pgdg20.04+1) ...
Creating new PostgreSQL cluster 14/main ...
/usr/lib/postgresql/14/bin/initdb -D /var/lib/postgresql/14/main --auth-local peer --auth-host scram-sha-256 --no-instructions
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /var/lib/postgresql/14/main ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
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
update-alternatives: using /usr/share/postgresql/14/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
Processing triggers for systemd (245.4-4ubuntu3.15) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.7) ...