赞
踩
1、先安装组件
yum -y install perl perl-devel gcc gcc-c++
2、下载openssl 1.1.1o
wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz --no-check-certificate
3、解压进入openssl-1.1.1o目录并编译
tar -zxvf openssl-1.1.1o.tar.gz
cd openssl-1.1.1o
./config --prefix=/usr/local/openssl
make && make install
4、备份文件
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old
mv /usr/lib64/openssl /usr/lib64/openssl.old
mv /usr/lib64/libssl.so /usr/lib64/libssl.so.old
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v
5、 检查版本
openssl version
OpenSSL 1.1.1q 5 Jul 2022
1.卸载自带Python2.7.5
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
2.删除残余文件
whereis python |xargs rm -frv
3.验证删除
whereis python
1.安装依赖
yum -y groupinstall "Development tools"
yum install -y ncurses-devel gdbm-devel xz-devel sqlite-devel tk-devel uuid-devel readline-devel bzip2-devel libffi-devel
yum install -y openssl-devel openssl11 openssl11-devel
2.下载python3.10.4
wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz
tar xvzf Python-3.10.4.tgz
cd Python-3.10.4
3、编译安装
进入Modules目录,修改Setup文件中的ssl目录
编译安装
./configure --with-openssl=/usr/local/openssl
make && make install
验证安装:
/usr/local/bin/python3.10 --version
/usr/local/bin/pip3.10 --version
通过设置软链接简化命令输入:
ln -sf /usr/local/bin/python3.10 /usr/bin/python3
ln -sf /usr/local/bin/pip3.10 /usr/bin/pip3
配置pip源
新建pip配置文件
mkdir -p ~/.pip
touch ~/.pip/pip.conf
编辑配置文件
vim ~/.pip/pip.conf
[global]
index-url=http://mirrors.aliyun.com/pypi/simple/
#proxy = [user:passwd@]proxy.server:port
[install]
trusted-host=
mirrors.aliyun.com
ssl_verify: false
验证
pip3 install --upgrade pip
1、下载安装
pip3 install elastalert2
git clone https://github.com/jertel/elastalert2.git
$ pip3 install "setuptools>=11.3"
$ pip3 install -r requirements.txt
$ python3 setup.py install
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。