1、ECS服务器申请
使用阿里云账号购买了一个美国(弗吉尼亚)的2C/2G的CentOS7.9 x64服务器。
2、系统版本升级
CentOS7.9默认的python和pip版本都是3.6的,需要升级到3.9以上,升级步骤百度,大致如下:
wget https://www.python.org/ftp/python/3.10.11/Python-3.10.11.tgz
tar -vxfz Python-3.10.11.tgz
yum groupinstall -y "Development tools"
yum install -y openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel psmisc libffi-devel
cd Python-3.10.11
mkdir /usr/local/python3
./configure --prefix=/usr/local/python3
make && make install
mv /usr/bin/python3 /tmp/
mv /usr/bin/pip3 /tmp/
ln -s /usr/local/python3/bin/python3.10 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3