Install MongoDB on a Linux Server
MongoDB is a free, open-source document-oriented database which stores data in JSON-like documents with a flexible schema. This "NoSQL" database is a popular alternative to traditional relational databases like MySQL. Learn how to install MongoDB on a Cloud Server with CentOS 7, Ubuntu 14.04, or Ubuntu 16.04.
There are two options for installing MongoDB:
- On a new server:
MongoDB is available as a ready-to-use application which can be automatically installed on the server when it is built.
- On an existing server:
MongoDB can be manually installed and configured on an existing server.
Requirements
- A Cloud Server with Linux (CentOS 7, Ubuntu 14.04, or Ubuntu 16.04).
Thanks to free starting credit, you can test the IONOS cloud server for 1 month free of charge (or until the credit is used up) and experience the perfect combination of performance and security!
Install MongoDB on a New Server
Log in to the Cloud Panel then go to Infrastructure > Servers.
- Click + Create to create a new server.
- Set a name for the server, and click the server configuration you wish to use.
- Click the Applications tab.
- Click the Search icon, and search for MongoDB.
- Click MongoDB.
- Click Create to build the server.
Install MongoDB on an Existing Server
CentOS 7
To add the repository, create a mongodb-org-3.6.repo file and open it for editing:
Add the following content to this file:
Save and exit the file.
Update the system:
Install MongoDB with the command:
Controlling the MongoDB Service
Start MongoDB:
Stop MongoDB:
Restart MongoDB:
- Secures data transfers
- Avoids browser warnings
- Improves your Google ranking
Ubuntu 14.04
Import the MongoDB public GPG key:
Create a mongodb-org-3.6.list file:
Update the package database:
Install MongoDB:
Controlling the MongoDB Service
Start MongoDB:
Stop MongoDB:
Restart MongoDB:
- 99.9% uptime
- PHP 8.3 with JIT compiler
- SSL, DDoS protection, and backups
Ubuntu 16.04
Import the MongoDB public GPG key:
Create a mongodb-org-3.6.list file:
Update the package database:
Install MongoDB:
Controlling the MongoDB Service
Start MongoDB:
Stop MongoDB:
Restart MongoDB: