Note: This was performed on a vanilla CentOS 6.4 installation with cPanel/WHM 11.36.1 (build 6)
Step 1: Grab the correct PostgreSQL 9.2 rpm pacakge for your Linux distribution from:
http://yum.postgresql.org/repopackages.php#pg92
...and then install it
[/usr/local/src]# wget http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm [/usr/local/src]# rpm -i pgdg-centos92-9.2-6.noarch.rpmStep 2: Install the PostgreSQL 9.2 software:
[/usr/local/src]# yum groupinstall "PostgreSQL Database Server PGDG" -y [/usr/local/src]# yum install postgresql92-devel.x86_64 -yStep 3: Initialize the PostgreSQL 9.2 database:
[/usr/local/src]# service postgresql-9.2 initdbStep 4: Start PostgreSQL 9.2 on boot:
[/usr/local/src]# chkconfig postgresql-9.2 onStep 5: Create the proper symlinks for cPanel/WHM integration:
[/usr/local/src]# cd /usr/pgsql-9.2/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 [/usr/local/src]# cd /var/lib/pgsql; ln -s 9.2/backups; ln -s 9.2/data; ln -s 9.2/pgstartup.log [/usr/local/src]# cd /usr/pgsql-9.2/lib; ln -s libpq.so.5.5 libpq.soStep 6: Start the PostgreSQL 9.2 server:
[/usr/local/src]# service postgresql-9.2 startStep 7: Install the PostgreSQL 9.2 cPanel/WHM config:
-Log into cPanel/WHM as root
-Navigate to "Home > SQL Services > Configure PostgreSQL"
-Click on "Install config"
Step 8: Install/update phpPgAdmin:
[/usr/local/src]# /usr/local/cpanel/bin/updatephppgadmin --forceStep 9: Exclude PostgreSQL from yum:
You'll want to add "exclude=postgres*" to the [base] and [updates] section of this file:
[/usr/local/src]# vi /etc/yum.repos.d/CentOS-Base.repo...this will prevent yum from accidentally installing the repo version of PostgreSQL in the future.
That's all there is to it =) Now you can enjoy full, native integration without any fuss
No comments:
Post a Comment