User Tools

Site Tools


installing_postgresql_on_debian

This is an old revision of the document!


Installing Postgresql on Debian

Install Base Packages

To install the postgresql packages on debian.

apt-get install postgresql-8.1 postgresql-contrib-8.1 postgresql-doc-8.1 postgresql-plperl-8.1 postgresql-server-dev-8.1

Explanation:

  • postgresql-8.1 - This is the core package that contains the program.
  • postgresql-contrib-8.1 - The contains contributed utilites and stored procedures.
  • postgresql-doc-8.1 - The documentation.
  • postgresql-plperl-8.1 - Perl procedural language.
  • postgresql-server-dev-8.1 - Dev files.

—-

Installing Contrib packages

Switch to user postgres for any of the following commands

 # su postgres

Tsearch2 - full text search extension for PostgreSQL.

bash# psql template1 < /usr/share/postgresql/8.1/contrib/tsearch2.sql

tablefunc - Crosstab (aka, pivot) functions, CONNECT_BY (tree descendancy) function.

bash# psql template1 < /usr/share/postgresql/8.1/contrib/tablefunc.sql

Create Database and add languages

Add the plpgsql language to template1. This allows any database created after this to use the plpgsql language. This language is considered safe and does not give any more access than regular SQL commands.

 bash# createlang plpgsql -d template1

Create the database evegreen.

 bash# createdb -E UNICODE evergreen

Add plperl and plperlu languages to evergreen. The plperlu language provides an environment for executing any Perl code so it isn't considered safe.

 bash# createlang plperl -d evergreen
 bash# createlang plperlu -d evergreen

Drop and recreate database

If you need to start over with a fresh database these commands will drop the current evergreen and recreate it.

  bash# dropdb evergreen
  bash# createdb -E UNICODE evergreen
  bash# createlang plperl -d evergreen
  bash# createlang plperlu -d evergreen

Change db user password

 bash# psql
 bash# alter user postgres password 'my password';
 bash# \q

<<Prev|Index|Next>>

installing_postgresql_on_debian.1176780817.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.