Installing MongoDB

Discover our Public Cloud offer

Shared Hosting for Everyone, imagined by developers, for developers.

Discovering the Public Cloud

MongoDB is a document-oriented noSQL database program.

In our example, we use the SSH access and consider the following information:

  • Account name: foo
  • MongoDB directory: $HOME/mongodb/

[foo] and [version] must be replaced by accurate informations.

Downloading

foo@ssh:~/mongodb$ wget -O- https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian10-[version].tgz | tar -xz --strip-components=1
foo@ssh:~/mongodb$ mkdir -p data log

Choose the package tgz and the platform Debian of the version 6.0 of the tarball1.

Service launch

Create a service with following details:

  • Command: /home/[foo]/mongodb/bin/mongod --dbpath ./data/ --logpath ./log/mongo.log --ipv6 --bind_ip_all
  • Working directory: /home/[foo]/mongodb

Public Cloud users will need to point the service to a port between 8300 and 8499 and add the --port option to the command.

Firewall rule creation

Private Cloud users will need to open the port by creating a firewall rule if they want to access it from the external network:

TitleValue
ProtocolUDP/TCP
TypeACCEPT
DirectionInput
Hosts<specify nothing>
Ports27017
IP versionIPv4/IPv6

  1. MongoDB 7 requires a newer version of GLIBC that will only be available after the next software infrastructure migration. ↩︎