MongoDB

MongoDB is an open source document-oriented database.

Warning

WebFaction servers less than Web300 or less than Dweb89 can only support the 32-bit version of MongoDB. The 32-bit version of MongoDB is limited to storing approximately 2.5GB of data. For more information on this limitation, please see the MongoDB blog article “32 bit limitations.”

Installing MongoDB

  1. Log in to the control panel.

  2. Click Domains / websites ‣ Applications. The Apps list appears.

  3. Click the Add button (add new). The Add page appears.

  4. In the Name field, enter a name for your MongoDB application.

  5. In the App category menu, click to select Custom.

  6. In the App type menu, click to select Custom app (listening on port).

  7. Click the Create button. The View page appears with a confirmation message.

  8. Make a note of the number in the Port field. This will be needed later.

  9. Open an SSH session to your account.

  10. Switch to the directory for your MongoDB application. Enter cd ~/webapps/application where application is the name of your MongoDB application, and press Enter.

  11. Download the MongoDB Linux package. Enter wget url, where url is the download URL for MongoDB, and press Enter.

    See the MongoDB downloads page for MongoDB download URLs. If you’re using a server less than Web300 or less than Dweb89, choose the Linux 32-bit package. Otherwise, choose the Linux 64-bit package.

    An archive, mongodb-linux-architecture-version.tgz, where architecture is i686 or x86_64 and version is the MongoDB version number, will be created in the current directory.

  12. Extract the files from the archive. Enter tar -xzf mongodb-linux-architecture-version.tgz and press Enter. A new directory will be created in the current directory which contains the MongoDB files.

  13. Create a database data directory. Enter mkdir data and press Enter.

You may now start your MongoDB database. To run the database itself, enter $HOME/webapps/mongodb/mongodb-linux-architecture-version/bin/mongod --dbpath $HOME/webapps/mongodb/data/ --port number where username is your username and number is the port number provided by the control panel.

See also

To learn more about using MongoDB, please see the official MongoDB tutorial. To learn more about using your preferred programming language with MongoDB, please see the MongoDB drivers documentation.

Previous topic

mod_wsgi

Next topic

Movable Type

Search the documentation

Example: "configure email" or "create database"

Feedback

Send us your feedback on this documentation.