postgresql集群搭建方法

 时间:2024-10-12 01:42:28

1、创建用户postgresansible all -m shell -a "useradd postgres"

postgresql集群搭建方法

2、修改postgres用户的密码ansible all -m shell -a 'echo "postgres:postgres" | chpasswd'

postgresql集群搭建方法

3、批量安装基础软件包ansible all -m shell -a "yum install -y flex biso荏鱿胫协n readline-devel zlib-devel openjade docbook-style-dsssl gcc"

postgresql集群搭建方法

4、在每个节点上获取安装软件,并解压缩

postgresql集群搭建方法

5、全部节点都创建pg垓矗梅吒xc路径,用来存放postgres文件ansible all -m shell -a "su - postgres -艘早祓胂c 'mkdir -p /home/postgres/pgxc/nodes/'"

postgresql集群搭建方法

6、修改每个节点的.bashrc文竭惮蚕斗件su - postgresvi .bashrcexport PGHOME=/home/postgres/pgxlexport PGUSER=postgresexport LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATHexport PATH=$PGHOME/bin:$PATHsource ~/.bashrc

postgresql集群搭建方法

7、关闭iptablessystemctl stop iptables.servicesystemctl disable iptables.service关闭SELinuxsetenforce 0

postgresql集群搭建方法

8、pgxc_ctl -c pgxc_ctl.conf init all

postgresql集群搭建方法
  • 文玩葫芦龙头保养
  • 玉米抽穗前倒伏怎么办#校园分享#
  • 苦菊拌杏仁的做法
  • 10个适合年轻人创业项目推荐
  • 蘑菇怎么炸又脆又好吃?
  • 热门搜索
    布鲁塞尔旅游 徐州的旅游景点 class文件怎么打开 四川旅游地图 秽翼的尤斯蒂娅攻略 橡皮泥硬了怎么办 哺乳期可以烫头发吗 惠州学院怎么样 福州 旅游 启辰t70质量怎么样