To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Sep 2004
    Posts
    11

    Default Howto: Installing PostgreSQL w/ phpPgAdmin

    I have succesfuly installed PostgreSQL 7.4.6 and phpPgAdmin on my hosting account with no problems.

    1. Start up an SSH session, and change directories into /home/(username)
    Code:
    cd /home/(username
    2. Download the PostgreSQL package
    Code:
    ftp://ftp3.us.postgresql.org/pub/postgresql/latest/postgresql-7.4.6.tar.gz
    3. Extract the archive
    Code:
    untarzip postgresql-7.4.6.tar.gz
    4. Change into the new directory
    Code:
    cd postgresql-7.4.6
    5. (If you haven't already install the GNU compilation utilities in Site Manager)

    6. Run the config script
    Code:
    ./configure --prefix=/home/(username)
    7. Compile
    Code:
    make
    8. Install
    Code:
    make install
    9. Now create your data directory
    Code:
    mkdir pgsql
    mkdir pgsql/data
    10. Set up the database system
    Code:
    /home/(username)/bin/initdb -D /home/(username)/pgsql/data
    /home/(username)/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
    /home/(username)/bin/createdb test
    /home/(username)/bin/psql test
    PostgreSQL is now running! Now we just need to install phpPgAdmin

    1. Change into your default web directory
    Code:
    cd /var/www/html
    2. Download the phppgAdmin files
    Code:
    wget http://voxel.dl.sourceforge.net/sourceforge/phppgadmin/phpPgAdmin-3.5.1.tar.gz
    3. Extract them
    Code:
    untarzip phpPgAdmin-3.5.1.tar.gz
    4. Rename the folder
    Code:
    mv phpPgAdmin-3.5.1 phpPgAdmin
    You can now log into phpPgAdmin at http://www.yourdomain.com/phpPgAdmin Your username and password are the same as the ones you use everywhere else.[/code]

  2. #2
    Junior Member
    Join Date
    Sep 2004
    Posts
    11

    Default Starting and Stopping the server

    I forgot to mention how you start/stop/restart the server.

    To stop the server
    Code:
    /home/(username)/bin/pg_ctl stop -D /home/(username)/pgsql/data
    To start the server
    Code:
    /home/(username)/bin/pg_ctl start -D /home/(username)/pgsql/data
    To restart the server
    Code:
    /home/(username)/bin/pg_ctl restart -D /home/(username)/pgsql/data

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,685

    Default

    Thanks for posting JakePoz! Sounds as if it was pretty painless.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  4. #4

    Default

    Anyone else getting errors when they run make? Specifically I get this error:

    Gen_fmgrtab.sh: sort: command not found
    Gen_fmgrtab.sh failed


    and then it exits. Any suggestions?
    This universe shipped by weight, not by volume. Some expansion of the contents may have occurred during shipment.

  5. #5
    Senior Member jalal's Avatar
    Join Date
    May 2003
    Location
    Germany
    Posts
    1,377

    Default

    The 'sort' command is not installed on Westhost. I guess JakePoz had it from somewhere.
    It's in the wh-utils package from my site if you don't find it elsewhere.
    ftp.gnomedia.com

  6. #6

    Default

    I got it working. Thanks for your help.

    P.S.
    Code:
    /home/(username)/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1 &
    didn't work for me--I got errors.
    Code:
    /home/(username)/bin/pg_ctl -D /home/(username)/pgsql/data -l logfile start
    seemed to work, however.
    This universe shipped by weight, not by volume. Some expansion of the contents may have occurred during shipment.

  7. #7
    Junior Member
    Join Date
    Sep 2004
    Posts
    11

    Default

    I am glad you got it working, not sure why that first command didn't work though.

  8. #8
    Senior Member Tom Howard's Avatar
    Join Date
    Jul 2003
    Posts
    132

    Default

    First of all, thanks again to JakePoz for this post!


    I'm guessing that the average WH user doesn't have readline installed, so an alternative step 6:
    Code:
    ./configure --prefix=/home/(username) --without-readline
    A minor addition (for clarity) to step 8:
    Code:
    cd /home/(username)/
    mkdir pgsql
    mkdir pgsql/data

  9. #9
    Junior Member
    Join Date
    Aug 2005
    Posts
    2

    Default createlang: 'command not found'

    I have succesfully installed postgresql with phpPgAdmin. But I needed to add PL/pgSQL (a procedural language) in my database for wich I need to run 'createlang' command. But I get the response 'command not found'. I beleive this is due to the VPS not having sh-utils installed or may be other similar utility. I need PL/pgSQL to be able to install mysourcematrix CMS.

    Does anybody come across with this issue and know how to resolve it. The Westhost technical suppot cannot do it (they will only do against fee which cost $80/per hour and 1 hour payment is minimum).

  10. #10
    Junior Member
    Join Date
    Feb 2006
    Posts
    4

    Default Installing PostgreSQL 8.1.3 (Feb 25, 2006)

    Having just set up my account with WestHost, I thought I would download and install the latest version of PostgreSQL. I should note that the basic instructions in this thread are good, but you can also get away with doing just ./configure && make && make install.

    BUT! You should also be aware that at least with WestHost's New Year's Special VPS system, PostgreSQL 8.0.3 apparently is already installed! I found that out after getting 8.1.3 installed, and struggling to get initdb working. So if you're going to use a version other than 8.0.3, you will need to use the complete path to your PostgreSQL binaries!

    Just passing along a tip...
    Raymond

Similar Threads

  1. HowTo Guide: Installing Subversion
    By Pachango in forum General Discussion
    Replies: 25
    Last Post: 12-17-2008, 10:08 AM
  2. HowTo Tutorial: Using and Installing SSH
    By sunzon in forum E-mail / FTP Management
    Replies: 6
    Last Post: 05-10-2008, 07:07 AM
  3. PHP 5.2 and PostgreSQL
    By rcrodgers in forum PHP / MySQL
    Replies: 2
    Last Post: 03-01-2007, 01:12 AM
  4. Howto guide: Installing Mailman
    By nsc in forum CGI Scripts / Perl
    Replies: 6
    Last Post: 02-05-2007, 11:57 PM
  5. Upgrade SpamAssassin using CPAN?
    By j103c in forum E-mail / FTP Management
    Replies: 54
    Last Post: 06-10-2004, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •