I use a MongoDB database to analyze data extracted from logs on Linux production servers that handle hundreds of thousands of users per day. Â I also have databases that I use for research topics – oriented around K-12 education. Â I have pulled data from The British Library and various datasets from the Europeana Collections.
I’ve blogged before on MongoDB running on a 4 ODROID C2 SBC Cluster with external SATA drives — see this post. Â I had tried both Arch and Ubuntu flavors of Linux. Â I pointed out then that MongoDB had an official Enterprise Server Version 3.6 for Ubuntu 16.04 ARM 64. Â MongoDB Release 4.0.6 is now available for download (as of 15 February 2019). Â Please check the license terms of the “Enterprise Server Version”. Â There is also a “Community Server” version that might better meet your needs and/or avoid restrictions. Â The Community Server install is what is described in this post.
OK it’s great that MongoDB has an official version for “Ubuntu 16.04 Linux 64-bit ARM 64.” Â I, however, am running the latest Ubuntu OS for ODROID C2 – “Ubuntu 18.04.2 LTS (Bionic Beaver).”
OK, here is the quick and simple way to install the latest MongoDB on your ODROID C2 running Ubuntu 18.04…
I assume you have not installed MongoDB in any form before this setup. Â If you have installed, do a complete backup (dump) of databases and remove the MongoDB and utilities installs as well as all associated directories and files.
Make sure your OS is up to date:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Here are my versions of ODROID – name, kernel, hardware & OS info:
$ uname -a
Linux odroid 3.16.62-35 #1 SMP PREEMPT Wed Jan 23 05:14:46 -02 2019 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/os-release
NAME=”Ubuntu”
VERSION=”18.04.2 LTS (Bionic Beaver)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=”Ubuntu 18.04.2 LTS”
VERSION_ID=”18.04″
HOME_URL=”https://www.ubuntu.com/”
SUPPORT_URL=”https://help.ubuntu.com/”
BUG_REPORT_URL=”https://bugs.launchpad.net/ubuntu/”
PRIVACY_POLICY_URL=”https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
Import the public key for the Package Management System:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
Add a MongoDB list file from the “xenial” branch as MongoDB 4 is not yet in the “bionic” branch. Update the packages list. Â Install any updates and then install MongoDB. Â Note that “lincurl4” replaced “libcurl3” in Ubuntu 18.04. Â We need to revert to “libcurl3” for MongoDB 4.0 to install correctly. Â A simple “apt-get install” will do the trick.
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libcurl3
sudo apt-get install -y mongodb-org
You can check versions installed:
mongod --version
mongo --version
You can start MongoDB and check its status:
sudo service mongod start
sudo service mongod status
Run the MongoDB shell:
mongo
Hopefully these quick instructions work for you.  LMK in the comments if problems arise 😉
Pingback: Official MongoDB 3.4 on ODROID-C2 under Ubuntu