<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=MongoDB%2FStartup</id>
	<title>MongoDB/Startup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://charlesreid1.com/w/index.php?action=history&amp;feed=atom&amp;title=MongoDB%2FStartup"/>
	<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=MongoDB/Startup&amp;action=history"/>
	<updated>2026-06-20T07:58:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.12</generator>
	<entry>
		<id>https://charlesreid1.com/w/index.php?title=MongoDB/Startup&amp;diff=25141&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;==Starting==  MongoDB can be started with systemd, or using the init.d startup scripts. I hate systemd so I went with the latter.  Start by creating the directory where MongoD...&quot;</title>
		<link rel="alternate" type="text/html" href="https://charlesreid1.com/w/index.php?title=MongoDB/Startup&amp;diff=25141&amp;oldid=prev"/>
		<updated>2018-11-04T12:27:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Starting==  MongoDB can be started with systemd, or using the init.d startup scripts. I hate systemd so I went with the latter.  Start by creating the directory where MongoD...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Starting==&lt;br /&gt;
&lt;br /&gt;
MongoDB can be started with systemd, or using the init.d startup scripts. I hate systemd so I went with the latter.&lt;br /&gt;
&lt;br /&gt;
Start by creating the directory where MongoDB will keep all of its data. For example, I used &amp;lt;code&amp;gt;/opt/mongodb&amp;lt;/code&amp;gt;. Set the permissions so that the mongodb user/group can read/write to this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo chown -R mongodb:mongodb mongodb/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now start the service, which is defined in &amp;lt;code&amp;gt;/etc/init.d/mongodb&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo service mongodb start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can issue the status command in place of the start command to check if the process is running:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sudo service mongodb status&lt;br /&gt;
● mongodb.service - LSB: An object/document-oriented database&lt;br /&gt;
   Loaded: loaded (/etc/init.d/mongodb; bad; vendor preset: enabled)&lt;br /&gt;
   Active: active (running) since Tue 2018-01-30 16:59:10 PST; 1min 38s ago&lt;br /&gt;
     Docs: man:systemd-sysv-generator(8)&lt;br /&gt;
  Process: 1962 ExecStart=/etc/init.d/mongodb start (code=exited, status=0/SUCCESS)&lt;br /&gt;
 Main PID: 13596 (code=exited, status=0/SUCCESS)&lt;br /&gt;
   CGroup: /system.slice/mongodb.service&lt;br /&gt;
           └─1973 /usr/bin/mongod --config /etc/mongodb.conf&lt;br /&gt;
&lt;br /&gt;
Jan 30 16:59:09 jupiter systemd[1]: Starting LSB: An object/document-oriented database...&lt;br /&gt;
Jan 30 16:59:09 jupiter mongodb[1962]:  * Starting database mongodb&lt;br /&gt;
Jan 30 16:59:10 jupiter mongodb[1962]:    ...done.&lt;br /&gt;
Jan 30 16:59:10 jupiter systemd[1]: Started LSB: An object/document-oriented database.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also turn on logging, and look at the log files in &amp;lt;code&amp;gt;/var/log/mongodb/mongodb.log&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:MongoDB]]&lt;br /&gt;
[[Category:2018&lt;br /&gt;
[[Category:February 2018]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>