刷新硬盘存储

resize2fs /dev/vda1

删除指定目录所有文件  

rm -rf /目录

更新openssl

yum install http://cbs.centos.org/kojifiles/packages/pyOpenSSL/16.2.0/3.el7/noarch/python2-pyOpenSSL-16.2.0-3.el7.noarch.rpm

苹果CMSV10数据库更新图片地址

UPDATE {pre}vod SET vod_pic=REPLACE(vod_pic, '.jpg-ys1', '.jpg')  
UPDATE {pre}vod SET vod_pic=REPLACE(vod_pic, '.jpg', '.jpg-ys1') 
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, 'https', 'http') 
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, 'http', 'https')
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, '线路②$https', '线路②$http')
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, '线路③$https', '线路③$http')
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, '线路④$https', '线路④$http')
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, '线路⑤$https', '线路⑤$http')
UPDATE {pre}vod SET vod_play_url=REPLACE(vod_play_url, '线路⑥$https', '线路⑥$http')

Lunix目录软连接

#把前面的目录软连接到后面的files目录里,在后面的files里会自动新建article目录
ln -s /qnoss/jdddog/files/article /www/wwwroot/jdddog.com/files
ln -s /qnoss/jdddog/files/forum /www/wwwroot/jdddog.com/files
ln -s /qnoss/jdddog/files/system /www/wwwroot/jdddog.com/files
#删除软连接
rm -rf /www/wwwroot/jdddog.com/files/article
rm -rf /www/wwwroot/jdddog.com/files/forum

重装Python和Yum

#彻底卸载Python
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps 
whereis python |xargs rm -frv   
whereis python 
#彻底删除Yum
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps 
whereis yum |xargs rm -frv 
whereis yum 
#下载Python安装包
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python2-rpm-macros-3-32.el7.noarch.rpm 
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-srpm-macros-3-32.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-rpm-macros-3-32.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-backports-1.0-8.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-ipaddress-1.0.16-2.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-setuptools-0.9.8-7.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-urlgrabber-3.10-10.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-2.7.5-88.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-iniparse-0.4-9.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-libs-2.7.5-88.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/python-devel-2.7.5-88.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-4.11.3-43.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/rpm-python-4.11.3-43.el7.x86_64.rpm
#安装Python
sudo rpm --replacefiles --replacepkgs -ivh python2-rpm-macros-3-32.el7.noarch.rpm python-srpm-macros-3-32.el7.noarch.rpm python-rpm-macros-3-32.el7.noarch.rpm python-backports-1.0-8.el7.x86_64.rpm python-pycurl-7.19.0-19.el7.x86_64.rpm python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm python-ipaddress-1.0.16-2.el7.noarch.rpm python-setuptools-0.9.8-7.el7.noarch.rpm python-urlgrabber-3.10-10.el7.noarch.rpm python-2.7.5-88.el7.x86_64.rpm python-iniparse-0.4-9.el7.noarch.rpm python-libs-2.7.5-88.el7.x86_64.rpm python-devel-2.7.5-88.el7.x86_64.rpm rpm-4.11.3-43.el7.x86_64.rpm rpm-python-4.11.3-43.el7.x86_64.rpm
#下载Yum安装包
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-167.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-53.el7.noarch.rpm
#安装Yum
sudo rpm --replacefiles --replacepkgs -ivh yum-3.4.3-167.el7.centos.noarch.rpm rpm-python-4.11.3-43.el7.x86_64.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm yum-plugin-fastestmirror-1.1.31-53.el7.noarch.rpm rpm-4.11.3-43.el7.x86_64.rpm
#运行Makecache 生成缓存
yum makecache 
#运行Yum clean all
yum clean all
#更新Yum文件
yum update

安装Epel

rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

查看usr/bin/下python信息

ls -l python* 

更改Python后需要修改相对应地方的版本号,比如python2-->python3

vi /usr/bin/yum
vi /usr/libexec/urlgrabber-ext-down
vi /usr/bin/firewall-cmd

查看宝塔信息

sudo /etc/init.d/bt 

需要安装的模块

pip install gevent psutil flask flask-sockets flask_session

(面板进不去的时候需要安装这些模块,常用于Python升降级导致面板无法打开的问题)

最后修改:2020 年 07 月 10 日 08 : 05 AM
如果觉得我的文章对你有用,请随意赞赏