PostgreSQL operation and maintenance combat explaining "PostgreSQL source Installation"

Source: Internet
Author: User
Tags postgresql

One

wget https://ftp.postgresql.org/pub/source/v9.2.4/postgresql-9.2.4.tar.gz


Second, installation:

# Install dependent packages

Yuminstall-y perl-extutils-embed readline-devel zlib-devel pam-devellibxml2-devel libxslt-devel openldap-devel Python-devel gcc-c++ Openssl-devel cmake-y

TARZXVF postgresql-9.2.4.tar.gz

CD postgresql-9.2.4

./configure--prefix=/usr/local/pgsql9.2.4--with-perl--with-python

Make

Makeinstall


Third, post-installation configuration

Ln-s/usr/local/pgsql9.2.4/usr/local/pgsql

Vim/etc/profile

#addby Xuekun 2016-5-11

Exportpath=/usr/local/pgsql/bin: $PATH

Exportld_library_path=/usr/local/pgsql/lib: $LD _library_path

Source/etc/profile

# Create data families

Export Pgdata=/home/osdba/pgdata

[Email protected]lhostosdba]# useradd OSDBA

[Email protected]]# su osdba

[[Email protected]~]$ initdb

# Install the tools under the contrib directory (root user installation)

cd/home/maidong/postgresql-9.2.4

cdcontrib/

Make

Makeinstall

# Start and Stop databases (under OSDBA users)

[Email protected]]$ pg_ctl start-d $PGDATA

[Email protected]]$ pg_ctl stop-d $PGDATA


This article is from the "Beijing Open source people Linux operation and Maintenance" blog, please be sure to keep this source http://bdkyr.blog.51cto.com/7961566/1772684

PostgreSQL operation and maintenance combat explaining "PostgreSQL source Installation"

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.