Difference between revisions of "PostgreSQL"

From Hostek.com Wiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
==PostgreSQL==
 
==PostgreSQL==
  
WHM/cPanel does support PostgreSQL to be installed on your CentOS server. cPanel does recommend that you have an experienced PostgreSQL db administrator for installation, upgrading, and managing this db engine. While the version of CentOS/RedHat is not required for installation of PostgreSQL you can however check the version of CentOS running the following.  
+
WHM/cPanel does offer and update script for the installation of PostgreSQL to your CentOS WHM/cPanel server. cPanel <b>does not</b> offer any RPM's for updating PostgreSQL. cPanel <b>does</b> recommend that you have an experienced PostgreSQL db administrator for installation, upgrading, and managing this db engine. While the version of CentOS/RedHat is not required for installation of PostgreSQL you can however check the version of CentOS running the following.  
  
 
     cat /etc/centos-release
 
     cat /etc/centos-release
  
==Databases Backup==
+
==PostgreSQL db Backup==
  
 
It is highly recommend that you backup your databases before <b>upgrading</b> PostgreSQL. Please visit cPanel docs on how to backup your databases before upgrading on PostgreSQL on cPanel: [[http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/InstallingPostgresql#Backup%databases docs.cpanel.net]]
 
It is highly recommend that you backup your databases before <b>upgrading</b> PostgreSQL. Please visit cPanel docs on how to backup your databases before upgrading on PostgreSQL on cPanel: [[http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/InstallingPostgresql#Backup%databases docs.cpanel.net]]
Line 30: Line 30:
  
 
[[File:Postgresql_install.png]]
 
[[File:Postgresql_install.png]]
 +
 +
 +
 +
==PostgreSQL db Restore==
 +
 +
If you backed up a PostgreSQL db to upgrade, run the following to import your databases:
 +
 +
    psql
 +
 +
 +
==If Installation Failed==
 +
 +
Run the following:
 +
 +
    service postgresql stop
 +
      mv /var/lib/pgsql /var/lib/directory_file_name
 +
      mv /var/lib/pgsql.old /var/lib/pgsql
 +
      service postgresql restart
 +
 +
 +
[[Category:VPS]]
 +
[[Category:Linux]]
 +
[[Category:SQL]]
 +
[[Category:WHM]]
 +
[[Category:cpanel]]

Latest revision as of 22:08, 15 February 2014


PostgreSQL

WHM/cPanel does offer and update script for the installation of PostgreSQL to your CentOS WHM/cPanel server. cPanel does not offer any RPM's for updating PostgreSQL. cPanel does recommend that you have an experienced PostgreSQL db administrator for installation, upgrading, and managing this db engine. While the version of CentOS/RedHat is not required for installation of PostgreSQL you can however check the version of CentOS running the following.

    cat /etc/centos-release

PostgreSQL db Backup

It is highly recommend that you backup your databases before upgrading PostgreSQL. Please visit cPanel docs on how to backup your databases before upgrading on PostgreSQL on cPanel: [docs.cpanel.net]


Installing PostgreSQL on your cPanel server

To begin the installation, SSH into the server and run the following command:

   /scripts/installpostgres

Configure PostgreSQL Installation in WHM

Log into WHM/cPanel using your root user/password that came with the welcome email sent when the server was setup.

  1. Access Configure Postgres in WHM through "SQL Services"
  2. Click the Install Config button. NOTE: If PostgreSQL is already installed on the server this will overwrite the configuration of the current installation.
  3. Click Create Users
  4. Enter a new password for user


Postgresql install.png


PostgreSQL db Restore

If you backed up a PostgreSQL db to upgrade, run the following to import your databases:

   psql


If Installation Failed

Run the following:

   service postgresql stop
      mv /var/lib/pgsql /var/lib/directory_file_name
      mv /var/lib/pgsql.old /var/lib/pgsql
      service postgresql restart