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.
i686 – it is 32 bit
x86_64 – it is 64 bit.
2) Create the mongo repo as follows.
If it is a 64bit machine, use the following.
3) Now you can use yum to install mongo.
4) The configuration file for mongo is present at /etc/mongod.conf
5) The data directory can be mentioned in the configuration file. By default, it resides at /var/lib/mongo/