标签:pre 恢复备份 redhat http www cal span root color
最近白嫖了一年的服务器,打算在服务器上跑一个Python项目,没想到居然预装的是Python2.7.5。本来是打算把Python2.7.5卸载,在进行安装Python3。但是发现卸载Python2.7.5发现出现一系列的错误,无奈之下只能恢复备份。突然想到干嘛不直接从Python2.7.5升级到python3。
more /etc/redhat-release
python -V
yum install gcc gcc-c++ zlib* wget -y
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz
tar xvf Python-3.6.4.tar.xz
cd Python-3.6.4
./configure
make && make install
python3 -V #显示 Python 3.6.4
python -V #显示 Python 2.7.5
ls -al /usr/bin/python #显示lrwxrwxrwx 1 root root 7 Feb 8 14:24 /usr/bin/python -> python2 mv /usr/bin/python /usr/bin/python.bak ln -s /usr/local/bin/python3 /usr/bin/python ls -al /usr/bin/python #显示lrwxrwxrwx 1 root 22 Feb 23:30 /usr/bin/python -> /usr/local/bin/python3
python -V #显示Python 3.6.4
标签:pre 恢复备份 redhat http www cal span root color
原文地址:https://www.cnblogs.com/huangshengpeng/p/12301943.html