tureba / MongoDB-Lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDB-Lab

Running Vagrantfile

# vagrant up 

By now you should have 3 CentOS 7.X servers running

# vagrant status
Current machine states:

mongodb-node01            running (virtualbox)
mongodb-node02            running (virtualbox)
mongodb-node03            running (virtualbox)

Installing MongoDB

First of all, ssh in one of the machines and copy the mongodb.repo from the /vagrant to /etc/yum.repos.d

$ sudo su -
# cp /vagrant/mongodb.repo /etc/yum.repos.d/

Now, update the list of repositories and install mongodb-org package.

# yum repolist
# yum install -y mongodb-org

Enable MongoDB on systemd and start mongod.service

# systemctl enable mongod.service
# systemctl start mongod.service

By now you should have a mongd process running on this machine, type mongo and see if you are droped to a mongo-shell environment.

# mongo
>

About


Languages

Language:Shell 53.1%Language:HTML 33.1%Language:JavaScript 8.8%Language:Python 5.0%