Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t在RHEL上启动PostgreSQL_Postgresql - Fatal编程技术网

Can';t在RHEL上启动PostgreSQL

Can';t在RHEL上启动PostgreSQL,postgresql,Postgresql,无法启动PostgreSQL-11,我看到以下消息: “”“postgresql-11.service的作业失败,因为控制进程已退出,错误代码为。有关详细信息,请参阅“systemctl状态postgresql-11.service”和“journalctl-xe”。”“” 我想,我已经安装了所有必要的lib。 我应该添加或更改什么 首先,我使用以下命令安装PostgreSQL: yum install https://download.postgresql.org/pub/repos/yum/

无法启动PostgreSQL-11,我看到以下消息: “”“postgresql-11.service的作业失败,因为控制进程已退出,错误代码为。有关详细信息,请参阅“systemctl状态postgresql-11.service”和“journalctl-xe”。”“” 我想,我已经安装了所有必要的lib。 我应该添加或更改什么

首先,我使用以下命令安装PostgreSQL:

yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel- 
7-x86_64/pgdg-redhat11-11-2.noarch.rpm
yum install postgresql11
yum install postgresql11-server
yum install postgresql11-contrib
yum install postgresql11-devel
yum install postgresql11-libs
然后我初始化了数据库并启用了自动启动:

/usr/pgsql-11/bin/postgresql-11-setup initdb
systemctl enable postgresql-11
systemctl start postgresql-11
在键入“systemctl status postgresql-11.service”之后:

在“journalctl-xe”之后:

这是我的代码:

yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat11-11-2.noarch.rpm
yum install postgresql11
yum install postgresql11-server
yum install postgresql11-contrib
yum install postgresql11-devel
yum install postgresql11-libs

查看PostgreSQL日志文件。它会告诉你出了什么问题。查看PostgreSQL日志文件。它会告诉你出了什么问题。
-- Defined-By: systemd
-- Support: http://lists.freedes...
--
-- Unit postgresql-11.service has begun starting up.
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.384 +05 [70442] LOG:  could not bind IPv4 address "127.0.0.1": Address already in use
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.384 +05 [70442] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.387 +05 [70442] LOG:  could not create IPv6 socket for address "::1": Address family not supported by protocol
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.387 +05 [70442] WARNING:  could not create listen socket for "localhost"
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.387 +05 [70442] FATAL:  could not create any TCP/IP sockets
Apr 03 19:04:02 vm-grpapp postmaster[70442]: 2019-04-03 19:04:02.387 +05 [70442] LOG:  database system is shut down
Apr 03 19:04:02 vm-grpapp systemd[1]: postgresql-11.service: main process exited, code=exited, status=1/FAILURE
Apr 03 19:04:02 vm-grpapp systemd[1]: Failed to start PostgreSQL 11 database server.
-- Subject: Unit postgresql-11.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesk...
--
-- Unit postgresql-11.service has failed.
--
-- The result is failed.
Apr 03 19:04:02 vm-grpapp systemd[1]: Unit postgresql-11.service entered failed state.
Apr 03 19:04:02 vm-grpapp systemd[1]: postgresql-11.service failed.
Apr 03 19:04:02 vm-grpapp polkitd[9026]: Unregistered Authentication Agent for unix-process:70430:244359438 (system bus name :1.1876, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, lo
Apr 03 19:29:28 vm-grpapp sshd[69111]: pam_unix(sshd:session): session closed for user root
Apr 03 19:29:28 vm-grpapp systemd-logind[9025]: Removed session 764.
-- Subject: Session 764 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedes...
-- Documentation: http://www.freedes...
--
-- A session with the ID 764 has been terminated.
Apr 03 19:29:33 vm-grpapp sshd[69925]: pam_unix(sshd:session): session closed for user root
Apr 03 19:29:33 vm-grpapp systemd-logind[9025]: Removed session 767.
-- Subject: Session 767 has been terminated
-- Defined-By: systemd
-- Support: http://lists.freedes...
-- Documentation: http://www.freed...
--
-- A session with the ID 767 has been terminated.
Apr 03 19:31:12 vm-grpapp postfix/pickup[70566]: warning: inet_protocols: disabling IPv6 name/address support: Address family not supported by protocol
yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-redhat11-11-2.noarch.rpm
yum install postgresql11
yum install postgresql11-server
yum install postgresql11-contrib
yum install postgresql11-devel
yum install postgresql11-libs