python3.8、3.9安装
安装ansible并配置(可选,批量时)
[root@hdss7-10 ~]# yum -y install epel-release yum-utils
[root@hdss7-10 ~]# yum -y install ansible
[root@hdss7-10 ~]# vim /etc/ansible/ansible.cfg
[defaults] inventory = /etc/ansible/hosts
ask_pass = False
remote_port = 22
host_key_checking = False
remote_user = root
[root@hdss7-10 ~]# vim /etc/ansible/hosts
[admin]
172.16.186.10
[node]
172.16.186.11 172.16.186.12 172.16.186.13
生成秘钥
[root@hdss7-10 ~]# ssh-keygen -t rsa -P ''
[root@hdss7-10 ~]# for i in {10..13};do ssh-copy-id root@172.16.186.$i;done
安装pyhton3环境
[root@hdss7-10 ~]# cat >> 1.sh <> /etc/profile << EOF
export PYTHON_HOME=/usr/local/python3.9
export PATH=\$PYTHON_HOME/bin:\$PATH
EOF
source /etc/profile
[root@hdss7-10 Python-3.9.1]# cd
[root@hdss7-10 ~]# python3.9 Python 3.9.1
Ubuntu 20 安装
# sudo apt upgrade -y sudo apt install -y software-properties-common
sudo apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz
tar -zxvf Python-3.9.1.tgz
cd Python-3.9.1/
./configure --enable-optimizations --prefix=/usr/local/python3.9
sudo make && sudo make install
sudo vim /etc/profile
export PYTHON_HOME=/usr/local/python3.9
export PATH=$PYTHON_HOME/bin:$PATH
source /etc/profile
.
.
.
.
游走在各发行版间老司机QQ群:905201396
不要嫌啰嗦的新手QQ群:756805267
Debian适应QQ群:912567610