Install MongoDB on both 32-bit and 64-bit

 

[64-bit Raspberry OS Buster]

We are going to use instruction for Ubuntu 64-bit:

curl -s https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt update

Now we can install MongoDB server:

sudo apt install mongodb-org

# enable and start
sudo systemctl enable mongod
sudo systemctl start mongod

MongoDB (version 4.2 64-bit) Server is up and running:

mongo

Source: Installing MongoDB to the Raspberry Pi

[32-bit]

It will install outdated 32-bit version 2* of MongoDB:

apt install mongodb
service mongod start

[64-bit and 32-bit]

To get access from other computer on your network, change the bind_ip in config file, do not forget to restart a service:

nano /etc/mongod.conf

# find the line
bind_ip = 0.0.0.0

#save and restart
service mongod restart

Leave a Reply

Your email address will not be published. Required fields are marked *

Yandex.Metrica