Linux Environment Source Installation PostgreSQL

Source: Internet
Author: User

1. Download the PostgreSQL source package and save it to a directory on the Linux operating system

2. Extract the PostgreSQL source bundle: Tar zxvf postgresql-9.2.4.tar.gz

or tar jxvf postgresql-9.2.4.tar.bz2

3. Switch to the directory you just unzipped: CD postgresql-9.2.4

4../configure

If you encounter an error, you will need to install the Dependent Toolkit as follows (Install on demand)

Yum Install GCC

Yum Install ReadLine

Yum Install Flex

Yum Install zlib

In the execution./configure

Gmake World

Gmake Install-world

Installation Complete

Then start the database

To the installation directory (default is/usr/local/postgres)

Set up the data directory under this directory (storing database related files)

Starting a database requires a non-root user

/usr/local/pgsql//bin

Initializing the database

./initdb-d. /data Start

Start the database

./pg_clt-d. /data Start

Connect to database after startup:

Under the/usrl/local/pgsql/bin directory

Executes the./psql connection to the default Postgres data

You can then create a database, create a table, and so on.

Linux Environment Source Installation PostgreSQL

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.