PostgreSQL Installation and configuration detailed

Source: Internet
Author: User
Tags psql

Installation:
sudo apt-get install PostgreSQL


Set Password
Sudo-u Postgres Psql
postgres=# ALTER USER postgres with PASSWORD ' postgres ';
postgres=# \q


sudo passwd-d postgres
Sudo-u Postgres passwd


Change the configuration file
sudo vim/etc/postgresql/8.4/main/postgresql.conf
listen_addresses = ' * '
Password_encryption = On


sudo vim/etc/postgresql/8.4/main/pg_hba.conf
Host All 0.0.0.0/0 MD5
Sudo/etc/init.d/postgresql restart


Test connection
Psql-u postgres-h 127.0.0.1
postgres=#


Installing GUI management tools
sudo apt-get install pgadmin3


Unloading
Dpkg--list | grep PostgreSQL
Dpkg--purge
Later reinstallation using aptitude to install PostgreSQL, you can regain all the configuration files

Http://blog.chinaunix.net/uid-25885064-id-3404550.html

PostgreSQL Installation and configuration detailed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.