升級 Python 後 yum 不可用的站群解決方案
在 Centos 官網上查到了一篇檔案,方法如下。
首先找到你安裝 Centos 的光碟或者 ISO 檔案,只要系統版本一樣即可。複製如下檔案到系統某目錄中:
python-2.6.6-36.el6.x86_64.rpm
python-urlgrabber-3.9.1-8.el6.noarch.rpm
python-devel-2.6.6-36.el6.x86_64.rpm
python-libs-2.6.6-36.el6.x86_64.rpm
yum-3.2.29-40.el6.centos.noarch.rpm
具體版本號,根據你係統盤或者 ISO 提供為準。
rpm -Uvh –replacepkgs *.rpm
#出現如下提示
Preparing… ########################################### [100%]
1:python-libs ########################################### [ 20%]
2:python ########################################### [ 40%]
3:python-urlgrabber ########################################### [ 60%]
4:yum ########################################### [ 80%]
5:python-devel ########################################### [100%]
執行 yum 命令,你熟悉的介面出現了~~
php 安裝
rpm -qa | grep php | xargs rpm -e –nodeps
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
semanage port -l|grep http
semanage port -a -t http_port_t -p tcp 9910   當開啟 selinux,則需要執行這個命令, 如果 selinux 關閉,則不用執行這個命令增加埠進去。
/etc/init.d/httpd start