wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/cpp-4.8.2-16.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/gcc-4.8.2-16.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-common-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-devel-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-headers-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-static-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/glibc-utils-2.17-55.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/kernel-headers-3.10.0-123.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/libmpc-1.0.1-3.el7.x86_64.rpm
wget http://vault.centos.org/7.0.1406/os/x86_64/Packages/mpfr-3.1.1-4.el7.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm --nodeps --force
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm --nodeps --force
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm --nodeps --force
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm --nodeps --force
rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm --nodeps --force
rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm --nodeps --force
rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm --nodeps --force
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm --nodeps --force
rpm -ivh libstdc+±devel-4.4.6-4.el6.x86_64.rpm --nodeps --force
rpm -ivh gcc-c+±4.4.6-4.el6.x86_64.rpm --nodeps --force
删除数据:SysUserDeptPost{userId=10176, deptId=204, postId=110, mainPost=false, endTime=Tue Aug 18 00:00:00 CST 2020}
ln -s /usr/python37/bin/python3.7 /usr/bin/python
ln -s /usr/python37/bin/python3.7 /usr/bin/python
ln -s /usr/python37/bin/pip3 /usr/bin/pip
ln -s /usr/python275/bin/python2 /usr/bin/python2
ln -s /usr/python275/bin/pip2 /usr/bin/pip2
wget https://mirrors.huaweicloud.com/python/2.6.0/Python-2.6.0.tgz
wget https://mirrors.huaweicloud.com/python/2.7.1/Python-2.7.1.tgz
tar -xvzf Python-2.7.1.tgz
./configure --prefix=/usr/python271 --with-ssl
make
make install
ln -s /usr/python271/bin/python2.7 /usr/bin/python271
ln -s /usr/python26/bin/python2.6 /usr/bin/python2.6
Detailed explanation of the process of
deleting the Linux system's own version of Python. Giant pit, do not easily delete the Linux system's own version of Python
1. Uninstall python (to prevent it from being uninstalled clean)
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps #Force delete installed programs and their associated
whereis python|xargs rm -frv # delete all residual files #xargs , Allows you to execute some other commands on the output
2. Uninstall yum
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
rm -rf /etc/yum.repos.d/*
whereis yum|xargs rm -frv
3. Verify that the deletion is clean
whereis python #Verify and delete, there should be no result returned
whereis yum
4. Install python and yum
Software download address (my system is centos 7.5.1804)
Check the Linux system version: cat /etc/redhat-release
http://vault.centos.org/7.5.1804/os/x86_64/Packages/ The
required files are as follows: (Just download the corresponding version of your own system)
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/lvm2-python-libs-2.02.177-4.el7.x86_64.rpm
wget http ://vault.centos.org/7.5.1804/os/x86_64/Packages/libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
wget http://vault.centos.org/7.5.1804 /os/x86_64/Packages/python-libs-2.7.5-68.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-ipaddress-1.0.16 -2.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-backports-1.0-8.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-2.7.5-68.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-urlgrabber-3.10-8.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-setuptools-0.9.8-7.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-kitchen-1.1.1-5.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/python-chardet-2.2.1-1.el7_1.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/rpm-python-4.11.3-32.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-utils-1.1.31-45.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-3.4.3-158.el7.centos.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-aliases-1.1.31-45.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-protectbase-1.1.31-45.el7.noarch.rpm
wget http://vault.centos.org/7.5.1804/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-45.el7.noarch.rpm
5. Upload and install
I'm here or directly wget to a directory after fetching the link, just enter the directory and execute the command
rpm -Uvh --replacepkgs lvm2-python-libs*.rpm --nodeps --force
rpm -Uvh --replacepkgs libxml2-python*.rpm --nodeps --force
rpm -Uvh --replacepkgs python*.rpm - nodeps --force
rpm -Uvh --replacepkgs rpm-python*.rpm yum*.rpm --nodeps --force
execute after successful installation
yum
python
first backs up /etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
Download the corresponding version repo file, and put it in /etc/yum.repos.d/(Operation Please make a corresponding backup before)
CentOS7 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
CentOS6
CentOS5
Run the following command to generate cache