install python3.7
一:安装编译包
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel
二:从华为云下载源码包
wget https://mirrors.huaweicloud.com/python/3.7.2/Python-3.7.2.tgz
三:开始编译
# 解压缩
tar -zxvf Python-3.7.2.tgz
# 进入解压后的目录
cd Python-3.7.2
# 依次执行下面命令进行手动编译
./configure prefix=/usr/local/python3
make -j2 && make install
四:添加软连接
# 添加 python 的软链接
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
# 测试是否安装成功了
python -V
install zookeeper3.4
一:下载tar包
#cd到/usr/local文件夹下,创建 /usr/local/zookeeper 文件夹:
mkdir -p /usr/local/zookeeper
cd /usr/local/zookeeper
wget --no-check-certificate https://archive.apache.org/dist/zookeeper/zookeeper-3.4.9/zookeeper-3.4.9.tar.gz
二:解压并安装
tar -zxvf /usr/local/zookeeper/zookeeper-3.4.9.tar.gz
cd /usr/local/zookeeper/zookeeper-3.4.9/conf
cp -rp zoo_sample.cfg zoo.cfg
vim zoo.cfg
#添加dataDir=/usr/local/zookeeper/zookeeper-3.4.9/data
#添加dataLogDir=/usr/local/zookeeper/zookeeper-3.4.9/logs
三:添加环境变量
vim /etc/profile
export ZOOKEEPER_HOME=/usr/local/zookeeper/zookeeper-3.4.9/
export PATH=$ZOOKEEPER_HOME/bin:$PATH
expo PATH
source /etc/profile
四:启动加入开机自启
cd /usr/local/zookeeper/zookeeper-3.4.9/bin
zkServer.sh start
zkServer.sh status