Installing
2. Downloading
Downloadng MongoDB Legacy for GNU/Linux
Here MongoDB tar.gz Linux 64-bitPlease Donate $1 to Remove Ads!Link to Download MongoDb for Gentoo LinuxGrab the Linux Legacy 64-bit Release.
3. Making Directory
Then to Make Needed Directory
Run:Copysudo mkdir -p /data/db
If Got “User is Not in Sudoers file” then see: How to Enable sudo
Then Set the Right Permissions:Copysudo chmod g+w /data/db
The User Running the MongoDB Server need Write Permission on /data/db!
4. Installing
Installing the MongoDB Database for Gentoo Linux
So first, Extract the Archive into Target directory with:Copysudo 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:Copysudo mv /opt/mongodb* /opt/mongodb
Again Set the SuperUser as Owner:
Copysudo chown -R root:root /opt/mongodb
Finally, amend the User’s Path:
Copyecho 'export PATH=$PATH:/opt/mongodb/bin' >> ~/.bashrc
To Reload it simply run:
Copybash