Delete built-in PostgreSQL and install it in Linux

Source: Internet
Author: User

Root Account Logon: suRoot

Delete: rpm-Qa | grep PostgreSQL | xargs rpm-e -- nodeps

Query: rpm-Qa | grep PostgreSQL

Windows Client: pgadmin III or phpPgAdmin

Http://www.postgresql.org/download/

# Useradd postgre (automatically create a postgre Group)

# Tar xvfz postgresql-7.1.3.tar.gz
# Cd postgresql-7.1.3
#./Configure -- prefix =/usr/local/pgsql
# Make
# Make install
# Chown-r postgre. postgre/usr/local/pgsql

# Vi ~ Postgre/. bash_profile
Add:

Pglib =/usr/local/pgsql/lib
Pgdata = $ home/Data
Path = $ path:/usr/local/pgsql/bin
Manpath = $ manpath:/usr/local/pgsql/man
Export pglib pgdata path manpath

# Su-postgre

Create the data folder in the postgre directory. (/home/postgre/data)

$ Mkdir data

$ Initdb (-e-euc_jp)

Modify: Under/home/postgre/Data

1. PostgreSQL. conf

Tcpip_socket = true

2. pg_cmd.conf

# Type Database User IP-ADDRESS IP-MASK Method

Local all trust
# IPv4-style local connections:
Host All all 192.168.1.220 255.255.255.0 Trust
Host All all 192.168.1.219 255.255.255.0 Trust
Host All all 192.168.1.221 255.255.255.0 Trust
Host All all 192.168.1.54 255.255.255.0 Trust

# IPv6-style local connections:
Host All: 1 FFFF: FFFF Trust

/Usr/local/pgsql/bin/postmaster-D/home/postgre/Data

Or/usr/local/pgsql/bin/pg_ctl-D/home/postgre/Data start

$ Postmaster-I-d ~ /Data &

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.