apt install postgresql
Ver Cluster Port Status Owner Data directory Log file 13 main 5432 down postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
Creating new PostgreSQL cluster 13/main ... /usr/lib/postgresql/13/bin/initdb -D /var/lib/postgresql/13/main --auth-local peer --auth-host md5 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". selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... Europe/Warsaw Success. You can now start the database server using: # pg_ctlcluster 13 main start
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
# ps -ef
postgres 133752 1 0 08:27 ? 00:00:00 /usr/lib/postgresql/13/bin/postgres -D /var/lib/postgresql/13/main -c config_file=/ postgres 133754 133752 0 08:27 ? 00:00:00 postgres: 13/main: checkpointer postgres 133755 133752 0 08:27 ? 00:00:00 postgres: 13/main: background writer postgres 133756 133752 0 08:27 ? 00:00:00 postgres: 13/main: walwriter postgres 133757 133752 0 08:27 ? 00:00:00 postgres: 13/main: autovacuum launcher postgres 133758 133752 0 08:27 ? 00:00:00 postgres: 13/main: stats collector postgres 133759 133752 0 08:27 ? 00:00:00 postgres: 13/main: logical replication launcher
# netstat -tlpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 133752/postgres tcp6 0 0 ::1:5432 :::* LISTEN 133752/postgres