 |
Installing PostgreSQL 7.2.4
- login as root:
su -
cd /usr/ports/databases/postgresql72/
make install
- This will bring up an install menu - press enter
- On the next menu, use the up and down arrow keys and the space bar to uncheck all options - press enter
configuration options - Press enter
- This will start the compilation of PostgreSQL.
- Once the installation has finished, you will need to initialize the database. First we need to create the data directory:
mkdir -p /usr/local/pgsql/data.
chown -R postgres:postgres /usr/local/pgsql
cd /usr/ports/databases/postgresql72/work/postgresql-7.2.4/
gmake install-all-headers
su postgres
/usr/local/bin/initdb -D /usr/local/pgsql/data
exit
- Now we need to change the startup script:
cd /usr/local/etc/rc.d
chmod u+w 010.pgsql.sh
- Download the new 010.pgsql.sh startup script from http://www.orchardlabs.com/library/freebsd/010.pgsql.sh.txt
- Copy 010.pgsql.sh.txt to /usr/local/etc/rc.d/010.pgsql.sh
- Test the startup script:
/usr/local/etc/rc.d/010.pgsql.sh start
- Test the shutdown script:
/usr/local/etc/rc.d/010.pgsql.sh stop
- Start Postgresql:
/usr/local/etc/rc.d/010.pgsql.sh start
chmod u-w /usr/local/etc/rc.d/010.pgsql.sh
su - postgres
/usr/local/bin/createlang plpgsql template1
/usr/local/bin/createuser nsadmin - answer yes, yes
- Answer yes to:
Shall the new user be allowed to create databases? (y/n)
- Answer yes to:
Shall the new user be allowed to create more new users? (y/n)
exit
su - nsadmin
/usr/local/bin/createdb openacs-4
exit
su - your_login
cd sources
- Download the PostgreSQL driver (nspostgres-4.0beta1) from http://sourceforge.net/project/showfiles.php?group_id=3152&package_id=41577
wget http://unc.dl.sourceforge.net/sourceforge/aolserver/nspostgres-4.0beta1.tar.gz
Visit http://prdownloads.sourceforge.net/aolserver/nspostgres-4.0beta1.tar.gz?download for a full list of mirror sites.
cd aolserver-4.0
tar xzvf ../nspostgres-4.0beta1.tar.gz
cd nspostgres-4.0beta1
- Edit the Makefile
add:
ACS=1
POSTGRES=1 (it's just to keep make happy)
change:
ifeq ($(POSTGRES),LSB)
PGLIB = /usr/lib
PGINC = /usr/include
else
PGLIB = $(POSTGRES)/lib
PGINC = $(POSTGRES)/include
endif
to:
ifeq ($(POSTGRES),LSB)
PGLIB = /usr/lib
PGINC = /usr/include
else
#PGLIB = $(POSTGRES)/lib
#PGINC = $(POSTGRES)/include
PGLIB = /usr/local/lib/postgresql
PGINC = /usr/local/include/postgresl/
endif
gmake
exit (you should be root again)
cp ~your_login/sources/aolserver-4.0/nspostgres-4.0beta1/nspostgres.so /usr/local/aolserver/bin/.
chown -R nsadmin:nsadmin /usr/local/aolsever
Continue on with the daemontools installation
|
 |
|