Installing PostgreSQL 7.2.4

  1. login as root: su -
  2. cd /usr/ports/databases/postgresql72/
  3. make install
  4. This will bring up an install menu - press enter
  5. On the next menu, use the up and down arrow keys and the space bar to uncheck all options - press enter
  6. configuration options - Press enter
  7. This will start the compilation of PostgreSQL.
  8. 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.
  9. chown -R postgres:postgres /usr/local/pgsql
  10. cd /usr/ports/databases/postgresql72/work/postgresql-7.2.4/
  11. gmake install-all-headers
  12. su postgres
  13. /usr/local/bin/initdb -D /usr/local/pgsql/data
  14. exit
  15. Now we need to change the startup script: cd /usr/local/etc/rc.d
  16. chmod u+w
  17. Download the new startup script from
  18. Copy to /usr/local/etc/rc.d/
  19. Test the startup script: /usr/local/etc/rc.d/ start
  20. Test the shutdown script: /usr/local/etc/rc.d/ stop
  21. Start Postgresql: /usr/local/etc/rc.d/ start
  22. chmod u-w /usr/local/etc/rc.d/
  23. su - postgres
  24. /usr/local/bin/createlang plpgsql template1
  25. /usr/local/bin/createuser nsadmin - answer yes, yes
  26. Answer yes to: Shall the new user be allowed to create databases? (y/n)
  27. Answer yes to: Shall the new user be allowed to create more new users? (y/n)
  28. exit
  29. su - nsadmin
  30. /usr/local/bin/createdb openacs-4
  31. exit
  32. su - your_login
  33. cd sources
  34. Download the PostgreSQL driver (nspostgres-4.0beta1) from
  35. wget
    Visit for a full list of mirror sites.
  36. cd aolserver-4.0
  37. tar xzvf ../nspostgres-4.0beta1.tar.gz
  38. cd nspostgres-4.0beta1
  39. Edit the Makefile
    POSTGRES=1 (it's just to keep make happy)
    ifeq ($(POSTGRES),LSB)    
        PGLIB = /usr/lib
        PGINC = /usr/include
        PGLIB = $(POSTGRES)/lib
        PGINC = $(POSTGRES)/include

    ifeq ($(POSTGRES),LSB)    
        PGLIB = /usr/lib
        PGINC = /usr/include
        #PGLIB = $(POSTGRES)/lib
        #PGINC = $(POSTGRES)/include
        PGLIB = /usr/local/lib/postgresql
        PGINC = /usr/local/include/postgresl/
  40. gmake
  41. exit (you should be root again)
  42. cp ~your_login/sources/aolserver-4.0/nspostgres-4.0beta1/ /usr/local/aolserver/bin/.
  43. chown -R nsadmin:nsadmin /usr/local/aolsever

Continue on with the daemontools installation

IC Design: view list
2002-08-07: Orchard Labs, Inc. introduces Internet Consulting and IC Consulting services.

2002-08-07: Read the OpenACS 4.5 FreeBSD Installation Guide.

2002-08-07: Read about the Orchard Labs Community System (OLCS).

© 2000-2002 Orchard Labs, Inc.