How to Install MongoDB on Antergos Gnu/Linux Easy Guide

August 6, 2019 | By the+gnu+linux+evangelist.

Installing

  1. 3. Making Directory

    Then to Make Needed Directory
    Run:

    sudo mkdir -p /data/db

    If Got “User is Not in Sudoers file” then see: How to Enable sudo
    Then Set the Right Permissions:

    sudo chmod g+w /data/db

    The User Running the MongoDB Server need Write Permission on /data/db!

  2. 4. Installing

    Installing the MongoDB Database for Antergos Linux
    So first, Extract the Archive into Target directory with:

    sudo tar xvzf ~/Downloads/mongodb-linux*.tar.gz -C /opt/

    (But if you are in Trouble to Find the Location on Terminal then See: How to Access Downloads Folder from Browser.)
    Now for ease Rename the folder as:

    sudo mv /opt/mongodb* /opt/mongodb

    Again Set the SuperUser as Owner:

    sudo chown -R root:root /opt/mongodb

    Finally, amend the User’s Path:

    echo 'export PATH=$PATH:/opt/mongodb/bin' >> ~/.bashrc

    To Reload it simply run:

    bash

QuickChic Theme • Powered by WordPress