Difference between revisions of "MongoDB"

From RHS Wiki
Jump to navigation Jump to search
(Created page with "== Installation == === Ubuntu 14.04 === sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongod...")
 
Line 6: Line 6:
 
  sudo apt-get install -y mongodb-org
 
  sudo apt-get install -y mongodb-org
 
  # Specific version install: sudo apt-get install -y mongodb-org=3.2.1 mongodb-org-server=3.2.1 mongodb-org-shell=3.2.1 mongodb-org-mongos=3.2.1 mongodb-org-tools=3.2.1
 
  # Specific version install: sudo apt-get install -y mongodb-org=3.2.1 mongodb-org-server=3.2.1 mongodb-org-shell=3.2.1 mongodb-org-mongos=3.2.1 mongodb-org-tools=3.2.1
 +
 +
== Start/Stop/Restart MongoDB ==
 +
sudo service mongod start | stop | restart
 +
 +
== Verify that MongoDB has started successfully ==
 +
Verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log for a line reading
 +
[initandlisten] waiting for connections on port <port>
 +
 +
== Guides ==
 +
[https://docs.mongodb.org/manual/#getting-started Getting Started]<br />
 +
[https://docs.mongodb.org/manual/administration/production-notes/ Before deploying MongoDB in a production environment]
 +
 +
== Data directories ==
 +
/var/log/mongodb
 +
/var/lib/mongodb

Revision as of 16:01, 1 February 2016

Installation

Ubuntu 14.04

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
# Specific version install: sudo apt-get install -y mongodb-org=3.2.1 mongodb-org-server=3.2.1 mongodb-org-shell=3.2.1 mongodb-org-mongos=3.2.1 mongodb-org-tools=3.2.1

Start/Stop/Restart MongoDB

sudo service mongod start | stop | restart

Verify that MongoDB has started successfully

Verify that the mongod process has started successfully by checking the contents of the log file at /var/log/mongodb/mongod.log for a line reading

[initandlisten] waiting for connections on port <port>

Guides

Getting Started
Before deploying MongoDB in a production environment

Data directories

/var/log/mongodb
/var/lib/mongodb