Monday, June 8, 2015

Install MongoDB on CentOS 6.6

To install MongoDB on CentOS 6.6,

you add MongoDB repository as follows:

sudo vi /etc/yum.repos.d/mongodb-org-3.0.repo

[mongodb-org-3.0]
name=MongoDB Repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
gpgcheck=0
enabled=1

Install MongoDB by `yum` as follows:

sudo yum install -y mongodb-org

Start MongoDB by `service` as follows:

sudo /sbin/service mongod start

Check listening port as follows:

sudo vi /var/log/mongodb/mongod.log

2015-06-08T21:14:23.908+0900 I NETWORK  [initandlisten] waiting for connections on port 27017

Run MongoDB client as follows:

mongo

Reference:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/

No comments:

Post a Comment