Search…
ENGLISH
How to install mongoDB
When creating a new container, check [Install MongoDB] in [Additional Modules / Package]. Then, the container with mongoDB is created.

If you did not select the above items when creating a new container,

please follow the steps below.
1. Create a new container and open it. 2. Open the 1st terminal and type the following command to install MongoDB.
Ubuntu 18.04
Ubuntu 16.04
Ubuntu 14.04
1
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 && (echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list) && apt-get update && apt-get install -y mongodb-org && mkdir -p /data/db
Copied!
1
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 && (echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list) && apt-get update && apt-get install -y mongodb-org && mkdir -p /data/db
Copied!
1
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 && (echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/4.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.0.list) && apt-get update && apt-get install -y mongodb-org && mkdir -p /data/db
Copied!
3. Type "mongod" at the 1st terminal to run mongodb server. 4. Open the 2nd terminal and type "mongo" to run mongodb client. (press the alt+shift+T(MAC:⌥⇧T) to open the second terminal)
Last modified 3mo ago