<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: bobStrange</title>
    <description>The latest articles on DEV Community by bobStrange (@bobstrange).</description>
    <link>https://dev.to/bobstrange</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F43470%2Feba2f1fe-561c-40e9-8e29-dc1a4363b365.png</url>
      <title>DEV Community: bobStrange</title>
      <link>https://dev.to/bobstrange</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bobstrange"/>
    <language>en</language>
    <item>
      <title>Install mongodb 4.4 to arm64 amazon Linux 2</title>
      <dc:creator>bobStrange</dc:creator>
      <pubDate>Thu, 24 Jun 2021 13:43:47 +0000</pubDate>
      <link>https://dev.to/bobstrange/install-mongodb-to-arm64-amazon-linux-2-lon</link>
      <guid>https://dev.to/bobstrange/install-mongodb-to-arm64-amazon-linux-2-lon</guid>
      <description>&lt;p&gt;Recently I've tried to install mongodb to the arm64 amazon linux.&lt;br&gt;
Because AWS Graviton 2 instances are cheaper than the other architecture instances.&lt;/p&gt;

&lt;p&gt;Here is how you install mongodb community to the arm64 amazon linux.&lt;/p&gt;
&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;According to the official &lt;a href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-amazon/"&gt;document&lt;/a&gt;, MongoDB Community Edition on Amazon Linux supports the arm64 architecture but there aren't any instruction how you install it 😭&lt;/p&gt;

&lt;p&gt;I modified a bit of &lt;code&gt;/etc/yum.repos.d/mongodb-org-4.4.repo&lt;/code&gt; from their document and see if it works, but it doesn't work...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="err"&gt;[mongodb-org-4.4]&lt;/span&gt;
name=MongoDB Repository
&lt;span class="gd"&gt;- baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64/
&lt;/span&gt;&lt;span class="gi"&gt;+ baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/arm64/
&lt;/span&gt;&lt;span class="p"&gt;gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;p&gt;You first need to have installed &lt;code&gt;mongodb-database-tools&lt;/code&gt; as the &lt;code&gt;mongodb-org&lt;/code&gt; package depends on it.&lt;br&gt;
Then you'll be able to install &lt;code&gt;mongodb-org&lt;/code&gt; package.&lt;br&gt;
Here is the way how you do that.&lt;/p&gt;
&lt;h3&gt;
  
  
  Add mongodb-database-tools yum repo
&lt;/h3&gt;

&lt;p&gt;Create a &lt;code&gt;/etc/yum.repos.d/mongodb-database-tools-4.4.repo&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[mongodb-database-tools-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/arm64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Add mongodb-org yum repo
&lt;/h3&gt;

&lt;p&gt;Create a &lt;code&gt;/etc/yum.repos.d/mongodb-org-4.4.repo&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/aarch64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install both packages
&lt;/h3&gt;

&lt;p&gt;You just need to run &lt;code&gt;yum install&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; mongodb-database-tools mongodb-org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you'll have installed mongodb on your server.&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>aws</category>
      <category>amazonlinux2</category>
      <category>arm64</category>
    </item>
  </channel>
</rss>
