Easy way Install and Setup MongoDB in Arch Linux

hello and welcome to another blog post, in this post I will discuss about how to install and setup Mongo Database (MongoDB) in Arch Linux, when I’m working on a personal project using TypeScript, and the project requires some dependencies, also a database, and the database I use is MongoDB, when I use Ubuntu I don’t find any errors, when I’ve migrated using Arch Linux I got an error

Fixing Import GPG key Error

I got this error because I use mongodb-bin from AUR that is a pre-build package from official ubuntu repository, after I try to install mongo DB from official ubuntu repo i can’t import the gpg key on my computer

problem import gpg key in arch linux

Know The Problem and Find the Solution

that is fundamental if you use linux, know the problem 😃from the error messages, for example “no key server available” the mean is key in your local computer needs update from key server,

in arch linux you can use this command to update key server in your local computer

sudo pacman-keys --refresh-keys

use sudo if you use user account, the output from theese command will shown bellow

renew all keys from server

after update the key clone mongo from AUR using git

git clone https://aur.archlinux.org/packages/mongodb-bin/
clone mongo db from AUR using git

after clone you don’t need import keys because you updated the key in previous step now the problem is solved you can build MongoDB database with makepkg

Installing MongoDB

in previous step you done clone mongodb-bin from AUR now install with makepkg

go to mongodb-bin directory and run this command

makepkg -si
installing process

after that input your password to complete the installation

input password

Installation Done you 😄 you can check with systemctl command

sudo systemctl status mongodb.service
status mongo db in local computer after installed

thank you for reading my little documentation I hope it helps your problem, hope it is useful,

Resources and Reference

Excited With Python Linux, and Love Code, Writing and Many others, my dev journal can find in https://github.com/perymerdeka

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store