pgpool rpm安装方式

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

 

4安装 httpd

yum install -y php php-psql httpd php-mbstring

 

5建立数据目录 log目录

[root@AY14070116183406951aZ mnt]# mkdir -p /mnt/pgdb/data

 [root@AY14070116183406951aZ mnt]# mkdir -p /mnt/pgpool/log

 

6授权

[root@AY14070116183406951aZ mnt]# chown -R postgres.postgres /mnt/pgdb/

[root@AY14070116183406951aZ mnt]# chown -R postgres.postgres /mnt/pgpool/

 

6初始化数据库

Su – postgres

vim .bash_profile

PGDATA=/mnt/pgdb/data

Initdb /mnt/pgdb/data

 

Pgctl         start

Psql

\password

GTdbs_postgresql

#Createuser pgpool GTdbs_pool

 

7安装pgpool

安装php php-psql httpd php-mbstring

 

yum install -y php php-psql httpd php-mbstring

 

配置 ssh 对等协议

ssh-keygen

ssh-copy-id

 

安装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.

 

 

登录网页 调整参数

http://ip/pgpoolAdmin/status.php

在第二台 主机  安装pgpool


 可能遇到的问题


  

e1006 无法更新pgpool。conf  参考网址           http://www.pgpool.net/pgpool-web/contrib_docs/simple_sr_setting_3.1/index.html


 chown apache /usr/local/etc/pgpool.conf
 chmod 777 /var/log/pgpool/trigger
 
 [root@pgdb1 pgpoolAdmin]# chown apache conf/pgmgt.conf.php
[root@pgdb1 pgpoolAdmin]# chmod 644 conf/pgmgt.conf.php


setenforce 0

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

转载于:http://blog.itpub.net/29778618/viewspace-1267795/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值