#1 (permalink)  
Old 08-13-2003, 09:51 PM
cpanelnick's Avatar
cPanel Staff
 
Join Date: Feb 2003
Location: Houston, TX
Posts: 4,330
cpanelnick is on a distinguished road
Installing Postgresql - HOWTO

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
===========================================

===========================================
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!
===========================================

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 08-13-2003, 10:23 PM
Registered User
 
Join Date: Mar 2003
Posts: 863
sexy_guy
Ok got it working! IM IMPRESSED!

The only thing is the installer is installing 7.2.3 not 7.3.2.

Visit this page

http://opensource.nederland.net/PostgreSQL/

Get the following for your version of RH

postgresql
postgresql-libs
postgresql-server

Do a Uvh * to install 4.3.2

Select the OPTION from WHM to POSTGRES CONFIG. Set you password. Restart postgresql.

Test!

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-13-2003, 10:26 PM
Registered User
 
Join Date: Mar 2003
Posts: 863
sexy_guy
Ok problem, the only problem im having is that you cannot delete the database from the control panel. Can you look at this? But if the user logs into phpPgAdmin then he has the opton to drop the db, which works. Maybe this should be allowed to work from the control panel rather then from phpPgadmin.

cPanel.net Support Ticket Number:

Last edited by sexy_guy; 08-13-2003 at 10:30 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-13-2003, 10:38 PM
cpanelnick's Avatar
cPanel Staff
 
Join Date: Feb 2003
Location: Houston, TX
Posts: 4,330
cpanelnick is on a distinguished road
Quote:
Originally posted by sexy_guy
Ok got it working! IM IMPRESSED!

The only thing is the installer is installing 7.2.3 not 7.3.2.

Visit this page

http://opensource.nederland.net/PostgreSQL/

Get the following for your version of RH

postgresql
postgresql-libs
postgresql-server

Do a Uvh * to install 4.3.2

Select the OPTION from WHM to POSTGRES CONFIG. Set you password. Restart postgresql.

Test!

cPanel.net Support Ticket Number:
Just might need to wipe /root/.cpupdates/* before running /scripts/postgresinstall. /scripts/postgresinstall should install the 7.3.x rpms.

PS. I tested droping a database and it worked fine on our rh 7.3 and rh 9 test machines.
cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-13-2003, 11:52 PM
Registered User
 
Join Date: Oct 2002
Location: Egypt
Posts: 391
mmkassem
This script goes in a loop forever here.
It also tries to install apache and php rpms too
[edit : used /scripts/upcp .. loop finished. Databases can be created but not deleted ]
__________________
// Mahmoud
http://www.cpanelplus.com

Last edited by mmkassem; 08-14-2003 at 12:33 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-14-2003, 02:22 AM
Registered User
 
Join Date: May 2003
Posts: 44
BaDBoY_2000
Tomcat

nice work, works fine here!... now only if you could write up somthing like this for TOMCAT!!!!!!!!! thanks

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-14-2003, 02:47 AM
Registered User
 
Join Date: Mar 2003
Posts: 11
ricu5
postgres conf

Hello..
running stable 52
postgres is working..both whm/cp and phppgadmin

database and user creation working...

you can however see all databases from pgphpadmin
you can create tables to other users databases
you can not access/alter/drop tables owned by other users
dont particularly like the fact you can add tables to another users data base..

But
I changed this in pgphp conf to this..I feel a little better anyway..not more secure just better

// Only show owned databases?
// Note: This will simply hide other databases in the list - this does not
// in any way prevent your users from seeing other database by other means.
// (eg. Run 'SELECT * FROM pg_database' in the SQL area.)
$conf['owned_only'] = false; to true


// Only show owned reports?
// Note: This does not prevent people from accessing other reports by other
// means.
$conf['owned_reports_only'] = false; to true

when I click on the reports link it asks you to login again..it does not work.

now I realize this does not keep others from accessing "by
other means"

But what they cant see doesnt hurt...sure they could upload their own copy to the server and see everything,why would you do this when pgphpadmin is available from cp.. I would believe there intentions to be less than honorable if they do.You do not need to see anyone elses databases or for that matter want to create tables within someone elses database.I also believe that clients even though you assure them that no one else can access the data base will have a problem with this especially if another client decides they would like to play and adds a couple of tables totheir database.I did not think this change would work because I was under the assumption when you create the database(s) from c-panel they are created by postgres su....in which case they would be owned by postgres and this config would keep any other users other than owner from seeing the databases..I dont get this...

I created 3 databases on one site and three on another site...I logged into each site control panel and could only see the databases that were created for each site..so it works for now..tomorrow is another day we shall see...

as I am not sure about any of this...please correct me if I am going in the wrong direction..

My 2 cents

Rich



cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 08-14-2003, 04:25 AM
Registered User
 
Join Date: Sep 2002
Location: Europe
Posts: 267
dxer is an unknown quantity at this point
When I hit phpPgAdmin I get this error and Admin is not opening:

Configuration error: Copy conf/config.inc.php-dist to conf/config.inc.php and edit appropriately.


_____
What this mean to copy file to a file and what to edit ?

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 08-14-2003, 07:51 AM
Registered User
 
Join Date: Oct 2001
Posts: 648
Marty is on a distinguished road
It works great now except I cannot delete databases in client control panels.

cPanel.net Support Ticket Number:
__________________
Marty Hoskins
TLC Web Enterprises
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 08-14-2003, 08:12 AM
casey's Avatar
Registered User
 
Join Date: Jan 2003
Location: If there is trouble, it will find me
Posts: 2,336
casey is an unknown quantity at this point
Counting Pgsql databases

Everything is working great except deleting databases and the numbering of postgres databases. If I set the number of sql databases to 4, a customer can create 4 mysql databases AND 4 postgres databases. If possible, I would like to set the number to 4 (or whatever) and let that be the total number of databases period.

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 08-14-2003, 08:14 AM
casey's Avatar
Registered User
 
Join Date: Jan 2003
Location: If there is trouble, it will find me
Posts: 2,336
casey is an unknown quantity at this point
Quote:
Originally posted by dxer
When I hit phpPgAdmin I get this error and Admin is not opening:

Configuration error: Copy conf/config.inc.php-dist to conf/config.inc.php and edit appropriately.


_____
What this mean to copy file to a file and what to edit ?

cPanel.net Support Ticket Number:
cd /usr/local/cpanel/base/3rdparty/phpPgAdmin/conf/
mv config.inc.php-dist config.inc.php

cPanel.net Support Ticket Number:

Last edited by casey; 08-14-2003 at 08:17 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 08-14-2003, 08:23 AM
Registered User
 
Join Date: Sep 2002
Location: Europe
Posts: 267
dxer is an unknown quantity at this point
Quote:
Originally posted by casey
cd /usr/local/cpanel/base/3rdparty/phpPgAdmin/conf/
mv config.inc.php-dist config.inc.php

cPanel.net Support Ticket Number:
Thanks !

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 08-14-2003, 09:39 AM
Registered User
 
Join Date: Apr 2003
Location: Hereford, United Kingdom
Posts: 59
chrisbond
Great work it all works apart from you cannot delete a database after creating it in cpanel. You can delete the users just not the database itself - no errors just doesnt work.

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 08-14-2003, 04:20 PM
Registered User
 
Join Date: Mar 2003
Posts: 863
sexy_guy
Re: Counting Pgsql databases

Quote:
Originally posted by casey
Everything is working great except deleting databases and the numbering of postgres databases. If I set the number of sql databases to 4, a customer can create 4 mysql databases AND 4 postgres databases. If possible, I would like to set the number to 4 (or whatever) and let that be the total number of databases period.

cPanel.net Support Ticket Number:
I would rather see an option that lets the admin give

Mysql db's 5
Postgresql db's 5

In any create a new account for regular as well as for resellers.

Some people might want to charge for Postgresql db's separate from mysql db rather then bunching them together.

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 08-14-2003, 06:44 PM
casey's Avatar
Registered User
 
Join Date: Jan 2003
Location: If there is trouble, it will find me
Posts: 2,336
casey is an unknown quantity at this point
Re: Re: Counting Pgsql databases

Quote:
Originally posted by sexy_guy
I would rather see an option that lets the admin give

Mysql db's 5
Postgresql db's 5

In any create a new account for regular as well as for resellers.

Some people might want to charge for Postgresql db's separate from mysql db rather then bunching them together.

cPanel.net Support Ticket Number:
True. If I just had more control over the number, I'd be happy.

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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 -5. The time now is 06:08 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc