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"