The installation of PostgreSQL under Linux

Source: Internet
Author: User
Tags gz file postgresql

1, decompression postgresql-9.6.4.tar.gz file tar xvf postgresql-9.6.4.tar.gz2, into the extracted file 3, installation database,./configure--prefix= Path NOTE: Error 1 encountered), ReadLine didn't find it.

Workaround: 1, check whether the system has been installed ReadLine

System already installed 2, search for the appropriate ReadLine package via Yum

3. Install Readline-devel Package

2), did not find zlib package solution: 1, check whether the system installed Zlib package, the system has installed Zlib package

2. Search for the appropriate Yum package through Yum

3. Install Zlib-devel package via Yum

4. Re-execute the installation statement, display the installation success 5, execute Make6, execute make INSTALL7, enter the database installation directory, install successfully

8. Create Postgres user and set Password: postgres

9. Create the data file and set permissions to create the data file in a recursive form

Set permissions

10. Enter the following documents to find the Initdb file

11, initialize the database, cannot use root user, need to use Postgres user

Initialize successfully 12, enter/u01/pgsql/data directory before modifying file configuration modification

After modification

Before modification

After modification

13. Modify the Environment configuration

14, set the environment variable effective immediately 15, execute PG_CTL Start database service 16, execute PG_CTL stop shutdown database service 17, execute psql Enter database command line space

The installation of PostgreSQL under 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.