rpm 安装 pgpool


一 环境
服务器
2 台centOS6.5 
软件
Postgresql  9.35 
 
postgresql93-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-contrib-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-libs-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-server-9.3.5-1PGDG.rhel6.x86_64.rpm
 
pgpool 3.3.3
 
installer-pg93-3.3.3.tar.gz
 
二 环境介绍


一安装pg
1创建数据库账户 
Userdel postgres
Useradd postgres
2修改postgres 密码 
 echo 'GTdbs_postgres' |passwd postgres
 
3安装 数据库 
postgresql93-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-contrib-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-libs-9.3.5-1PGDG.rhel6.x86_64.rpm
postgresql93-server-9.3.5-1PGDG.rhel6.x86_64.rpm
uuid-1.6.1-10.el6.x86_64
需要的安装包可以从这里下载
安装 postgresql93-contrib 必须要安装 uuid-1.6.1-10.el6.x86_64 
Yum install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/postgresql93-contrib-9.3.5-1PGDG.rhel6.x86_64.rpm
 
4 修改环境变量
Su – postgres
vim .bash_profile
PATH=$PATH:$HOME/bin:/usr/pgsql-9.3/bin/
PGDATA=/pgdb/data
5 创建 数据库 目录
mkdir -p /pgdb/data
授权
mkdir -p /pgdb/data
 
初始化 数据库
initdb /pgdb/data


 
 
二 安装pgpool
1  安装pgpool需要的软件
yum install -y php php-psql httpd php-mbstring
 


 
 
 
2 下载 拷贝软件包
installer-pg93-3.3.3.tar.gz
 
3解压数据包 
tar xvf installer-pg93-3.3.3.tar.gz
 
 
 
4 配置 ssh 对等协议 
ssh-keygen
ssh-copy-id
 
5 安装pgpoo 
./install.sh
 
 
[root@pgdb2 installer-pg93-3.3.3]# ./install.sh 
check for installation ...OK.
 
=================================================================
Copyright (c) 2003-2014     PgPool Global Development Group
 
Permission to use, copy, modify, and distribute this software and
its documentation for any purpose and without fee is hereby
granted, provided that the above copyright notice appear in all
copies and that both that copyright notice and this permission
notice appear in supporting documentation, and that the name of the
author not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission. The author makes no representations about the
suitability of this software for any purpose.  It is provided "as
is" without express or implied warranty.
=================================================================
[input] Do you accept the end user software license agreement? (yes/no): 
 
 
yes
 
 
 
=================================================================
Configuration
=================================================================
 
----------------------------------------------------------------------
Configuring Host, User, SSH ...
----------------------------------------------------------------------
 
* Node information
 
Two-node cluster (node 0 and node 1) is assumed.
[input] Specify node 0's hostname or IP address : 192.168.1.223
[input] Specify node 1's hostname or IP address : 192.168.1.232
 
Which node is this?
    If this is node 0, a database cluster is created by initdb after installation.
    Otherwise if this is node 1, the configurations on node 0 is reused.
 
 
 
 
 
Completed!
 
   * See pgpoolAdmin.
         http://192.168.1.223/pgpoolAdmin/
 
   * Start PostgreSQL by the user postgres
         ex.) /usr/pgsql-9.3/bin/pg_ctl start -D /home/postgres/data
 
   * Start pgppool from pgpoolAdmin
 
   * Install pgpool-II to 192.168.1.232 using install.sh
 
 
6授权 
Chown apache –R /var/www/html
 
7重启 服务 
Service httpd restart
Service iptables stop
Su – postgres
Pg_ctl restart

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29896444/viewspace-1278938/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29896444/viewspace-1278938/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值