Dump a PostgreSQL database:

[email protected]:~$ pg_dump db_name -v --format=c --file=./db_name.dump

Import the dump to a new PostgreSQL database:

[email protected]:~$ createdb -E UTF8 -T template0 db_new
[email protected]:~$ pg_restore -U user -d db_new ./db_name.dump
[email protected]:~$ psql --command "ALTER DATABASE db_new OWNER TO user;"

Hello, In this tutorial I will show you how to install theese tools in Debian Squeeze.

Step1. Install Apache2 PHP5 Postgresql and phppgadmin

apt-get update && apt-get install apache2 libapache2-mod-php5 php5 postgresql-8.4 phppgadmin

This command will update the repositories and install all the dependencies.

The following extra packages will be installed:
apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common file libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
libcap2 libdb4.7 libexpat1 libmagic1 libonig2 libpcre3 libpq5 libqdbm14 libxml2 lsb-release mime-support openssl perl perl-modules
php5-cli php5-common php5-pgsql php5-suhosin postgresql-client-8.4 postgresql-client-common postgresql-common postgresql-doc
postgresql-doc-8.4 python python-minimal python-support python2.6 python2.6-minimal sgml-base ssl-cert ucf xml-core
Suggested packages:
www-browser apache2-doc apache2-suexec apache2-suexec-custom php-pear lsb ca-certificates perl-doc libterm-readline-gnu-perl
libterm-readline-perl-perl make postgresql slony1-bin oidentd ident-server python-doc python-tk python-profiler python2.6-doc
python2.6-profiler binutils binfmt-support sgml-base-doc openssl-blacklist debhelper
The following NEW packages will be installed:
apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common file libapache2-mod-php5 libapr1 libaprutil1
libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libdb4.7 libexpat1 libmagic1 libonig2 libpcre3 libpq5 libqdbm14 libxml2
lsb-release mime-support openssl perl perl-modules php5 php5-cli php5-common php5-pgsql php5-suhosin phppgadmin postgresql-8.4
postgresql-client-8.4 postgresql-client-common postgresql-common postgresql-doc postgresql-doc-8.4 python python-minimal
python-support python2.6 python2.6-minimal sgml-base ssl-cert ucf xml-core
0 upgraded, 46 newly installed, 0 to remove and 0 not upgraded.

 

Step2. Configure  PostgresSQL.

Continue Reading…

PostgreSQL, often basically Postgres, is an object-relational database management method (ORDBMS) obtainable for lots of platforms including Debian , FreeBSD, Solaris, MS Windows & Mac OS X.

It is released under the PostgreSQL License, which is an MIT-style license, & is thus free & open source application. PostgreSQL is developed by the PostgreSQL Global Development Group, consisting of a handful of community volunteers employed & supervised by companies such as Red Hat.

Step1. PostgreSQL Installation:

apt-get install postgresql

Step2. PostgreSQL Configuration:

The main configuration file is located in : /etc/postgresql/8.4/main/postgresql.conf
Fist open the configuration file and make the following changes:

vim /etc/postgresql/8.4/main/postgresql.conf

and remove the “#” form  line:

#password_encryption = on

Optional you can make the PostgreSQL to listen on  any ip address:

Continue Reading…

Page 1 of 11