Red Hat Enterprise Linux Server release 6.4x64 install yum source, x64yum
If you want to install mongodb in redhat, yum cannot be used. You can install mongodb on the Internet.
I tried it online several times but failed. Looking at it, I also found the rule and knew how to change it.
First uninstall the built-in:
rpm -aq | grep yum | xargs rpm -e --nodeps
Download a few necessary packages: (I am a 64-bit user. If not, visit http://ftp.sjtu.edu.cn/centos/6/ OS/OK)
wget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
wget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-3.2.29-60.el6.centos.noarch.rpm
wget http://ftp.sjtu.edu.cn/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
Install yum:
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
rpm -ivh yum-3.2.29-60.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm
Edit repo package: (you can delete it first)
vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-6-Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever6&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/6/os/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#released updates
[update]
name=CentOS-6-Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/6/updates/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[extras]
name=CentOS-6-Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras
baseurl=http://ftp.sjtu.edu.cn/centos/6/extras/$basearch/
gpgcheck=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6-Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/6/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-6-Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/6/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
Check the path of each URL above and check whether the URL exists. If it is another version, change the above 6, other versions may have other configurations (such as centos5 and [addons]).
Gpgkey = http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6 # This also corresponds to the version
Import gpgkey: (currently, the second line is used for import)
#rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6
rpm --import http://ftp.sjtu.edu.cn/centos/6/os/x86_64/RPM-GPG-KEY-CentOS-6
Clear cache:
yum clean all
Test yum installation:
yum install vim
yum install mysql*
Installation successful !~
Refer:
Http://blog.itpub.net/23890223/viewspace-757724/
Http://blog.itpub.net/25313300/viewspace-708509/
Http://blog.chinaunix.net/uid-20729583-id-2972852.html