PostgreSQL and ListManager (Linux)

 

In order to use ListManager with PostgreSQL (7.1.3), you'll need to first download it from http://www.ca.postgresql.org/ftpsite/source/. We do not recommend using ListManager with higher versions of PostgreSQL. The instructions here are a general guide to installing PostgreSQL. Documentation for PostgreSQL may be found here:

 

http://www.ca.postgresql.org/users-lounge/

 

You may also find our tuning tips helpful.

Installing PostgreSQL

 

After downloading PostgreSQL, log in as root and execute the following commands to install PostgreSQL:

 

1. As root, untar PostgreSQL, compile the program and create a user postgres:

 

tar xzf postgresql-7.1.3.tar.gz
cd postgresql-7.1.3
./configure && make && make install
adduser postgres
cd /usr/local/pgsql/
mkdir data logs
chown postgres data logs

 

2. Then, put the following items into ~postgres/.bash_profile :

 

POSTGRESHOME=/usr/local/pgsql
export MANPATH=$MANPATH:$POSTGRESHOME/man
export PATH=$PATH:$POSTGRESHOME/bin
export LD_LIBRARY_PATH=$POSTGRESHOME/lib
export PGDATA=$POSTGRESHOME/data
ulimit -n 2048

 

Tip: PGHOST and PGPORT can be set to override defaults (localhost)

 

3. Next, add this line to /etc/profile:

 

export LD_LIBRARY_PATH=/usr/local/pgsql/lib

 

 

4. Change to user postgres

 

su - postgres

 

5. Make sure your environmental variables are set by running:

  

env | grep -i pg

 

You should see that PGDATA and other variables have the /usr/local/pgsql

 

6. Initialize and start the database by running the following:

 

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postmaster -i 1> /usr/local/pgsql/logs/log.txt 2>&1 &

(The -i option specifies using TCP/IP sockets, rather than Unix domain sockets)

 

7. Now, create a user for ListManager to use. We use "lmpg"; please select your own user name:

 

../bin/createuser --adduser
Enter name of user to add: lmpg
Shall the new user be allowed to create databases? (y/n) y

 

 

8. Run psql, and create a database for Listmanager to use. We use "lmpg"; please select your own database name:

 

psql -U lmpg template1
create database lmpg;
\q

 

9. Run psql again, and remove database creation rights from user lmpg (use a different password):

psql template1
alter user lmpg with password 'lmpg' nocreatedb;
\q

 

10. Run the installer for ListManager. With the settings above, the database, user, and password will all be "lmpg". We recommend you select a different database, user and password for your installation.

 



Oracle and ListManager (Unix) Solaris Sparc and ListManager