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 010.pgsql.sh
  17. Download the new 010.pgsql.sh startup script from http://www.orchardlabs.com/library/freebsd/010.pgsql.sh.txt
  18. Copy 010.pgsql.sh.txt to /usr/local/etc/rc.d/010.pgsql.sh
  19. Test the startup script: /usr/local/etc/rc.d/010.pgsql.sh start
  20. Test the shutdown script: /usr/local/etc/rc.d/010.pgsql.sh stop
  21. Start Postgresql: /usr/local/etc/rc.d/010.pgsql.sh start
  22. chmod u-w /usr/local/etc/rc.d/010.pgsql.sh
  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 http://sourceforge.net/project/showfiles.php?group_id=3152&package_id=41577
  35. 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.
  36. cd aolserver-4.0
  37. tar xzvf ../nspostgres-4.0beta1.tar.gz
  38. cd nspostgres-4.0beta1
  39. 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
    
  40. gmake
  41. exit (you should be root again)
  42. cp ~your_login/sources/aolserver-4.0/nspostgres-4.0beta1/nspostgres.so /usr/local/aolserver/bin/.
  43. chown -R nsadmin:nsadmin /usr/local/aolsever

Continue on with the daemontools installation

Internet: vtec.net
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.