I currently installed v9.6
1. Add it to repo
|
yum install http://yum.postgresql.org/9.6/redhat/rhel-6-x86_64/pgdg-redhat96-9.6-3.noarch.rpm |
2. Install Packages
|
yum install postgresql96-server.x86_64 postgresql96-devel.x86_64 postgresql96.x86_64 |
3. Add to exclude from yum update – edit /etc/yum.conf
|
#add the following to the end of "exclude=" postgresql* |
3.a Create symlinks where cPanel Expects to find it
|
ln -s /var/lib/pgsql/9.6/data /var/lib/pgsql ln -s /var/lib/pgsql/9.6/backups /var/lib/pgsql |
4. Install postGres in cPanel
There is more information about back-up/etc here – https://documentation.cpanel.net/display/CKB/Install+or+Update+PostgreSQL+on+Your+cPanel+Server
5. Install symlinks
|
cd /usr/pgsql-9.6/bin/; for f in *; do echo $f; [ -e /usr/bin/$f ] && mv /usr/bin/$f /usr/bin/$f.8; ln -s $(pwd)/$f /usr/bin/$f; done cd /var/lib/pgsql; ln -s 9.6/backups; ln -s 9.6/data; ln -s 9.6/pgstartup.log |
6. Initialize and configure to run at startup
|
service postgresql-9.6 initdb chkconfig postgresql-9.6 on /etc/init.d/postgresql-9.6 start |
7. Configure in WHM
|
WHM > Configure PostgreSQL > Install Config WHM > Configure PostgreSQL > Create Users WHM > Configure PostgreSQL > Change password (Generate new one) |
8. Install/Update phpPgAdmin
|
/usr/local/cpanel/bin/updatephppgadmin |
9. Restart
|
/etc/init.d/postgresql-9.6 restart |
10. Add to /etc/chkserv.d
11.Restart tailwatchd
|
/scripts/restartsrv_tailwatchd |