ITPub博客

首页 > 数据库 > MySQL > rpm 安装 pgpool

rpm 安装 pgpool

原创 MySQL 作者:stay_sun 时间:2014-09-24 09:10:36 0 删除 编辑

一 环境
服务器
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博客 ” ,链接:https://blog.itpub.net/29896444/viewspace-1278938/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2014-09-19

  • 博文量
    13
  • 访问量
    40468