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 http://www.linuxidc.com/Linux/2014-01/95849.htm

Install Ubuntu 12.04 with VMware 8 detailed process illustration http://www.linuxidc.com/Linux/2012-07/64897.htm

Windows XP hard disk installation Ubuntu 12.04 dual system graphic details http://www.linuxidc.com/Linux/2012-04/59433.htm

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 http://www.linuxidc.com/Linux/2010-10/29524.htm

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

/Listen_addresses

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 127.0.0.1/32 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 192.168.11.0/24 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 192.168.11.1/24. The current setting meaning is to allow the machine from 192.168.11.0 to 192.168.11.255 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

Successful.

 

PostgreSQL details: Click here
PostgreSQLOf: Click here

PostgreSQL cache detail http://www.linuxidc.com/Linux/2013-07/87778.htm

Windows platform compiling PostgreSQL http://www.linuxidc.com/Linux/2013-05/85114.htm

Configuration and installation http://www.linuxidc.com/Linux/2013-04/83564.htm of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu

Install and configure the http://www.linuxidc.com/Linux/2011-08/40520.htm for phppgAdmin on Ubuntu

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? 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: 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.