Author Topic: how to install the LATEST version of postgresql (v13)  (Read 4902 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
how to install the LATEST version of postgresql (v13)
« on: November 18, 2020, 09:16:15 PM »
Does anyone know how to install the latest version of postgresql, 13, in centos 7 with centos web panel? (The panel by default installs 9.2). I don't know if it is with yum and the panel or directly with the ssh shell. What is the best way for the server and the panel to work ok? Thank you!

Offline
*
Re: how to install the LATEST version of postgresql (v13)
« Reply #1 on: December 24, 2020, 12:24:21 PM »
Hi. this worked for me

Install Repo :
Code: [Select]
dnf -y install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpmDisable default Repo :
Code: [Select]
dnf -qy module disable postgresqlNow you will have options installing any version from 9.5 to 13 so we want 13, installing from the CWP panel, so we need to disable all other versions except for 13
Edit pgdg-redhat-all.repo and disable by changing "1" in to "0" under other versions at line "enabled=1" :
Code: [Select]
nano /etc/yum.repos.d/pgdg-redhat-all.repoSave and Exit / Quit (for nano - personal choice is Ctrl+o > Enter > Ctrl+x
Run Update :
Code: [Select]
dnf -y updateNow you should see only v13, Reboot, Login to panel, install from it, wait, trying to refresh a blank page will show, no post install summary or options, now Reboot again (just in case) and phpPgAdmin will show, but server will not start, enable it in panel in "Services Config" > "Startup Services", again  > Reboot, but service wont start, or will try to start with an error, and stop. Execute as root :
Code: [Select]
chown -R postgres:postgres /usr/pgsql-13/bin/.. and now :
Code: [Select]
sudo su - postgres... finaly :
Code: [Select]
/usr/pgsql-13/bin/initdb -D /var/lib/pgsql/13/data/ Reboot - and voila ... v13 up and running ..

 

Offline
*
Re: how to install the LATEST version of postgresql (v13)
« Reply #2 on: December 24, 2020, 12:28:36 PM »
Now if you want latest phpPgAdmin  this is how (as root) :

Code: [Select]
mv /usr/local/cwpsrv/var/services/phpPgAdmin /usr/local/cwpsrv/var/services/phpPgAdmin.baks
cd /usr/local/cwpsrv/var/services/
wget https://github.com/phppgadmin/phppgadmin/releases/download/REL_7-13-0/phpPgAdmin-7.13.0.zip
unzip phpPgAdmin-7.13.0.zip
mv phpPgAdmin-7.13.0 phpPgAdmin

for other versions just change the version numbers in the commands that use them