patron安装和配置

举报
snowofsummer 发表于 2021/11/04 10:12:03 2021/11/04
【摘要】 pip版本:[root@iZ8vbb91wmh1d1oioj2iulZ bin]# pip3.6 --versionpip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)1,依赖软件安装yum install -y postgresql-server.x86_64yum install gcc.x86_64 -yyum ins...

pip版本:

[root@iZ8vbb91wmh1d1oioj2iulZ bin]# pip3.6 --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)

1,依赖软件安装

yum install -y postgresql-server.x86_64
yum install gcc.x86_64 -y
yum install gcc.x86_64 -y
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

2,安装psycopg2-binary

[root@iZ8vbb91wmh1d1oioj2iulZ ~]# pip3.6 install psycopg2-binary
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.6 install --user` instead.
Collecting psycopg2-binary
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/14/65/223a5b4146b1d5d5ab66f16ef194916a1ed9720da1f118d7bfb60b8f2bea/psycopg2-binary-2.9.1.tar.gz (380kB)
    100% |████████████████████████████████| 389kB 32.7MB/s
Installing collected packages: psycopg2-binary
  Running setup.py install for psycopg2-binary ... done
Successfully installed psycopg2-binary-2.9.1

3,安装patroni

[root@iZ8vbb91wmh1d1oioj2iulZ ~]# pip3.6 install patroni[etcd]
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.6 install --user` instead.
Collecting patroni[etcd]
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/7d/6b/7f758dcbe619ca5688fdd36d7e1c0cc36900f6dd2a4f4491ec438c52cd97/patroni-2.1.1-py3-none-any.whl (219kB)
    100% |████████████████████████████████| 225kB 35.3MB/s
Collecting psutil>=2.0.0 (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/e1/b0/7276de53321c12981717490516b7e612364f2cb372ee8901bd4a66a000d7/psutil-5.8.0.tar.gz (470kB)
    100% |████████████████████████████████| 471kB 38.0MB/s
Requirement already satisfied: PyYAML in /usr/local/lib64/python3.6/site-packages (from patroni[etcd])
Collecting click>=4.1 (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/48/58/c8aa6a8e62cc75f39fee1092c45d6b6ba684122697d7ce7d53f64f98a129/click-8.0.3-py3-none-any.whl (97kB)
    100% |████████████████████████████████| 102kB 43.0MB/s
Collecting python-dateutil (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl (247kB)
    100% |████████████████████████████████| 256kB 36.0MB/s
Requirement already satisfied: six>=1.7 in /usr/local/lib/python3.6/site-packages (from patroni[etcd])
Collecting ydiff>=1.2.0 (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/1e/ed/e25e1f4fffbdfd0446f1c45504759e54676da0cde5a844d201181583fce4/ydiff-1.2.tar.gz (42kB)
    100% |████████████████████████████████| 51kB 1.8MB/s
Requirement already satisfied: urllib3!=1.21,>=1.19.1 in /usr/local/lib/python3.6/site-packages (from patroni[etcd])
Collecting prettytable>=0.7 (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/c2/98/3372c23c561cbaaa05bb60b2c3d30bfdad9ab504bf1ddefc7368b4545958/prettytable-2.3.0-py3-none-any.whl
Collecting python-etcd<0.5,>=0.4.3; extra == "etcd" (from patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a1/da/616a4d073642da5dd432e5289b7c1cb0963cc5dde23d1ecb8d726821ab41/python-etcd-0.4.5.tar.gz
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /usr/local/lib/python3.6/site-packages (from click>=4.1->patroni[etcd])
Collecting wcwidth (from prettytable>=0.7->patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/59/7c/e39aca596badaf1b78e8f547c807b04dae603a433d3e7a7e04d67f2ef3e5/wcwidth-0.2.5-py2.py3-none-any.whl
Collecting dnspython>=1.13.0 (from python-etcd<0.5,>=0.4.3; extra == "etcd"->patroni[etcd])
  Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/f5/2d/ae9e172b4e5e72fa4b3cfc2517f38b602cc9ba31355f9669c502b4e9c458/dnspython-2.1.0-py3-none-any.whl (241kB)
    100% |████████████████████████████████| 245kB 42.9MB/s
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.6/site-packages (from importlib-metadata; python_version < "3.8"->click>=4.1->patroni[etcd])
Installing collected packages: psutil, click, python-dateutil, ydiff, wcwidth, prettytable, dnspython, python-etcd, patroni
  Running setup.py install for psutil ... done
  Running setup.py install for ydiff ... done
  Running setup.py install for python-etcd ... done
Successfully installed click-8.0.3 dnspython-2.1.0 patroni-2.1.1 prettytable-2.3.0 psutil-5.8.0 python-dateutil-2.8.2 python-etcd-0.4.5 wcwidth-0.2.5 ydiff-1.2
[root@iZ8vbb91wmh1d1oioj2iulZ ~]#

4,检查安装版本情况

[root@iZ8vbb91wmh1d1oioj2iulZ bin]# /usr/local/bin/patroni --version
patroni 2.1.1

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。