‹ Articles

How to Install MongoDB

To install the MongoDB NoSQL database server, log in to your server as the root user and run the following command:

sudo apt-get install mongodb

Once installed, MongoDB will listen on port 11211.

Accessing MongoDB from PHP

To interact with the MongoDB server from your PHP scripts, you need to install the PHP Mongo client extension.

Customizing Your Firewall for MongoDB

The firewall configured by ServerPilot will block all access to MongoDB from outside of your server. If you need to have other servers access MongoDB, you'll need to customize your firewall using a tool like HeatShield.

Learn more about customizing your firewall.

Last updated: September 08, 2016

Still Have Questions?

Don't hesitate to contact us if you can't find the answers to your questions.