Re: install Postgres on RHED 7

Поиск
Список
Период
Сортировка
От Pepe TD Vo
Тема Re: install Postgres on RHED 7
Дата
Msg-id 1174448879.15161463.1546979292149@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: install Postgres on RHED 7  (Pepe TD Vo <pepevo@yahoo.com>)
Ответы RE: install Postgres on RHED 7  (Ricardo Martin Gomez <rimartingomez@hotmail.com>)
Список pgsql-admin
#ps -aux|grep postgres

postgres 4840 0.0 0.1  396576 16772 ? Ss 12:02 0:00 /usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data/

postgre 4842 0.9 9.9 251496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4844 0.9 9.9 396692 3456 ? Ss 12:02 0:00 posgres:checkpointer
postgre 4845 0.9 9.9 396576 3344 ? Ss 12:02 0:00 posgres:background writer
postgre 4846 0.9 9.9 396576 6248 ? Ss 12:02 0:00 posgres:walwriter
postgre 4847 0.9 9.9 396992 3088 ? Ss 12:02 0:00 posgres:autovacuum launcher
postgre 4848 0.9 9.9 251492 2044 ? Ss 12:02 0:00 posgres:stats collector
postgre 4849 0.9 9.9 396992 2796 ? Ss 12:02 0:00 posgres:logical replication launcher
root 14091 0.0 0.0  112704 980 pts/1 S+ 14:53 0:00 grep --color=auto postgres


Even I stop and restart the service still error

#service postgresql stop
redirecting to /bin/systemctl stop posgresql.service

#service postgresql start
redirecting to /bin/systemctl start postgresql.service
job for posgresql.service failed because the control process existed with error code. See "systemctl status posgresql.service" and "journalctl -xe" for details.

for systemctl status posgresql.service, as same as I posted from previous.

#journalctl -xe

-- Unit user-995.slice has begun shutting down.
Jan 08 14:55:26 hostname polkidtd[1000]: Registered Authentication Agent for unix-proces
Jan 08 14:55:26 hostname polkidtd[1000]: Unregistered Authentication Agent for unix-proc
Jan 08 14:55:26 hostname polkidtd[1000]: Registered Authentication Agent for unix-proces
Jan 08 14:55:26 hostname systemd[1]: Starting PostgreSQL database server ...

-- Subject: Unit posgresql.service has begun start-up
-- Defined-By:systemd
--
-- Unit postgresql.service has begun starting uo.
Jan 08 14:44:31 hostname [pg_ctl[14265]: LOG: could not bind IPv4 socket: Address alrea
Jan 08 14:44:31 hostname [pg_ctl[14265]: HINT: is another postmaster already running on
Jan 08 14:44:31 hostname [pg_ctl[14265]: LOG: could not bind IPv6 socket: address alrea
Jan 08 14:44:31 hostname [pg_ctl[14265]: HINT: Is another postmaster already running on
Jan 08 14:44:31 hostname [pg_ctl[14265]: WrANING: could not create listen socket for "*"
Jan 08 14:44:31 hostname [pg_ctl[14265]: FATAL: could not create any TCP/IP sockets
Jan 08 14:44:32 hostname [pg_ctl[14265]: pg_ctl: could not start server
Jan 08 14:44:32 hostname [pg_ctl[14265]: Examine the log output
Jan 08 14:44:31 hostname systemd[1]: postgresql.service: control process existed, code=e:
Jan 08 14:44:31 hostname systemd[1]: Failed to start PostgreSQL database server.
--Subject:unit postgresql.service has failed
--Defined-By:systemd
--Unit postgresql.service has failed
--
-- the result is failed
Jan 08 14:55:32 hostname systemd[1]: Unit postgresql.service entered failed state.
Jan 08 14:55:32 hostname systemd[1]: Unit postgresql.service failed
Jan 08 14:55:32 hostname polkitd[1000]:


sorry again for multi splitting my fingers to send out.

thank you so much for looking into the problems.

R/
 
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On Tuesday, January 8, 2019 3:21 PM, Pepe TD Vo <pepevo@yahoo.com> wrote:


#ps -aux|grep postgres

postgres 4840 0.0 0.1  396576 16772 ? Ss 12:02 0:00 /usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data/

postgre 4842 0.9 9.9 251496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4844 0.9 9.9 396692 3456 ? Ss 12:02 0:00 posgres:checkpointer
postgre 4845 0.9 9.9 396576 3344 ? Ss 12:02 0:00 posgres:background writer
postgre 4846 0.9 9.9 396576 6248 ? Ss 12:02 0:00 posgres:walwriter
postgre 4847 0.9 9.9 396992 3088 ? Ss 12:02 0:00 posgres:autovacuum launcher
postgre 4848 0.9 9.9 251492 2044 ? Ss 12:02 0:00 posgres:stats collector
postgre 4849 0.9 9.9 396992 2796 ? Ss 12:02 0:00 posgres:logical replication launcher
root 14091 0.0 0.0  112704 980 pts/1 S+ 14:53 0:00 grep --color=auto postgres


Even I stop and restart the service still error

#service postgresql stop
redirecting to /bin/systemctl stop posgresql.service

#service postgresql start
redirecting to /bin/systemctl start postgresql.service
job for posgresql.service failed because the control process existed with error code. See "systemctl status posgresql.service" and "journalctl -xe" for details.

for systemctl status posgresql.service, as same as I posted from previous.

#journalctl -xe

-- Unit user-995.slice has begun shutting down.
Jan 08 14:55:26 hostname polkidtd[1000]: Registered Authentication Agent for unix-proces
Jan 08 14:55:26 hostname polkidtd[1000]: Unregistered Authentication Agent for unix-proc
Jan 08 14:55:26 hostname polkidtd[1000]: Registered Authentication Agent for unix-proces
Jan 08 14:55:26 hostname systemd[1]: Starting PostgreSQL database server ...

-- Subject: Unit posgresql.service has begun start-up
-- Defined-By:systemd
--
-- Unit postgresql.service has begun starting uo.
Jan 08 14:44:31 hostname [g_c tl[14265]: LOG: could not bind IPv4 socket: Address alrea
Jan 08 14:44:31 hostname [g_c tl[14265]:
Jan 08 14:44:31 hostname [g_c tl[14265]:
Jan 08 14:44:31 hostname [g_c tl[14265]:
Jan 08 14:44:31 hostname [g_c tl[14265]:






Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On Tuesday, January 8, 2019 3:08 PM, Pepe TD Vo <pepevo@yahoo.com> wrote:


#ps -aux|grep postgres

postgres 4840 0.0 0.1396576 16772 ? Ss 12:02 0:00 /usr/pgsql-11/bin/postmaster -D /var/lib/pgsql/11/data/

postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
postgre 4/842 0.9 9.9 352496 1928 ? Ss 12:02 0:00 posgres:logger
 
Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On Tuesday, January 8, 2019 1:41 PM, Ricardo Martin Gomez <rimartingomez@hotmail.com> wrote:


#yiv9180917263 P {margin-top:0;margin-bottom:0;}
Hi, but the ERROR is: "pg_ctl[6896]:HINT: Is another postmaster alreadying runnin ...y"

Please, Can you check this?
# ps -aux |grep postgres

Regards.

______________________
Saludos 
Ing. Ricardo Martín Gomez
DBA - SysAdmin

De: Pepe TD Vo <pepevo@yahoo.com>
Enviado: martes, 8 de enero de 2019 15:32
Para: Kris Deugau; pgsql-admin@lists.postgresql.org
Asunto: Re: install Postgres on RHED 7
 
sorry, my fingers split before I can finish all typing:




finally the SA installed the OS libraries and I installed the server packages successful but not postgres11-contrib.
#yum install postgresql11-server postgresql11-contrib  --> I see no package postgresql11-contrib availabe
Dependencies resolved
Transaction test succeeded
running transaction 
installing: libicu-50.1.2.17.el7.x86_64   1/2
Installing: postgresql11-11.1-1PGDG.rhel7.x86_64   2/3
failed to link /usr/bin/psql -> /etc/alternative/pgsql-psql: /usr/bin/pgql exists and it's not a a symlink
failed to link /usr/bin/clusterdb -> /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exist and itis not a symlink

failed to link /usr/bin/createdb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exist and it is not a symlink
failed to link /usr/bin/createuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuse exist and it is not a symlink
failed to link /usr/bin/dropdb -> /etc/alternatives/pgsql-dropdb: /usr/bin/dropdb exist and it is not a symlink
failed to link /usr/bin/dropuser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exist and it is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_basebackup: /usr/bin/pg_basebackup exist and itis not a symlink
failed to link /usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exist and it is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_dumpall: /usr/bin/pg_dumpall exist and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_restore: /usr/bin/pg_restore exist and it is not a symlink
failed to link /usr/bin/reindexdbl -> /etc/alternatives/pgsq-reindexdb: /usr/bin/reindexdb exist and it is not a symlink
failed to link /usr/bin/vacuumdb -> /etc/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdbexist and it is not a symlink

installing:  postgresql11-server-11.1-1PGDB.rhel7.x86_64   1/3

Verifying:  postgresql11-11.1-1PGDB.rhel7.x86_64   1/3
Verifying: libicu-50.1.2-17.el7.x86_64   2/3
Verirying:  postgresql11-server-11.1-1PGDB.rhel7.x86_64   3/3

Installed:
postgresql11-server.x86_64 0:11.1-1PGDG.rhel7
Dependency Installed:
libicu.x86_64 0:50.1.2-17.el7   postgres11.x86_64 0:11.1-1PGDG.rhel 7

Completed!

After the server successful install, I initialize the database an

# /usr/pgsql-11/bin/postgresql-11-setup initdb
Initializing database .....OK

# systemctl enable postgres-11
created symlink from /etc/systemd/system/multi-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/postgeresql-11.service.

# systemctl start postgresql-11
# systemctl status postgresql-11
postgresql-11.service - PostgreSQL 11 database server
Loaded:loaded (/usr/lib/systemd/system/postgresql-11.service; enabled; vendor preset: disabled)
Active: active (running) since Tues 2019-01-08 12:02:05 EST; 12s ago
and so on ....

# service postgresql initdb
hint: the perferred way to do this is now "postgresql-set initdb"
Initializing database ... OK

but when I tried to correct the postgres.conf with the listen_addresses = '*' and port=5432.  Restart the postgresql server I get an error.

redirecting to /bin/systemctl start postgresql.service

job for postgresql.service failed because the control proces exited with error code.  See "systemctl status postgresql.service" and "jouralctl -xe" for details.

I run: 
#systemctl status postgresql.service -l
postgresql.service - PostgreSQL database server
Loaded:loaded (/usr/lib/systemd/system/postgresql.service; diabled; vendor preset: disabled)
Active: failed (result: exit-code) since Tues 2019-01-08 12:34:43 EST; 2min 22s ago
Process: 6896 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=existed, status=1/FAILURE
Process: 688 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=existed, status=0/SUCCESS) 
 
Jan 08 12:34:42 hostname pg_ctl[6896]:HINT: Is another postmaster alreadying runnin ...y
Jan 08 12:34:42 hostname pg_ctl[6896]:LOG: could not bing IPV6 socket: Addressa ...se
Jan 08 12:34:42 hostname pg_ctl[6896]:HINT: Is another postmaster alreadying runnin ...y
Jan 08 12:34:42 hostname pg_ctl[6896]:WARNING: could not create any TCP/IP sockets
Jan 08 12:34:43 hostname pg_ctl[6896]:pg_ctl: could nto start server
Jan 08 12:34:43 hostname pg_ctl[1]: postgresql.service: control process existed, c...=1
Jan 08 12:34:43 hostname pg_ctl[1]: Failed to start PostgreSQL database server.
Jan 08 12:34:43 hostname pg_ctl[1]: Unit postgresql.service entered failed state.
Jan 08 12:34:43 hostname pg_ctl[1]: postgresql.service failed

Hint: Some lines were ellipsized, use -l to show in full

what I did wrong here?  Do I need to add listen_addresses = '*' and port = 5432 on both /var/lib/pgsql/data/postgres.conf and /var/lib/pgsql/11/data/postgres.conf ?

thank you for all your help.

v/r,

Bach-Nga

No one in this world is pure and perfect.  If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.
To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kindly.
*** Genuinely rich *** Faithful talent *** Sharing success


On Thursday, December 20, 2018 4:17 PM, Kris Deugau <kdeugau@vianet.ca> wrote:


Pepe TD Vo wrote:
> May you suggest me exactly repositories packages needed for install
> PostgreSQL?  Seem to me this link,
> https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/
> all rpm files needed another dependencies.  Total more than 300 files
> and only a few allow me to install the rest of them needed another
> dependencies and didn't give me exactly what they are.

Some of them will be from the stock Red Hat repositories, and some will
be from the PGDG repository.  I haven't used that repository, and I
haven't done much on an RPM-based system for a while so I can't give you
any more specific information.

It's possible - but very tedious and difficult - to install a package
with a large dependency tree entirely by hand.  I *have* done this
myself in the past, and I recall a few cases where it literally took two
or three hours to get everything installed to support the specific
package I started out trying to install.  This is why tools like yum
were developed;  they do the work of checking through the list to see
what's required, and where it can be installed from.

This isn't specific to Postgres;  it's how the underlying OS package
system works.  You may want to see if someone in your office has more
experience installing packages on RHEL with yum and ask them to give you
a hand.  You've got several issues around yum's basic operation that you
need to fix, and local network/systems admins should know enough about
your setup to help a lot faster.


-kgd











В списке pgsql-admin по дате отправления:

Предыдущее
От: Pepe TD Vo
Дата:
Сообщение: Re: install Postgres on RHED 7
Следующее
От: Ricardo Martin Gomez
Дата:
Сообщение: RE: install Postgres on RHED 7