Skip to content

Instantly share code, notes, and snippets.

@litanur
Last active November 12, 2024 19:29
Show Gist options
  • Save litanur/eec8ff295ff7d616626cd8a6c0d2659e to your computer and use it in GitHub Desktop.
Save litanur/eec8ff295ff7d616626cd8a6c0d2659e 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

@amirhossin-shahsavan
Copy link

Thank you! It so helpful.

@devisopen
Copy link

`open-dev@archlinux ~]$ sudo pacman -Syuu`
[sudo] password for open-dev: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Starting full system upgrade...
 there is nothing to do
[open-dev@archlinux ~]$ pamac build mongodb-bin
** Message: 12:11:07.557: aur_plugin.vala:317: downloading AUR data
https://aur.manjaro.org/packages-meta-ext-v1.json.gz: Socket I/O timed out
Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : Error opening file /var/tmp/pamac/packages-meta-ext-v1.json.gz: No such file or directory
** Message: 12:11:16.328: aur_plugin.vala:317: downloading AUR data
https://aur.manjaro.org/packages-meta-ext-v1.json.gz: Socket I/O timed out
Failed to read AUR data from /var/tmp/pamac/packages-meta-ext-v1.json.gz : Error opening file /var/tmp/pamac/packages-meta-ext-v1.json.gz: No such file or directory
Error: target not found: mongodb-bin

Any thoughts?

@johnull
Copy link

johnull commented Jun 12, 2024

Thank you!

@Ramanakunam16
Copy link

mongo command is not available even after pamac build

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