PostgreSQL on Slackware

The following instructions are for Slackware 12.2 and PostgreSQL 8.4.0:

  • # swaret –install postgresql
  • comment the line PATH=/bin:/usr/local/bin:/usr/bin in /etc/rc.d/rc.pgsql
  • modify DBCLUSTER=/var/lib/pgsql/data in /etc/rc.d/rc.pgsql
  • # chmod +x /etc/rc.d/rc.pgsql
  • # mkdir -p /var/lib/pgsql/data
  • # chown -R pgsql:pgsql /var/lib/pgsql/
  • # su – pgsql
  • $ initdb -D /var/lib/pgsql/data     (initialize the database server)
  • $ exit
  • # /etc/rc.d/rc.pgsql start              (start the database server)
  • # su – pgsql
  • $ createdb myFirstDB                 (create a database)
  • $ psql myFirstDB                          (connect to the database)
  • $ createlang plpgsql myFirstDB  (add the PL/pgSQL language to the database)
  • $ createlang -l myFirstDB            (check the languages installed)
  • $ exit
  • # swaret –install pgadmin            (install the program to manage the database)

The following instructions are for Slackware 13.37:

http://www.pmoghadam.com/homepage/HTML/slackware-13.37-postgresql-epkg.html