Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghf0M-0005xB-CV for pgsql-admin@arkaria.postgresql.org; Thu, 10 Jan 2019 18:24:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghf0L-0006Y7-0s for pgsql-admin@arkaria.postgresql.org; Thu, 10 Jan 2019 18:24:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghf0K-0006Y0-MP for pgsql-admin@lists.postgresql.org; Thu, 10 Jan 2019 18:24:32 +0000 Received: from sonic306-3.consmr.mail.bf2.yahoo.com ([74.6.132.42]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghf0G-0000NX-1G for pgsql-admin@lists.postgresql.org; Thu, 10 Jan 2019 18:24:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1547144664; bh=5XH6GTjgWZXmRO2Tf9K45cZESlQZCd6nUhqbynu1pDA=; h=Date:From:Reply-To:To:Cc:Subject:References:From:Subject; b=RuQcEtcJKJZ+COTtMw65UDNbhGWo6Q86FjQku7FFJLtYPzxwEjc+GNT91mpxbtv1cLZfI2liozgfZQRjp3vQZeUCwHucvcSPG+n/33VLvxXV+V1BanA//Q04Q2r5Mj4zWC8Fru5w/RvAdT2H8eH9jQYSZ8/CI1hLtOMrH7TKvAgGYb6Hb7JHBP4upGA0lRUFxqHtnUVa+jdxuQcookp3OeYEiq1PIOUXG1Q5v+Kkds+Ta7+O8+nm48ZM/xW9FEqcDZpeP6xnh0/6L7rrn2kHhZygh+Fh2GcmtFzCr8VSAtchvHbdElvPIoK6gxb3nZP6SZLOsKae+K/0aGW0UQitvg== X-YMail-OSG: 0lNoxJwVM1nopC27nac1oeeRuXVl0bKYrOs2wwp9beGAc27FWRPxcDQBfpmOt6v XDTb7ZCctQNkP5oGlzsfSPa0FNmHaWL1nE1mMqc_B_._xMFryRCrMbM.dDpoLUCP6yVg5l2HhTTo wZTIjNMBq09RMBHPtfSAd9P2VQRBdO4Bm0WB2yFYCfIke_BPxU2okPEyi5ctsYSI1g.ystqAb6N5 BoUtfAl.LlW6J0QRyj2hqtlpsJ3jwRyoWfS8ZrlcZT91NWc6ENp0zEiGp_VbpxcEq9ZJbkKchtEA mfzhEiIM58Y3aH7sJIqtzuO0bkvhmNzfP0L_V1ZLbNq1QdMx2k_9MovhkT8lXLwIfcLROY_BzE6C bGy5qoiDuDjDZ3CxBy.jQM_RSb4ipfktEotQHJn3rYkxIuQShJuuG6H6bsE2KvOWCb2Hk9HPiec6 jNATcY9zltp32vK72mUfeZ8IYhhRiOhtyKpM.NIbztr9pHKPVWcFsV2dNzlolAviZx49YsguVOur EEwQpINTiCPQOayakTmLuUdZnnV.Y6MowKrjAJX4NBO.HkC.JCeiLCkh7kZocudW0TgsK4vNMXIX xQPm_bzTn2zE3raZc_dmbTRBBUu0eq.KkSG.aKSc_g9R3V7Rlw53DnOvcF.BgeolDJd6vYRYufwz ZNhB2SzjjhefN97Dqah4K2WJd.xL1av2N1N42PIraIbBoRGgJTGOPWHpQ9KYN8.fqLK.3YY3Zx3W b3MSqV_EemwV4WBSnw8UsZRImSIg87uhUWQ1Lpc.u5G50MXjuOBXgVBVh3y.yrMAGUTGwoeonhsz 9tIlsKptEB0_vOTng_cVPCvRZ5FjLTtzInxdDWgjx6WxhyDDdEu0vQaxALvOoElMhrwvYCMdLIP9 KMeJD2KpstzIKglf.INOraD0cQK31NvrDxtyEeCMcMHTNauZ5V2ToSlsCTio4ZTymNw5L.wZJ45U 8_7T51IwuK3YGYXkn1kWmE6GqaKJF8ErIpkt38mLhLB0aGok1q8Iz.kX4I69R8aCrwsQrayCyH.N 70n0EkqjwMU8USqIh_QqUWGp83tLpokgbcNKuQkieC84xqPdmeuYQ6M_PA_G55.B7hj_YpyCBkSf X_10- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.bf2.yahoo.com with HTTP; Thu, 10 Jan 2019 18:24:24 +0000 Date: Thu, 10 Jan 2019 18:24:22 +0000 (UTC) From: Pepe TD Vo Reply-To: Pepe TD Vo To: Pepe TD Vo , Shreeyansh Dba Cc: Kris Deugau , "pgsql-admin@lists.postgresql.org" Message-ID: <1574367540.16422460.1547144662631@mail.yahoo.com> Subject: Re: install Postgres on RHED 7 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16422459_388105683.1547144662624" References: <1574367540.16422460.1547144662631.ref@mail.yahoo.com> X-Mailer: WebService/1.1.12857 YahooMailNeo Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Content-Length: 60741 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_16422459_388105683.1547144662624 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable SA helped and removed all the lock files, he reconfigured the PAMd and rebo= ot the server.=C2=A0 Now nothing is working.=C2=A0 Postgresql is not runnin= g and can't start.=C2=A0 The lock file is not existed any more.=C2=A0 Grep = the port 5432, not running.=C2=A0 How to fix the issue? v/r,=C2=A0Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Thursday, January 10, 2019 11:04 AM, Pepe TD Vo w= rote: =20 sorry I was out yesterday. I stop the services and kill -9 all the postgresql process and run ps aux|g= rep postgres.=C2=A0 Nothing is running and start the service as 'service po= sgresql start" I still get eh error=C2=A0'Job for postgresql.service failed= because the control process existed with error code.=C2=A0 See "systemctl = status posgresql.service" and "journalctl -xe" for details As the systemctl status posgresql.service I get Loaded:loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor= preset: disabled) Active: failed (Result: exit-code) since Thu 2019-091-10 09:18:24 EST; 34s = ago Active: failed (Result: exit-code) since Thu 2019-091-1009:18:24 EST; 34s a= goProcess: 20639 ExecStart=3D//usr/bin/pg_ctl start =E2=80=93D ${PGDATA} = =E2=80=93s=E2=80=93o =E2=80=93p ${PGPORT} =E2=80=93w =E2=80=93t 300 (code= =3Dexisted, status=3D1/FAILURE)Jan 10 09:18:23 hostname systemd[1]: Startin= g PosgreSQL databaseserver=E2=80=A6Jan 10 09:18:23 hostname [pg_ctl[20639]:= FATAL: could not remove old lock file =E2=80=9C/t=E2=80=A6edJan 10 09:18:2= 3 hostname [pg_ctl[20639]: HINT: the file seemsaccidentally lef ov =E2=80= =A6n.Jan 10 09:18:24 hostname [pg_ctl[20639]: pg_ctl: could not startserver= Jan 10 09:18:24 hostname systemd[1]:postgresql.service: controlprocess exis= ted, c=E2=80=A6=3D1Jan 10 09:18:24 hostname systemd[1]:Failed to start Post= greSQLdatabase server.Jan 10 09:18:24 hostname systemd[1]:Unit postgresql.s= erviceentered failed state.Jan 10 09:18:24 hostname systemd[1]:postgresql.s= ervice failedHint: some lines were ellipsized, use =E2=80=93l to show in fu= ll.=C2=A0From journal-xe, I see:--Unit session -10325.scope has finishedsta= rting up.--The start-up result is doneJan 10 09:20:01 hostname systemd[1]: = Startingsession 10325 of user root--Unit session-10325.scope has begun star= ting upJan 10 09:20:01 hostname systemd[1]: Removed sliceUser Slice of root= --Unit user-0.slice has finished shutting down.Jan 10 09:20:01 hostname sys= temd[1]: StoppingUser Slice of root--Unit user-0.slice has begun shutting d= own. =C2=A0When I grep postgres from systemctl, it loaded failedfailed#syst= emctl list-units|grep posgresqla postgresql-11.service loaded failed failed= PostgreSQL 11 database server#pg_ctl startpg_ctl: cannot be run as rootPlea= se log in (using, e.g., =E2=80=9Csu) as the(unprivileged) user that will ow= n the server process.# su postgres[postgres@hostname]$ pg_ctl startPg_ctl: = no database directory specified andenvironment variable PGDATA unsetTry =E2= =80=9Cpg_ctl =E2=80=93help=E2=80=9D for more information. I am new to Postgresql and any information provide will be appreciated. thank you. v/r, =C2=A0Bach-Nga No one in this world is pure and perfect.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Wednesday, January 9, 2019 2:16 AM, Shreeyansh Dba wrote: =20 Try to specify the exact name for the PostgreSQL service, which you can fi= nd under the list of services, using systemctl. systemctl list-units|grep postgresql Then you can use the service or systemctl command.OrBetter to use pg_ctl to= start/stop PostgreSQL server. Thanks & Regards, Shreeyansh DBA Team www.shreeyansh.com On Wed, Jan 9, 2019 at 12:03 AM Pepe TD Vo wrote: sorry, my fingers split before I can finish all typing: =20 finally the SA installed the OS libraries and I installed the server packa= ges successful but not postgres11-contrib.#yum install postgresql11-server = postgresql11-contrib=C2=A0 --> I see no package postgresql11-contrib availa= beDependencies resolvedTransaction test succeededrunning transaction=C2=A0i= nstalling: libicu-50.1.2.17.el7.x86_64=C2=A0 =C2=A01/2Installing: postgresq= l11-11.1-1PGDG.rhel7.x86_64=C2=A0 =C2=A02/3failed to link /usr/bin/psql -> = /etc/alternative/pgsql-psql: /usr/bin/pgql exists and it's not a a symlinkf= ailed 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=C2=A0exist and it is not a symlinkfailed to link /usr/bin/crea= teuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuse=C2=A0exist= 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 symlinkfailed to link /usr/bin/dropuser -> /et= c/alternatives/pgsql-dropuser: /usr/bin/dropuser exist and it is not a syml= inkfailed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_base= backup: /usr/bin/pg_basebackup exist and itis not a symlinkfailed to link /= usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exist = and it is not a symlinkfailed to link /usr/bin/pg_dumpall -> /etc/alternati= ves/pgsql-pg_dumpall: /usr/bin/pg_dumpall exist and it is not a symlinkfail= ed 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: /us= r/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:=C2=A0=C2=A0postgresql11-server-11.1-1PGDB.rhel7.x86_64=C2=A0=C2= =A0 1/3 Verifying:=C2=A0 postgresql11-11.1-1PGDB.rhel7.x86_64=C2=A0 =C2=A01/3Verify= ing: libicu-50.1.2-17.el7.x86_64=C2=A0 =C2=A02/3Verirying:=C2=A0 postgresql= 11-server-11.1-1PGDB.rhel7.x86_64=C2=A0 =C2=A03/3 Installed:postgresql11-server.x86_64 0:11.1-1PGDG.rhel7Dependency Installed= :libicu.x86_64 0:50.1.2-17.el7=C2=A0 =C2=A0postgres11.x86_64 0:11.1-1PGDG.r= hel 7 Completed! After the server successful install, I initialize the database an # /usr/pgsql-11/bin/postgresql-11-setup initdbInitializing database .....OK # systemctl enable postgres-11created symlink from /etc/systemd/system/mult= i-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/postge= resql-11.service. # systemctl start postgresql-11# systemctl status postgresql-11postgresql-1= 1.service - PostgreSQL 11 database serverLoaded:loaded (/usr/lib/systemd/sy= stem/postgresql-11.service; enabled; vendor preset: disabled)Active: active= (running) since Tues 2019-01-08 12:02:05 EST; 12s agoand so on .... # service postgresql initdbhint: the perferred way to do this is now "postg= resql-set initdb"Initializing database ... OK but when I tried to correct the postgres.conf with the listen_addresses =3D= '*' and port=3D5432.=C2=A0 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 er= ror code.=C2=A0 See "systemctl status postgresql.service" and "jouralctl -x= e" for details. I run:=C2=A0#systemctl status postgresql.service -lpostgresql.service - Pos= tgreSQL database serverLoaded:loaded (/usr/lib/systemd/system/postgresql.se= rvice; diabled; vendor preset: disabled)Active: failed (result: exit-code) = since Tues 2019-01-08 12:34:43 EST; 2min 22s agoProcess: 6896 ExecStart=3D/= usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=3Dexis= ted, status=3D1/FAILUREProcess: 688 ExecStartPre=3D/usr/bin/postgresql-chec= k-db-dir ${PGDATA} (code=3Dexisted, status=3D0/SUCCESS)=C2=A0=C2=A0Jan 08 1= 2:34:42 hostname pg_ctl[6896]:HINT: Is another postmaster alreadying runnin= ...yJan 08 12:34:42 hostname pg_ctl[6896]:LOG: could not bing IPV6 socket:= Addressa ...seJan 08 12:34:42 hostname pg_ctl[6896]:HINT: Is another postm= aster alreadying runnin ...yJan 08 12:34:42 hostname pg_ctl[6896]:WARNING: = could not create any TCP/IP socketsJan 08 12:34:43 hostname pg_ctl[6896]:pg= _ctl: could nto start serverJan 08 12:34:43 hostname pg_ctl[1]: postgresql.= service: control process existed, c...=3D1 Jan 08 12:34:43 hostname pg_ctl[1]: Failed to start PostgreSQL database ser= ver. 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?=C2=A0 Do I need to add listen_addresses =3D '*' and = port =3D 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.=C2=A0 If you avoid people for the= ir 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 t= o 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=20 On Thursday, December 20, 2018 4:17 PM, Kris Deugau = wrote: =20 Pepe TD Vo wrote: > May you suggest me exactly repositories packages needed for install=20 > PostgreSQL?=C2=A0 Seem to me this link,=20 > https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/ = =20 > all rpm files needed another dependencies.=C2=A0 Total more than 300 file= s=20 > and only a few allow me to install the rest of them needed another=20 > dependencies and didn't give me exactly what they are. Some of them will be from the stock Red Hat repositories, and some will=20 be from the PGDG repository.=C2=A0 I haven't used that repository, and I=20 haven't done much on an RPM-based system for a while so I can't give you=20 any more specific information. It's possible - but very tedious and difficult - to install a package=20 with a large dependency tree entirely by hand.=C2=A0 I *have* done this=20 myself in the past, and I recall a few cases where it literally took two=20 or three hours to get everything installed to support the specific=20 package I started out trying to install.=C2=A0 This is why tools like yum= =20 were developed;=C2=A0 they do the work of checking through the list to see= =20 what's required, and where it can be installed from. This isn't specific to Postgres;=C2=A0 it's how the underlying OS package= =20 system works.=C2=A0 You may want to see if someone in your office has more= =20 experience installing packages on RHEL with yum and ask them to give you=20 a hand.=C2=A0 You've got several issues around yum's basic operation that y= ou=20 need to fix, and local network/systems admins should know enough about=20 your setup to help a lot faster. -kgd =20 =20 =20 =20 ------=_Part_16422459_388105683.1547144662624 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
SA helped and removed all the lock files, he reconfigured the P= AMd and reboot the server.  Now nothing is working.  Postgresql i= s not running and can't start.  The lock file is not existed any more.=   Grep the port 5432, not running.  How to fix the issue?<= /div>

v/r,
 
= Bach-Nga

No one in this world is pure and perfect.  If you avoid peop= le for their mistakes you will be alone. So judge less, love and forgive mo= re.
To call him a dog = hardly seems to do him justice though in as much as he had four legs, a tai= l, 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 succ= ess

On Thursday, January 10, 20= 19 11:04 AM, Pepe TD Vo <pepevo@yahoo.com> wrote:
<= /font>


s= orry I was out yesterday.

I stop the= services and kill -9 all the postgresql process and run ps aux|grep postgr= es.  Nothing is running and start the service as 'service posgresql st= art" I still get eh error 
'Job for postgresql.service failed because= the control process existed with error code.  See "systemctl status p= osgresql.service" and "journalctl -xe" for details


As the systemctl statu= s posgresql.service I get

Loaded:loa= ded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: d= isabled)

Active: failed (Result: exi= t-code) since Thu 2019-091-10 09:18:24 EST; 34s ago

Active: failed (Result: exit= -code) since Thu 2019-091-10 09:18:24 EST; 34s ago
Process: 20639 ExecSt= art=3D//usr/bin/pg_ctl start =E2=80=93D ${PGDATA} =E2=80=93s =E2=80=93o =E2=80=93p ${PGPORT} =E2=80=93w =E2=80=93t 300 (code=3Dexisted, = status=3D1/FAILURE)
Jan 10 09:18:= 23 hostname systemd[1]: Starting PosgreSQL database server=E2=80=A6
Jan 10 09:18:23 h= ostname [pg_ctl[20639]: FATAL: could not remove old lock file =E2=80=9C/t=E2=80=A6ed<= /span>
Jan 10 09:18:23 hostname [pg_ctl[= 20639]: HINT: the file seems accidentally lef ov =E2=80=A6n.
J= an 10 09:18:24 hostname [pg_ctl[20639]: pg_ctl: could not start server
Jan 10 09:18:24 hostname s= ystemd[1]:postgresql.service: control process existed, c=E2=80=A6=3D1
J= an 10 09:18:24 hostname systemd[1]:Failed to start PostgreSQL database server.
Jan 10 09:18:24 = hostname systemd[1]:Unit postgresql.service entered failed state.
Jan 10 09:1= 8:24 hostname systemd[1]:postgresql.service failed
Hint: some lines were ellipsized, use =E2=80=93l to show = in full.
 
From journal-xe, I see:
--Unit sessio= n -10325.scope has finished starting up.
Jan 10 09:20:01 hostname systemd[1]: Starting session 10325 of user root
--Unit session-10325.scope has begun starting up
Jan 10 09:20:01 hos= tname systemd[1]: Removed slice User Slice of root
--Unit user-0.slice has finished shutting down.
Jan 10 09:20:01 hostname syste= md[1]: Stopping User Slice of root
--Unit user-0.slice has begun shutting down.
 
When I grep postgres from systemctl,= it loaded failed failed
#sys= temctl list-units|grep posgresql
a postgresql-11.service loaded failed failed
PostgreSQL 11 datab= ase server
= #pg_ctl start
pg_ctl: cannot be run as root
Please log in (using, e.g., =E2=80=9Csu) as the (unprivileged) user that will own the server process.
# su postgres
[postgres@hostname]$ pg_ctl= start
Pg_c= tl: no database directory specified and environment variable PGDATA unset
Try = =E2=80=9Cpg_ctl =E2=80=93help=E2=80=9D for more information.


<= div dir=3D"ltr" id=3D"yiv1674156625yui_3_16_0_ym19_1_1547132337597_11964">I= am new to Postgresql and any information provide will be appreciated.

thank you.

v/r,

 
Bach-Nga
=
No one in this world is pure and perfect.  If y= ou avoid people for their mistakes you will be alone. So judge less, love a= nd forgive more.
<= span class=3D"yiv1674156625sg" id=3D"yiv1674156625yui_3_16_0_ym19_1_1547132= 337597_19626">To call him a dog hardly seems to do him justice thoug= h in as much as he had four legs, a tail, and barked, I admit he was, to al= l outward appearances. But to those who knew him well, he was a perfect gen= tleman (Hermione Gingold)

**Live simply **Love generously **Care deeply **Speak kin= dly.
*** Genuinely = rich *** Faithful talent *** Sharing success


On Wednesday, January 9, 2019 2:16 AM, Shreeyansh Dba <shr= eeyansh2014@gmail.com> wrote:


<= div id=3D"yiv1674156625">
T= ry to specify the exact name for the PostgreSQL service, which you can find= under the list of services, using systemctl.

systemctl list-units|grep postgresql

Then you can use the service or systemctl command.
Or
Better to use pg_ctl to start/stop PostgreSQL server.

Thanks & Regards,
Shreeyansh DBA Team<= /b>
www.shreeyansh.com=


On Wed, Jan = 9, 2019 at 12:03 AM Pepe TD Vo <pepevo@yahoo.com> wrote:
sorry, my finge= rs split before I can finish all typing:




=
finally t= he SA installed the OS libraries and I installed the server packages succes= sful but not postgres11-contrib.
#yum install postgresql11-server p= ostgresql11-contrib  --> I see no package postgresql11-contrib avai= labe
Dependencies reso= lved
Transaction test succeed= ed
running transaction <= /div>
installing: libicu-50.1.2.17.= el7.x86_64   1/2
In= stalling: postgresql11-11.1-1PGDG.rhel7.x86_64   2/3
failed to link /usr/bin/psql -> /etc/a= lternative/pgsql-psql: /usr/bin/pgql exists and it's not a a symlink
<= div dir=3D"ltr" id=3D"yiv1674156625gmail-m_5907174653175733993yiv8271349837= yui_3_16_0_ym19_1_1546952750506_184010">failed to link /usr/bin/clusterdb -= > /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exist and itis n= ot a symlink

failed to link /usr/bin/c= reatedb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exis= t and it is not a symlink
fai= led 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/alternativ= es/pgsql-dropdb: /usr/bin/dropdb exist and it is not a symlink
failed to link /usr/bin/dro= puser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exist and i= t is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-p= g_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 i= t is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_d= umpall: /usr/bin/pg_dumpall exist and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_resto= re: /usr/bin/pg_restore exist and it is not a symlink
failed to link /usr/bin/reindex= dbl -> /etc/alternatives/pgsq-reindexdb: /usr/bin/reindexdb exist and it= is not a symlink
failed to link /usr/bin/vacuumdb -> /et= c/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdbexist and it is not a symli= nk

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

Verifying:  postgresql11-11.1-1PGDB.rhel7= .x86_64   1/3
Verif= ying: 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:<= /span>
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/syste= m/multi-user.target.wants/postgresql-11.service to /usr/lib/systemd/system/= postgeresql-11.service.

# systemctl st= art postgresql-11
# systemctl= status postgresql-11
postgre= sql-11.service - PostgreSQL 11 database server
Loaded:loaded (/usr/lib/systemd/system/postgresql-11.serv= ice; 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 "postgr= esql-set initdb"
Initializing= database ... OK

but when I tried to c= orrect the postgres.conf with the listen_addresses =3D '*' and port=3D5432.=   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 post= gresql.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 T= ues 2019-01-08 12:34:43 EST; 2min 22s ago
Process: 6896 ExecStart=3D/usr/bin/pg_ctl start -D ${PGDATA} -= s -o -p ${PGPORT} -w -t 300 (code=3Dexisted, status=3D1/FAILURE
Process: 688 ExecStartPre=3D/usr/bin/pos= tgresql-check-db-dir ${PGDATA} (code=3Dexisted, status=3D0/SUCCESS) 
 
Jan 08 12:34:42 hostname pg_ctl[6896]:HINT: Is another postmaster= alreadying runnin ...y
Jan 0= 8 12:34:42 hostname pg_ctl[6896]:LOG: could not bing IPV6 socket: Addressa = ...se
Jan 08 12:34:42 hostnam= e 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 sta= rt server
Jan 08 12:34:43 hos= tname pg_ctl[1]: postgresql.service: control process existed, c...=3D1
Jan 08 12:34:4= 3 hostname pg_ctl[1]: Failed to start PostgreSQL database server.
Jan 08 12:34:43 ho= stname pg_ctl[1]: Unit postgresql.service entered failed state.
Jan 08 12:34:43 hostn= ame 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 =3D '*' and port =3D 5432 on both /var/lib/p= gsql/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 peopl= e for their mistakes you will be alone. So judge less, love and forgive mor= e.
To call him a dog hardly seems to do him justice tho= ugh 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 g= entleman (Hermione Gingold)

**Live simply **L= ove generously **Care deeply **Speak kindly.
*= ** Genuinely rich *** Faithful talent *** Sharing success


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


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.&nb= sp; Total more than 300 files
> and only a few allow = me to install the rest of them needed another
> depen= dencies and didn't give me exactly what they are.

Some of them will be from the stock Red Hat repositories, and s= ome will
be from the PGDG repository.  I haven't us= ed that repository, and I
haven't done much on an RPM-ba= sed system for a while so I can't give you
any more spec= ific 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 t= ook two
or three hours to get everything installed to su= pport the specific
package I started out trying to insta= ll.  This is why tools like yum
were developed;&nbs= p; 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 underlyi= ng OS package
system works.  You may want to see if= someone in your office has more
experience installing p= ackages 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 e= nough about
your setup to help a lot faster.


-kgd

<= /div>








------=_Part_16422459_388105683.1547144662624--