Set up a remotely accessible PostgreSQL9.1 environment on UbuntuServer12.04LTS

Source: Internet
Author: User
1. For more information about how to set up javastuserver12.04lts, see UbuntuServer12.04LTS to install JavaServer.

1. Build Ubuntu Server 12.04 LTS

See Ubuntu Server 12.04 LTS installation

Install Ubuntu 12.04 with VMware 8 detailed process illustration

Windows XP hard disk installation Ubuntu 12.04 dual system graphic details

Note: The Postgresql database server is selected for installation.

2. Build a Postgresql Environment

Note: Chapter 2 references: Ubuntu 10.10 Server + Nginx + Django + Postgresql Installation Steps

2.1 [server side] Change the Ubuntu User Password

$ Sudo passwd postgres

2.2 [server side] modify the postgres password of the Database User

2.2.1 switch to postgres user in Linux

$ Sudo su postgres

2.2.2 log on to the ipvs Database

$ Psql postgres

2.2.3 Change Password

Alter user Login s with PASSWORD 'new password ';

3. Configure the Remote Access Environment

If no configuration is required, the following error occurs when you access the database using pgADMIN III on the terminal.

Set connection information

An error occurred while clicking OK.

3.1 [server side] configure the connectable interface (postgresql. conf)

3.1.1 open the postgresql. conf file

$ Sudo vim/etc/postgresql/9.1/main/postgresql. conf

3.1.2 retrieve the modified location


3.1.3 modify the file (I, enter edit mode)

# Yu add 2012-4-30

Listen_addresses = '*'

3.1.4 save the file (: wq)

3.2 [server side] Configure the server information that can be connected (pg_0000.conf)

3.1.1 open the pg_cmd.conf File

$ Sudo vim/etc/postgresql/9.1/main/pg_assist.conf

3.1.2 retrieve the modified location

Meta File Content

Host all md5

3.1.3 modify the file (I, enter edit mode)

Add the following settings after 3.1.2

# Yu add 2012-4-30

Host all md5

Note: The purpose of this modification is to allow all machines and all users to connect using the TCP/IP protocol and use the password for authentication.

If you want to specify a database, you need to modify the first all. If you want to specify a user, modify the second all

If you want to explicitly access the IP address and address of the machine, modify the IP address range The current setting meaning is to allow the machine from to to access the database.

3.1.4 save the file (: wq)

3.1.5 restart the ipvs Database

$ Sudo/etc/init. d/postgresql restart

3.3 [terminal] Try to connect



PostgreSQL details: Click here
PostgreSQLOf: Click here

PostgreSQL cache detail

Windows platform compiling PostgreSQL

Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure the for phppgAdmin on Ubuntu

For more information about Ubuntu, see Ubuntu special page Tid = 2

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: 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.