Skip to content

Instantly share code, notes, and snippets.

@abellmanuell
Forked from litanur/readme.md
Created October 5, 2023 13:38
Show Gist options
  • Save abellmanuell/d3b3054b62c87000ccadc1922ebfaab5 to your computer and use it in GitHub Desktop.
Save abellmanuell/d3b3054b62c87000ccadc1922ebfaab5 to your computer and use it in GitHub Desktop.
Install MongoDB on Manjaro

How to install mongoDB on Manjaro 21 Ornara

  1. Enable AUR
  2. Make sure system is up to date sudo pacman -Syu
  3. To install, use the following command:
pamac build mongodb-bin
pamac build mongodb-tools-bin
pamac build mongodb-compass
  1. Enable service and start on boot:
sudo systemctl start mongodb
sudo systemctl enable mongodb
  1. Run command mongo as console MongoDB

If you find the error like this:

MongoDB shell version v4.4.6
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1
  1. Please change the port using command sudo nano /etc/mongodb.conf
  2. Change line 23 port: 27017
  3. To port 27018
  4. Re-run command with mongo 127.0.0.1:27018

Note: Don't forget use port 27018 when login using Compass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment