Crucial Paradigm

Call us now 1300 884 839

Member Login
Australia USA

Location: Australia

Soar with High Availability Web Hosting from $11.95/month Elastic Self-Healing Windows VPS from $54.95/month State Of The Art Infrastructure Powered By Hewlett Packard and Cisco R1 Soft CDP Backup Solution
  #1 (permalink)  
Old 13-02-2009, 05:28 PM
Junior Member
 
Join Date: Feb 2009
Location: Perth, Western Australia
Posts: 2
Default Postgresql

I may as well be the first to post in this forum.

Any way I installed postgresql via
Code:
yum install postgresql postgresql-server
everything went smoothly.

I go to start the service using
Code:
service postgresql start
I get the following error:
Quote:
/var/lib/pgsql/data in missing. Use "service postgresql initdb" to initialize the cluster first [FAILED]
So I run "service postgresql initdb" and now I get the following error:
Quote:
Initializing database: mkdir: cannot create directory `/var/lib/pgsql/data/pg_log': File exists
[FAILED]
Does anyone know how to get pgsql up and running.

Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old 14-02-2009, 01:50 AM
Aaron's Avatar
Hosting Slave
 
Join Date: Dec 2008
Location: Sydney
Posts: 625
Send a message via MSN to Aaron
Default

I don't have much experience with Postgresql, but maybe try this:

rm /var/lib/pgsql/data/pg_log
pg_ctl --log /tmp/pg.log start
__________________
Aaron Weller
Powered by dare
Crucial Paradigm Staff
Reply With Quote
  #3 (permalink)  
Old 14-02-2009, 08:05 PM
Junior Member
 
Join Date: Feb 2009
Location: Perth, Western Australia
Posts: 2
Default

Thanks Aaron,

I removed the file and had to run checked out the pgstartup.log and this is what I found.

Quote:
The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/bin/initdb".
Reply With Quote
  #4 (permalink)  
Old 16-02-2009, 02:15 PM
Aaron's Avatar
Hosting Slave
 
Join Date: Dec 2008
Location: Sydney
Posts: 625
Send a message via MSN to Aaron
Default

Which version of postgresql are you attempting to install?
__________________
Aaron Weller
Powered by dare
Crucial Paradigm Staff
Reply With Quote
  #5 (permalink)  
Old 24-02-2009, 02:05 PM
Junior Member
 
Join Date: Feb 2009
Posts: 3
Default Fix Postgresql

cPanel requires Postgresql 7.3.x or later. 7.2.x will not work.

===========================================
Step 1
===========================================
Upgrade to cPanel 7.4.0 build 45 or later
===========================================

===========================================
Step 1a (If you do not have 7.2.x or earlier installed skip this step)
===========================================
Login to a root shell via ssh or the console.

If you have Postgres 7.2.x installed, backup your databases using pg_dumpall or some other method.

Move the postgres data directory somewhere else. ie

mv /var/lib/pgsql /var/lib/pgsql.old
===========================================


===========================================
Step 2
===========================================
Login to a root shell via ssh or the console and run

/scripts/installpostgres
rm -rf /var/lib/pgsql/data/
su postgres
initdb /var/lib/pgsql/data/
logout
service postgresql restart

Run eassapache and enable postgres

/scripts/easyapache
===========================================

===========================================
Step 2a (skip this step if you are not upgrading from postgres 7.2 or earlier
===========================================
Restore your sql dump created with pg_dumpall or by some other method using psql or some other method
===========================================


===========================================
Step 3
===========================================
Login to Web Host Manager and choose "Postgres Config" under Server Setup.

Set a postgres password to anything of your choosing. You should avoid using any non-alpha numeric charaters as these cause problems.
===========================================


===========================================
Step 4
===========================================
Use the "Postgres Config" option in WHM to install a postgres pg_hba.conf file. You can skip this step if you would like to setup your pg_hba.conf file manually. cPanel should work fine with md5 passwords or plaintext passwords
===========================================


===========================================
Step 5
===========================================
Login to cPanel and click on Postgres .. Enjoy!
===========================================
Reply With Quote
Reply

Tags
pgsql, postgresql, sql, vps

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +11. The time now is 04:29 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2

Copyright 2003-2010 © Crucial Paradigm Pty Ltd, All Rights Reserved