I would like to install MongoDB into the Redhat, Yum can not be used, see the internet said to be installed separately.
Tried several times on the internet, no success. Looking at also found the law, know how to change.
Bring your own uninstall first:
Rpm-aq | grep Yum | Xargs rpm-e--nodeps
Download a few necessary packages: (I'm 64-bit, not the words first 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 the Repo package: (If you can also delete it first)
Vi/etc/yum.repos.d/centos-base.rep
[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
Note Check each URL path above, on the Web page to see if it exists, if it is a different version, the above 6 changes, other versions may have other configurations (such as CENTOS5 and [addons]).
Gpgkey=http://mirror.centos.org/centos/rpm-gpg-key-centos-6 #这个也要对应版本
Import Gpgkey: (currently imported using the second row)
#rpm--import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6rpm--import http://ftp.sjtu.edu.cn/centos/6/os/ X86_64/rpm-gpg-key-centos-6
Clear cache:
Yum Clean All
To test the Yum installation:
Yum Install vim
Yum Install mysql*
Install successfully! ~
Reference:
http://blog.itpub.net/23890223/viewspace-757724/
http://blog.itpub.net/25313300/viewspace-708509/
Http://blog.chinaunix.net/uid-20729583-id-2972852.html
Red Hat Enterprise Linux Server release 6.4 x64 install Yum source