<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MongoDB &#8211; Hostry Help Center</title>
	<atom:link href="https://help.hostry.com/article-tags/mongodb/feed/" rel="self" type="application/rss+xml" />
	<link>https://help.hostry.com</link>
	<description>Full information on how to use HOSTRY, provided by 24/7 community based support</description>
	<lastBuildDate>Mon, 08 Feb 2021 08:25:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.9.12</generator>

<image>
	<url>https://help.hostry.com/wp-content/uploads/cache/2021/01/cropped-apple-icon-180x180-1/836712163.png</url>
	<title>MongoDB &#8211; Hostry Help Center</title>
	<link>https://help.hostry.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How To Install MongoDB on CentOS</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-mongodb-on-centos/</link>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Thu, 08 Oct 2020 10:28:35 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2349</guid>

					<description><![CDATA[MongoDB is a general-purpose, distributed, document-based database built for modern app developers and the cloud era. It is the leading NoSQL database most commonly used in modern web applications. This article will describe how to install this Database on a Linux distribution such as CentOS. The guide focuses on the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://www.mongodb.com/"><strong>MongoDB</strong></a>  is a general-purpose, distributed, document-based database built for modern app developers and the cloud era. It is the leading NoSQL database most commonly used in modern web applications. This article will describe how to install this Database on a Linux distribution such as CentOS. The guide focuses on the following distribution versions: <strong>RHEL / CentOS 8, RHEL / CentOS 7 </strong>and older<strong> &#8211; RHEL / CentOS 6</strong></p>



<h2 id="install-mongodb-community-edition" >Install MongoDB Community Edition</h2>



<p>Install <strong>MongoDB</strong> Database using <strong>CentOS</strong> Package Installation Manager &#8211; <strong><em>yum</em></strong>. First, you need to create a file<strong> /etc/yum.repos.d/mongodb-org-4.4.repo</strong> for this database</p>



<pre class="wp-block-code"><code># nano /etc/yum.repos.d/mongodb-org-4.4.repo</code></pre>



<p>Then paste into your text editor what is described below:</p>



<pre class="wp-block-code"><code>&#91;mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc</code></pre>



<p>Save this and then you can close your text editor. After that, if you want to install the latest, stable and current version of <strong>MongoDB</strong>, you need to enter the following:</p>



<pre class="wp-block-code"><code># sudo yum install -y mongodb-org</code></pre>



<h2 id="configuring-mongodb" >Configuring MongoDB</h2>



<p>At this stage, the installation of this Database is completed. Now you need to configure it. To do this, you must first start MongoDB</p>



<pre class="wp-block-code"><code># systemctl start mongod.service
# systemctl enable mongod.service</code></pre>



<p>Next, connect to <strong>MongoDB</strong></p>



<pre class="wp-block-code"><code># mongo</code></pre>



<p>MongoDB is insecure by default. You can follow this <strong><a href="https://help.hostry.com/knowledge-base/securing-mongodb/">link</a></strong> to configure security and authentication of this Database.</p>



<blockquote class="wp-block-quote"><p>If you need to install a specific version or prevent automatic updates, you can see the  MongoDB <strong><a href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/">documentation</a></strong>.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How To Install MongoDB on FreeBSD</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-mongodb-on-freebsd/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-mongodb-on-freebsd/#comments</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Wed, 21 Oct 2020 10:01:38 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2387</guid>

					<description><![CDATA[MongoDB is a very powerful resource and fast NoSQL database. As for the repositories on Debian, they update very slowly and often contain outdated versions of packages. This article&#8217;ll work for both x86 and x64 architectures, but note that MongoDB works best on 64-bit architectures. Update the package repository \Before [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>MongoDB is a very powerful resource and fast NoSQL database. As for the repositories on Debian, they update very slowly and often contain outdated versions of packages. This article&#8217;ll work for both x86 and x64 architectures, but note that MongoDB works best on 64-bit architectures.</p>



<h2 id="update-the-package-repository" >Update the package repository</h2>



<p>\Before installing MongoDB, you need to make sure everything is up to date. This can be done by running the following command accordingly:</p>



<pre class="wp-block-code"><code>pkg update</code></pre>



<p>There may be the following message stating that &#8220;<strong>package management tool</strong>&#8221; is not available, type <strong>Y</strong>, press Enter to continue. You can run pkg update -f a forced update if needed. If unsuccessful, go to step 2 &#8211;<strong> Installing MongoDB</strong></p>



<h2 id="installing-mongodb" >Installing MongoDB</h2>



<p>Install <strong>MongoDB</strong> using the following command:</p>



<pre class="wp-block-code"><code>pkg install mongodb</code></pre>



<h2 id="start-and-test-the-installation-of-mongodb" >Start and Test The Installation of MongoDB</h2>



<p>Check your <strong>MongoDB</strong> installation. This command will start the service:</p>



<pre class="wp-block-code"><code>service mongod onestart</code></pre>



<p>The consol&#8217;ll look loke this:</p>



<pre class="wp-block-code"><code>MongoDB shell version: 4.4
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
    http://docs.mongodb.org/
Questions? Try the support group
    http://groups.google.com/group/mongodb-user</code></pre>



<h2 id="turn-the-mongodb-at-each-boot" >Turn the MongoDB at each boot</h2>



<p>If you don&#8217;t want to use &#8220;<strong>onestart</strong>&#8221; to start <strong>Mongo</strong> on boot, you can configure it to run start instead. To do this, you need to edit <strong><em>/etc/rc.conf</em></strong><em>.</em> with vi or any other text editor and add mongod_enable = <strong>&#8220;YES&#8221;</strong> to the file. Once finished, it will start when your server boots up and you can now use its service mongod start to start the Mongo service. Other service commands such as stop and status will also be available.</p>



<p>You can try the Hostry&#8217;s VPS <a href="https://hostry.com/products/vps/"><strong>here</strong></a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-mongodb-on-freebsd/feed/</wfw:commentRss>
			<slash:comments>407</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Newer Version of MongoDB on Debian 8</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-newer-version-of-mongodb-on-debian-8/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-newer-version-of-mongodb-on-debian-8/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Fri, 10 Jan 2020 09:05:14 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1206</guid>

					<description><![CDATA[MongoDB is a document-based, general-purpose distributed database designed for modern application developers and for the cloud computing era. No database makes you more productive. In this article, we will look at how to install the latest version of MongoDB Add MongoDB Public Key This command adds the GPG MongoDB public [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong><em><a href="https://www.mongodb.com/">MongoDB</a></em></strong> is a document-based, general-purpose distributed database designed for modern application developers and for the cloud computing era. No database makes you more productive. In this article, we will look at how to install the latest version of MongoDB</p>



<h2 id="add-mongodb-public-key" >Add MongoDB Public Key</h2>



<p>This command adds the GPG MongoDB public key to the system key list:</p>



<pre class="wp-block-code"><code>apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10</code></pre>



<p>This key is necessary in order to ensure the consistency and authenticity of all packages.</p>



<h2 id="add-mongodb-storage" >Add MongoDB Storage</h2>



<p>First you need to create the <strong>mongodb.list</strong> file to add the MongoDB repository to the system. You can do this with the following command:</p>



<pre class="wp-block-code"><code>echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list</code></pre>



<h2 id="package-updates" >Package Updates</h2>



<p>To get information about the latest packages, please nter the command:</p>



<pre class="wp-block-code"><code>apt-get update</code></pre>



<h2 id="install-mongodb-packages" >Install MongoDB packages</h2>



<p>To install the latest stable version of MongoDB, use the following command:</p>



<pre class="wp-block-code"><code>apt-get install -y mongodb-org</code></pre>



<ul><li><strong>mongodb-org-server</strong></li><li><strong>mongodb-org-mongos</strong></li><li><strong>mongodb-org-shell</strong></li><li><strong>mongodb-org-tools</strong></li></ul>



<p><em>*Here are 4</em><strong><em> packages</em></strong><em> that </em><strong><span style="text-decoration: underline;"><em>mongodb-org</em></span></strong><em> automatically install</em></p>



<h2 id="launch-mongodb" >Launch MongoDB</h2>



<p>After installation is complete, MongoDB starts automatically. If you need to manually start the MongoDB server, use the following command:</p>



<pre class="wp-block-code"><code>service mongod start</code></pre>



<p>To <strong>stop</strong> and <strong>restart</strong> mongodb processes, use this commands:</p>



<pre class="wp-block-code"><code>service mongod stop</code></pre>



<pre class="wp-block-code"><code>service mongod restart</code></pre>



<p>You can access the MongoDB shell by running the following command: (<strong>this allows you to connect to the MongoDB server)</strong></p>



<pre class="wp-block-code"><code>mongo</code></pre>



<p>When the shell starts, you will see the output in the following format:</p>



<pre class="wp-block-code"><code>MongoDB shell version: 3.0.0
connecting to: test
></code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-newer-version-of-mongodb-on-debian-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install Newer Versions of MongoDB on Debian</title>
		<link>https://help.hostry.com/knowledge-base/how-to-install-newer-versions-of-mongodb-on-debian/</link>
					<comments>https://help.hostry.com/knowledge-base/how-to-install-newer-versions-of-mongodb-on-debian/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Tue, 20 Oct 2020 10:45:43 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=2361</guid>

					<description><![CDATA[MongoDB is a very powerful resource and fast NoSQL database. As for the repositories on Debian, they update very slowly and often contain outdated versions of packages. This tutorial will aim to give an example of how to install the latest version of MongoDB from the official MongoDB repository. Add [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>MongoDB is a very powerful resource and fast NoSQL database. As for the repositories on Debian, they update very slowly and often contain outdated versions of packages. This tutorial will aim to give an example of how to install the latest version of MongoDB from the official MongoDB repository.</p>



<h2 id="add-mongodb-public-key" >Add MongoDB Public Key</h2>



<p>The command below adds the MongoDB public GPG key to the set of all other system keys. Debian&#8217;s package management tools need this key to ensure consistency and authenticity of packages.</p>



<pre class="wp-block-code"><code>apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10</code></pre>



<h2 id="add-mongodb-repository" >Add MongoDB Repository</h2>



<p>First, you need to create a mongodb.list file to add the MongoDB repository to your system. This command, which is described below, will give you the opportunity to create the required file:</p>



<pre class="wp-block-code"><code>echo "deb http://repo.mongodb.org/apt/debian "$(lsb_release -sc)"/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list</code></pre>



<h2 id="update-packages" >Update packages</h2>



<p>Use the command below to get complete information about the latest packages in the repositories:</p>



<pre class="wp-block-code"><code>apt-get update</code></pre>



<h2 id="install-mongodb-packages" >Install MongoDB packages</h2>



<p>To install the latest stable version of MongoDB, use the following command, which is provided below:</p>



<pre class="wp-block-code"><code>apt-get install -y mongodb-org</code></pre>



<p><strong>mongodb-org </strong>is a <strong>&#8220;metapackage&#8221;</strong> that automatically installs four component packages:</p>



<ul><li>mongodb-org-server</li><li>mongodb-org-mongos</li><li>mongodb-org-shell</li><li>mongodb-org-tools</li></ul>



<h2 id="start-mongodb" >Start MongoDB</h2>



<p>After the installation isfinished, <strong>MongoDB</strong> will be  started immediately. If you need to manually run the MongoDB server, then use the following command:</p>



<pre class="wp-block-code"><code>service mongodb start</code></pre>



<p>To stop the mongodb process, use this command:</p>



<pre class="wp-block-code"><code>service mongodb stop</code></pre>



<p>And to restart mongodb, use the following:</p>



<pre class="wp-block-code"><code>service mongodb restart</code></pre>



<p>The MongoDB shell can be accessed by running the following command. This allows you to connect to the MongoDB server.</p>



<pre class="wp-block-code"><code>mongo</code></pre>



<p>When the shell is launched, you will see output in this format:</p>



<pre class="wp-block-code"><code>MongoDB shell version: 3.0.0
connecting to: test
></code></pre>



<p>Now you can use MongoDB on your Debian server.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/how-to-install-newer-versions-of-mongodb-on-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Securing MongoDB</title>
		<link>https://help.hostry.com/knowledge-base/securing-mongodb/</link>
					<comments>https://help.hostry.com/knowledge-base/securing-mongodb/#respond</comments>
		
		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Sat, 11 Jan 2020 08:09:27 +0000</pubDate>
				<guid isPermaLink="false">https://help.hostry.com/?post_type=ht_kb&#038;p=1242</guid>

					<description><![CDATA[By default, MongoDB is not safe; people can write, read, modify or delete data on your server, without the need for authorization in any case. Protecting the database is not a complicated procedure; it is performed in just a few steps. &#160; Start your Mongo client first. On Linux, this [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>By default, MongoDB is not safe; people can write, read, modify or delete data on your server, without the need for authorization in any case. Protecting the database is not a complicated procedure; it is performed in just a few steps. &nbsp;</p>



<p>Start your Mongo client first. On Linux, this is the mongo command. Enter this block of text, of course, changing the parts of the placeholder to your own information.</p>



<p>The protection procedure begins with the fact that you need to start your Mongo client. On Linux, this is the <strong><em>mongo</em></strong> command. Enter this block of text, of course, changing the parts of the placeholder to your own information.</p>



<pre class="wp-block-code"><code>db.createUser({
  user: "USERNAME", 
  pwd: "PASSWORD", 
  roles: [
    {
      role: "readWrite",
      db: "YOUR_DATABASE"
    }
  ]
});</code></pre>



<p>Next, you need to exit the mongo client and edit the MongoDB configuration file. Depending on your OS and distribution, you will find it in one of these places. </p>



<pre class="wp-block-code"><code>/etc/mongodb.conf
/etc/mongod.conf</code></pre>



<p></p>



<p>Change the following<strong> #security:</strong> line to the following:</p>



<pre class="wp-block-code"><code>security:
  authorization: enabled</code></pre>



<p>You should consider changing the bind port to localhost <strong><span style="text-decoration: underline;">(127.0.0.1</span>) </strong>or bind it to a private IP address that is not available on the Internet.</p>



<pre class="wp-block-code"><code># network interfaces
net:
  port: 27017
  bindIp: 634.234.102.6</code></pre>



<p>You should always watch your spaces! Always two by one, never tabs. After that, restart the MongoDB database.</p>



<pre class="wp-block-code"><code>systemctl restart mongod
systemctl restart mongodb</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://help.hostry.com/knowledge-base/securing-mongodb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
