Install PostgreSQL
1. Install the necessary RPM's for PostgreSQL. Currently, we recommend version 8.4; CentOS 5.x; yum install -y postgresql84* service postgresql initdb ?CentOS 6.x; /scripts/installpostgres 2. Login to WHM and complete the configuration; 1. Navigate to WHM -> SQL Services -> PostgreSQL 2. Click on Install Config 3. Come back to the PostgreSQL page and click Install Users 4. Come back to the PostgreSQL page and choose a root password. 3. Rebuild Apache with PostgreSQL support (listed in the Exhaustive PHP Options page in EasyApache) 4. Optionally, you can add the PDO module for PostgreSQL with the following command; pecl install pdo_pgsql
Enable pdo_pgsql
Enable pdo_pgsql (postgres PDO driver) in cpanel server You can install pdo_pgsql via two methods 1. Via pecl pecl install pdo_pgsql If this fails, enable it via manual compilation below 2. Manual compilation Download the PDO driver from the PECL website below. http://pecl.php.net/package/PDO_PGSQL Download it and enter the downloaded directory by wget http://pecl.php.net/get/PDO_PGSQL-1.0.2.tgz tar -xzf PDO_PGSQL-1.0.2.tgz cd PDO-PSQL-1.0.2/ Once this is done, run the standard commands for building a PHP extension. phpize ./configure make make install Once this is done, you can add the extension to php.ini. cd /usr/local/lib/ vim php.ini extension=pdo_pgsql.so Finally, restart Apache service httpd restart Verify it via commandline php -i | grep pdo_pgsql
Referencia: