准备
依赖工具
yum -y install zlib-devel bzip2-devel openssl-devel
yum -y install ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel xz-devel
yum -y install wget
编译工具
yum install -y gcc #编译器
yum install libffi-devel -y
openssl安装
cd /opt
find /etc/ -name openssl.cnf -printf "%h\n"
--
/etc/pki/tls
# 3.x的版本在centos 8下安装不兼容
curl -O https://www.openssl.org/source/openssl-1.1.1m.tar.gz
tar zxvf penssl-1.1.1m.tar.gz
cd openssl-1.1.1m
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/pki/tls
make -j1 depend
make -j8 && make install_sw
popd
下载安装python3
创建安装路径
mkdir -p /usr/local/python3
下载程序并解压
cd /opt
wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tar.xz
tar xvf Python-3.10.2.tar.xz
cd Python-3.10.2
编译安装
./con