Да, установил, служба появилась, но запуск завершается с ошибкой!
[user1@boyishjeans ~]$ sudo systemctl status postgresql
[sudo] password for user1:
○ postgresql.service - PostgreSQL database server
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: inactive (dead)
[user1@boyishjeans ~]$ su -
Password:
[root@boyishjeans ~]# service postgresql start
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details.
[root@boyishjeans ~]# systemctl status postgresql.service
× postgresql.service - PostgreSQL database server
Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2023-03-05 15:55:21 MSK; 34s ago
Process: 4211 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
CPU: 18ms
мар 05 15:55:21 boyishjeans systemd[1]: Starting PostgreSQL database server...
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: "/var/lib/pgsql/data" is missing or empty.
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: Use "/etc/init.d/postgresql initdb" to initialize the database cluster.
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: See /usr/share/doc/postgresql-9.6.24/README.rpm-dist for more information.
мар 05 15:55:21 boyishjeans systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
мар 05 15:55:21 boyishjeans systemd[1]: postgresql.service: Failed with result 'exit-code'.
мар 05 15:55:21 boyishjeans systemd[1]: Failed to start PostgreSQL database server.
[root@boyishjeans ~]#
[user1@boyishjeans ~]$ journalctl -xeu postgresql.service
░░
░░ Начат процесс запуска юнита postgresql.service.
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: "/var/lib/pgsql/data" is missing or empty.
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: Use "/etc/init.d/postgresql initdb" to initialize the database cluster.
мар 05 15:55:21 boyishjeans postgresql-check-db-dir[4211]: See /usr/share/doc/postgresql-9.6.24/README.rpm-dist for more information.
мар 05 15:55:21 boyishjeans systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStartPre= process belonging to unit postgresql.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
мар 05 15:55:21 boyishjeans systemd[1]: postgresql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit postgresql.service has entered the 'failed' state with result 'exit-code'.
мар 05 15:55:21 boyishjeans systemd[1]: Failed to start PostgreSQL database server.
░░ Subject: Ошибка юнита postgresql.service
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Произошел сбой юнита postgresql.service.
░░
░░ Результат: failed.
мар 05 16:05:50 boyishjeans systemd[1]: Starting PostgreSQL database server...
░░ Subject: Начинается запуск юнита postgresql.service
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Начат процесс запуска юнита postgresql.service.
мар 05 16:05:50 boyishjeans postgresql-check-db-dir[4946]: "/var/lib/pgsql/data" is missing or empty.
мар 05 16:05:50 boyishjeans postgresql-check-db-dir[4946]: Use "/etc/init.d/postgresql initdb" to initialize the database cluster.
мар 05 16:05:50 boyishjeans postgresql-check-db-dir[4946]: See /usr/share/doc/postgresql-9.6.24/README.rpm-dist for more information.
мар 05 16:05:50 boyishjeans systemd[1]: postgresql.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStartPre= process belonging to unit postgresql.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
мар 05 16:05:50 boyishjeans systemd[1]: postgresql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit postgresql.service has entered the 'failed' state with result 'exit-code'.
мар 05 16:05:50 boyishjeans systemd[1]: Failed to start PostgreSQL database server.
░░ Subject: Ошибка юнита postgresql.service
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Произошел сбой юнита postgresql.service.
░░
░░ Результат: failed.
lines 37-94/94 (END)