脚本
#!/bin/bash yum install -y gcc make cd /usr/src curl -O https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz tar xzf Python-2.7.12.tgz cd Python-2.7.12 ./configure make altinstall
CentOS 7 安装 python 3.6.5
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm sudo yum install -y python36u python36u-libs python36u-devel python36u-pip
CentOS 7.7, Python 3 is available in the base package repository
# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) # yum install -y python3 python3-devel
Leave a Reply