码迷,mamicode.com
首页 > 数据库 > 详细

PostgreSQL运维实战精讲之“postgresql源码安装”

时间:2016-05-13 04:58:33      阅读:193      评论:0      收藏:0      [点我收藏+]

标签:postgresql运维实战精讲之“postgresql源码安装”

一、下载地址

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


二、安装:

#安装依赖包

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


三、安装后的配置

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

 

#创建数据簇

export PGDATA=/home/osdba/pgdata

[root@localhostosdba]# useradd osdba

[root@localhostosdba]# su osdba

[osdba@localhost~]$ initdb

#安装contrib目录下的工具(root用户下安装)

cd/home/maidong/postgresql-9.2.4

cdcontrib/

make

makeinstall

#启动和停止数据库(osdba用户下)

[osdba@localhostcontrib]$ pg_ctl start -D $PGDATA

[osdba@localhostcontrib]$ pg_ctl stop -D $PGDATA

 


本文出自 “北京开源人Linux运维实战” 博客,请务必保留此出处http://bdkyr.blog.51cto.com/7961566/1772684

PostgreSQL运维实战精讲之“postgresql源码安装”

标签:postgresql运维实战精讲之“postgresql源码安装”

原文地址:http://bdkyr.blog.51cto.com/7961566/1772684

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!