Install PostgreSQL in CentOS

Source: Internet
Author: User

1. Configure the YUM Repository

Modify the original yum repository Configuration:

Vim/etc/yum. repos. d/CentOS-Base.repo

Insert a row at the end of the [base] and [updates] sections (sections:

Exclude = postgresql *

Used to cancel the installation and update of PostgresQL from the default repository.

Ii. download and install the pgdg rpm file

Note: In this example, install PostgrSQL 9.1 On CentOS6.3 32-bit.

1. Download

Curl-O

Http://yum.postgresql.org/9.1/redhat/rhel-6-i386/pgdg-centos91-9.1-4.noarch.rpm

2. Install the corresponding RPM file

Rpm-ivh pgdg-centos91-9.1-4.noarch.rpm

3. Install PostgreSQL Server

Yum install postgresql91-server

Iv. commands after installation

1. initialize the database(Default data directory path:/var/lib/pgsql/9.1/data)

Service postgresql-9.1 initdb

2. Start postgresql database service

Service psotgresql-9.1 start

References

1. http://wiki.postgresql.org/wiki/YUM_Installation

2. http://www.cnblogs.com/shanyou/archive/2012/08/25/2656783.html

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.