User Tools

Site Tools


installing_postgresql_on_debian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
installing_postgresql_on_debian [2007/04/16 23:33] – Add UNICODE flag to installing PostgreSQL on Debian dbsinstalling_postgresql_on_debian [2010/09/06 13:25] (current) – Delete obsolete page dbs
Line 1: Line 1:
-===== Installing Postgresql on Debian ===== 
-<<[[Installing_Prerequisites_on_Debian|Prev]]|[[Server_Installation|Index]]|[[Installing_Apache2_and_mod_perl2_on_Debian|Next]]>> 
-==== 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 
- 
-**[[http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/Tsearch_V2_Readme.html|Tsearch2]]** - full text search extension for PostgreSQL. 
-  bash# psql template1 < /usr/share/postgresql/8.1/contrib/tsearch2.sql 
- 
-**[[http://projects.commandprompt.com/projects/public/pgsql/browser/trunk/pgsql/contrib/tablefunc/README.tablefunc|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 [[http://www.postgresql.org/docs/8.1/interactive/plpgsql.html|plpgsql]] language to template1.  This allows any database created after this to use the [[http://www.postgresql.org/docs/8.1/interactive/plpgsql.html|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 [[http://www.postgresql.org/docs/8.1/interactive/plperl-trusted.html|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 
- 
-<<[[Installing_Prerequisites_on_Debian|Prev]]|[[Server_Installation|Index]]|[[Installing_Apache2_and_mod_perl2_on_Debian|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.