1. 程式人生 > >Linux RHEL6 64位安裝163軟體源

Linux RHEL6 64位安裝163軟體源

哇咔咔,折騰了幾個小時候終於折騰完了,在網上找了一堆教程,發現時間都是很早的了,本帖更新時間2018/6/5

轉載還希望說明出處啊!!

如果你懶得看!那麼請直接到文章尾部,複製全部指令,貼上運

行就行了!

1、清除原來所有的yum

rpm -aq|grep yum|xargs rpm -e --nodeps

2、建立個臨時目錄放置等下需要下載的檔案

mkdir /home/yuminstall/

cd /home/yuminstall

3、下載所需要的軟體包

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-2.6.6-64.el6.x86_64.rpm

wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-libs-2.6.6-66.el6_8.x86_64.rpm

說實話,不是我不想讓上面格式好看點,是我真的不會用新版的介面啊!!!

如果以上某個連結掛了 那麼就複製地址,去原地址找更新以後的檔案(比如:

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

那麼下載地址就是:

http://mirrors.163.com/centos/6/os/x86_64/Packages/

然後在瀏覽器頁面使用CTRL+F大法,搜尋yum-metadata-parser 然後定位一下  就是那個更新以後的檔案了

複製檔名,把檔名和下載連結拼接(http://mirrors.163.com/centos/6/os/x86_64/Packages/檔名)

就醬紫 解決連結掛了的問題,或者你可以在帖子下面留個言,告訴我連結掛了

4、安裝軟體包

說明一下:

RHEL6 64位,下載下來的基本上python套件的版本都是比較舊的,所以在網上參考的一些帖子,到了安裝yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm 的時候各種報錯

所以!!!安裝個新的python套件。

rpm -ivh python-libs-2.6.6-66.el6_8.x86_64.rpm python-2.6.6-64.el6.x86_64.rpm --nodeps  --force

然後就是安裝另外一個python元件包了  具體幹啥的我也不是很清楚,裝就完事了

rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps --force

接著就是各種教程都有的三個安裝步驟了

rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm --nodeps --force
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

5、更新yum檔案

cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -i "s;\$releasever;6;g" CentOS6-Base-163.repo
mv rhel-source.repo rhel-source.repo.bak

6、更新本地yum倉庫

yum clean all

yum makecache

yum repolist

7、測試一哈子

yum install gcc

測試是沒問題滴

8、刪除下載的檔案

rm -rf /home/yuminstall/

懶得看的,複製下面所有的指令:

rpm -aq|grep yum|xargs rpm -e --nodeps
mkdir /home/yuminstall/
cd /home/yuminstall
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-2.6.6-64.el6.x86_64.rpm
wget ftp://mirror.switch.ch/pool/4/mirror/scientificlinux/6.5/x86_64/updates/security/python-libs-2.6.6-66.el6_8.x86_64.rpm
rpm -ivh python-libs-2.6.6-66.el6_8.x86_64.rpm python-2.6.6-64.el6.x86_64.rpm --nodeps  --force
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm --nodeps --force
rpm -ivh yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm --nodeps --force
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
sed -i "s;\$releasever;6;g" CentOS6-Base-163.repo
mv rhel-source.repo rhel-source.repo.bak
mv CentOS6-Base-163.repo rhel-source.repo
yum clean all
yum repolist
rm -rf /home/yuminstall/