PostgreSQL installation detailed steps (Linux)

Source: Internet
Author: User

1. Check if PostgreSQL is installed

Rpm-qa|grep postgres    Check if PostgreSQL is installed

If it is already installed, uninstall it using the RPM-E command.

Rpm-e postgresql94-contrib-9.4. 3-1pgdg.rhel6.x86_64 postgresql94-server-9.4. 3-1pgdg.rhel6.x86_64  -e postgresql94-9.4.  3-1pgdg.rhel6.x86_64 postgresql94-libs-9.4. 3-1pgdg.rhel6.x86_64  Uninstall

2. Install the postgresql94 version using the Yum Library settings

Yum Install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm using the Yum Library

3. Installing postgresql94

Yum search PostgreSQL //can also be found first, the server version will have multiple, decided to choose which to install
Yum-y Install Postgresql94-server postgresql94-contrib//Installation postgresql94

Note: If an error occurs, the above installation will be performed once

Installation Successful

4. Initializing the database

Service postgresql-9.4 initdb

If an error is made during startup, for example: Data directory is not empty! [Failed], it is estimated that there is a problem with the installation, I have just started the installation of this problem, uninstall the reinstallation.

5. Set the boot-up PostgreSQL

Chkconfig postgresql-9.4

PostgreSQL installation detailed steps (Linux)

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.