postgres-xl 集体搭建
pgxl 集群搭建
一 预备
1 下载安装解压源码 /opt/
curl -O http://files.postgres-xl.org/postgres-xl95r1beta1.tar.gz
tar -zxvf postgres-xl95r1beta1.tar.gz
mv postgres-xl95r1beta1.tar.gz postgres-xl
2 编译
$ yum -y gcc
$ cd postgres-xl
$ pwd
/opt/postgres-xl
$ ./configure
报错 :configure: error: readline library not found
解决 : $ rpm -qa | grep readline
readline-6.2-9.el7.x86_64
$ yum search readline
$ yum install -y readline-devel
$ ./configure
报错 :configure: error: zlib library not found
解决 : 思路同上
$ yum install -y
$ ./configure
OK!
$ make
报错 : ERROR: `Perl' is missing on your system.
解决 : $ yum install -y perl
$ ./configure
依次需要安装 flex bison
$ make install
默认安装目录 /usr/local/pgsql 可以 ./configure --prefix= path 指定目录
3 安装集群管理工具 pgxc_ctl
cd /opt/postgres-xl/contrib/pgxc_ctl/
$ make
$ make install
二 环境变量
$ vi /etc/profile.d/pgxl.sh
export PGHOME=/usr/local/pgsql
export PGUSER=postgres
export LD_LIBRARY_PATH=$PGHOME/lib
export PATH=$PGHOME/bin:$PATH
export dataDirRoot=$HOME/DATA/pgxl/nodes
$ chmod 777 /etc/profile.d/pgxl.sh
$ source /etc/profile.d/pgxl.sh
三 创建新用户
$ useradd postgres
$ passwd postgres
四 修改 目录权限
chown -R postgres:postgres /usr/local/pgsql
五 免密码登录
$ su - postgres
$ ssh-keygen -t dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
$ chmod 710 a~/.ssh/authorized_keys
验证 ssh localhost
注意当前用户是postgres
六 使用pgxc_ctl 命令工具
$ pgxc_ctl 进入管理工具
参考
Hello world 例子
http://files.postgres-xl.org/documentation/tutorial-createcluster.html
具体操作
http://files.postgres-xl.org/documentation/pgxc-ctl.html
备注 slave coordinator/datanode 启动失败
postgres: Postgres-XL: must start as either a Coordinator (--coordinator) or Data Node (--datanode)
pg_ctl: could not determine the data directory using command ""/usr/local/pgsql/bin/postgres" -C data_directory -D "/home/postgres/DATA/pgxl/nodes/dir.1" "
refer
http://blog.csdn.net/liuzongxi/article/details/46380985
http://blog.csdn.net/jj_tyro/article/details/45219007
常用命令
查看状态 monitor all
初始化 init xx
停止 stop xx
启动 start xx
清除 clean xx
xx 为 monitor 显示的全名称,特例 gtm proxy 改为 gtm_proxy
postgres-xl 集体搭建的更多相关文章
- postgres-xl 集体搭建(2)
$ pgxc_ctl prepare config minimal 生成一个单机伪分布集群配置简单模板 根据该模板进行简单修改就可以配置成一个集群 $ pgxc_ctl init all $ pgxc ...
- postgres-xl 集体搭建(1)
安装并编辑脚本 cd /opt/curl -O http://files.postgres-xl.org/postgres-xl95r1beta1.tar.gztar -zxvf postgres-x ...
- 以windows服务方式快速部署免安装版Postgres数据库
目录 以windows服务方式快速部署免安装版Postgres数据库 1.下载Postgresql数据库免安装包 2.安装环境准备及验证 解压文件 测试环境依赖 3.创建并初始化数据目录 创建数据目录 ...
- 2021 年写 JavaScript 代码的 17 个优化技巧
我们经常会写一些 JavaScript 代码,但是如何写出干净又易维护的代码呢?本文将讲解 17 个 JavaScript 代码的技术帮助你提高编程水平,此外,本文可以帮助您为 2021 年的 Jav ...
- Postgres 主从复制搭建步骤
系统版本: CentOS Linux release 7.5.1804 (Core) 数据库 psql (PostgreSQL) 10.5 2台机器ip : 172.17.0.3 /172.17.0. ...
- Android学习——windows下搭建Cygwin环境
在上一篇博文<Android学习——windows下搭建NDK_r9环境>中,我们详细的讲解了在windows下进行Android NDK开发环境的配置,我们也讲到了在NDk r7以后,我 ...
- Android学习——windows下搭建NDK_r9环境
1. NDK(Native Development Kit) 1.1 NDK简介 Android NDK是一套允许开发人员使用本地代码(如C/C++)进行Android APP功能开发的工具,通过这个 ...
- Socket实现仿QQ聊天(可部署于广域网)附源码(4)-加入数据库系统搭建完成
1.前言 这是本系列的第四篇文章,上一篇我们讲到实现了客户端对客户端的抖屏与收发各种类型文件,本篇文章我们加入SQLServer数据库实现登录与好友的添加等功能,并对界面做了美化处理.向往常一样我会把 ...
- centos6搭建gitlab
前言 原来的项目放在公网的gitlab上,处于安全考虑,在内网搭建一套,有图形界面,可以直接从外网git导入进来,使用了一下觉得挺方便,把安装流程记录下来,参考官网:https://gitlab.co ...
随机推荐
- tensorflow安装相关的
1 Install pip and Virtualenv sudo apt-get install python-pip python-dev python-virtualenv2 Create a ...
- String.IsNullOrEmpty()和String.IsNullOrWhiteSpace()的区别
string.IsNullOrEmpty 这个是判断字符串是否为:null或者string.Empty或者“”,但不包含空格 .如果是如"\t"或者“ ” 这样的字符就返回fa ...
- SQLAlchemy入门
什么是SQLAlchemy? 是Python连接SQL数据库的一种方式,需要通过驱动来连接. 是Python中使用最广泛的ORM(对象关系映射)工具之一,即把数据库中的二维表结构映射成一个list对象 ...
- Xcode-之Alcatraz
一.说明: Alcatraz 是一款 Xcode的插件管理工具,可以用来管理XCode的 插件.模版以及颜色配置的工具. 二.安装 1.github地址:https://github.com/alca ...
- 设计模式--命令模式(Command)
基本概念: Command模式也叫命令模式 ,是行为设计模式的一种.Command模式通过被称为Command的类封装了对目标对象的调用行为以及调用参数,命令模式将方法调用给封装起来了. 命令模式的 ...
- SSM
今天内容安排 1:复习mybatis 2:复习springMVC 3:springMVC+spring+mybatis组合起来,搭建一个web应用开发的框架 4:用户管理系统,针对用户的CRUD操作, ...
- transform translate transition 的区别
transform是变形,下面有translate transform: rotate旋转/scale缩放/skew扭曲/translate移动/matrix矩阵变形transform连写:rotat ...
- magento寄存器的使用
1.Mage::register('validation_image_name', $validationImageName);//这个是把变量$validationImageName存储在valid ...
- 遍历(一)jquery $().each和$.each()
原文:http://www.frontopen.com/1394.html 在jquery中,遍历对象和数组,经常会用到$().each和$.each(),两个方法. $().each 在dom处理上 ...
- POJ 1065 Wooden Sticks#贪心+qsort用法
(- ̄▽ ̄)-* 这道题用到了cstdlib库的qsort()函数: 用法链接:http://www.cnblogs.com/syxchina/archive/2010/07/29/2197382.h ...