centos6 hostsolutions openvz折腾

#宝塔hostsolutions解决方案
rpm -e --nodeps iptables

#安装启用 IUS 社区源

yum install epel-release curl nss rpm ca-certificates -y
#update-ca-trust 不用
curl 'https://setup.ius.io/' -o setup-ius.sh
sh setup-ius.sh

#wget  忽略证书
#参考https://www.zcfy.cc/article/3-methods-to-install-latest-python3-package-on-centos-6-system




#chkconfig iptables off
#rpm -e --nodeps iptables



yum --enablerepo=ius install openssl python  htop nano wget curl epel-release yum yum-plugin-fastestmirror -y

#yum --enablerepo=ius update rpm openssl -y

yum --enablerepo=ius install python27* python36u -y

#yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
#yum groupinstall -y "Development tools"
#wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
#tar zxf Python-2.7.15.tgz
#cd Python-2.7.15
#./configure
#make && make install

#ls /usr/bin/python*

##下面copy cp已经处理
#nano /usr/bin/yum
#!/usr/bin/python
#改为:
#!/usr/bin/python2.6

#cd /usr/bin/
mv /usr/bin/python /usr/bin/python.old
rm -f /usr/bin/python-config
#cp /usr/bin/python2.7 /usr/bin/python
ln -s /usr/bin/python2.7 /usr/bin/python
#ln -s /usr/bin/python2.7-pydoc /usr/bin/python-config
#ln -s /usr/bin/python2.6 /usr/bin/python
#python -V

cp -r /usr/lib/python2.6/site-packages/yum /usr/lib/python2.7/site-packages/
cp -r /usr/lib/python2.6/site-packages/rpmUtils /usr/lib/python2.7/site-packages/
cp -r /usr/lib/python2.6/site-packages/iniparse /usr/lib/python2.7/site-packages/
cp -r /usr/lib/python2.6/site-packages/urlgrabber /usr/lib/python2.7/site-packages/
cp -r /usr/lib64/python2.6/site-packages/rpm /usr/lib/python2.7/site-packages/
cp -r /usr/lib64/python2.6/site-packages/curl /usr/lib/python2.7/site-packages/
cp -p /usr/lib64/python2.6/site-packages/pycurl.so /usr/lib/python2.7/site-packages/
cp -p /usr/lib64/python2.6/site-packages/_sqlitecache.so /usr/lib/python2.7/site-packages/
cp -p /usr/lib64/python2.6/site-packages/sqlitecachec.py /usr/lib/python2.7/site-packages/
cp -p /usr/lib64/python2.6/site-packages/sqlitecachec.pyc /usr/lib/python2.7/site-packages/
cp -p /usr/lib64/python2.6/site-packages/sqlitecachec.pyo /usr/lib/python2.7/site-packages/


#rm -rf /usr/lib/python2.7/site-packages/yum/
#rm -rf /usr/lib/python2.7/site-packages/rpmUtils/
#rm -rf /usr/lib/python2.7/site-packages/iniparse/
#rm -rf /usr/lib/python2.7/site-packages/urlgrabber/
#rm -rf /usr/lib/python2.7/site-packages/rpm/
#rm -rf /usr/lib/python2.7/site-packages/curl/
#rm -rf /usr/lib/python2.7/site-packages/pycurl.so
#rm -rf /usr/lib/python2.7/site-packages/_sqlitecache.so
#rm -rf /usr/lib/python2.7/site-packages/sqlitecachec.py
#rm -rf /usr/lib/python2.7/site-packages/sqlitecachec.pyc
#rm -rf /usr/lib/python2.7/site-packages/sqlitecachec.pyo

ln -s /usr/bin/pip2.7 /usr/bin/pip
pip install --upgrade pip
#pip -V



#参考https://teddysun.com/473.html


#安装pip
#wget https://bootstrap.pypa.io/get-pip.py
#python get-pip.py

#参考https://www.jianshu.com/p/a78e1fb2bd93
#pip -V

#yum install python-pip -y

#nano /usr/bin/pip
#!/usr/bin/python
#改为:
#!/usr/bin/python26


#使用 Software Collections 源 (SCL)  忽略
#yum install centos-release-scl -y
#yum install rh-python36 -y
#yum install python27 -y


yum --enablerepo=ius update -y

#宝塔hostsolutions解决方案
chkconfig iptables off
卸载 iptables:
rpm -e --nodeps iptables

yum remove httpd -y

#宝塔对于openvz的坑
yum -y install sudo

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh









发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据