Install mongodb in CentOS
Depending on the architecture, add the mongo repo to your system.
1)First find if your machine is 32 bit or 64 bit as follows.
uname -m
i686 – it is 32 bit
x86_64 – it is 64 bit.
2) Create the mongo repo as follows.
# vi /etc/yum.repos.d/10gen.repo
If it is 32bit machine, add the following to the file.
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0
enabled=1
If it is a 64bit machine, use the following.
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
3) Now you can use yum to install mongo.
yum install mongo-10gen mongo-10gen-server
Mongo is now installed and you can start and stop mongo as follows.
/etc/rc.d/init...
Recent Comments