CentOS Installation Pgsql

Source: Internet
Author: User
Tags postgresql

CentOS Installation Pgsql
Yum installs PostgreSQL under CentOS
Directory
1 Configure YUM Repository
2 Install pgdg RPM file
3 Install PostgreSQL
4 configuration
5 Initialize
6 Startup


Specific steps:
1.
Vim/etc/yum.repos.d/centos-base.repo
[Base] and [Updates] sections added:
exclude=postgresql*

2.Install PGDG RPM File
http://yum.postgresql.org website Find the download version of the rpm download path, do the following:
Yum Localinstall http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpm

3. Install PostgreSQL
3.1 List Available Packages:
Yum List postgres*
3.2 For example, to install a basic PostgreSQL 9.5 server:
Yum Install Postgresql95-server
3.3 Other packages can is installed according to your needs.

4. Configuration

After installing the packages, a database needs to be initialized and configured.
PostgreSQL Data Directory (/var/lib/pgsql/9.5/data) contains all of the data files for the database.
5. Initialize

5.1 The first command (only needed once) was to initialize the database:
Service postgresql-9.5 Initdb
Initializing database: [OK]

6. Startuph

Set boot up:
Chkconfig--level 2345 postgresql-9.5 on
Service postgresql-9.5 Start

CentOS Installation Pgsql

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.