WebFaction Smarter Web Hosting   WebFaction Smarter Web Hosting
WebFaction Plans and Prices       WebFaction Signup       WebFaction Why WebFaction?

    Support sites:   Documentation   |   Forum   |   Control panel   |   Status blog   |   Tickets

Table Of Contents

Previous topic

Mercurial

Next topic

Movable Type

PDF download

Download this document as PDF

MongoDB

MongoDB is an open source document-oriented database.

Warning

WebFaction servers only support the 32 bit version of MongoDB, which 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. Enter a name for your MongoDB application in the Name field.

  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 32-bit package. Enter wget http://downloads.mongodb.org/linux/mongodb-linux-i686-1.2.2.tgz and press Enter. mongodb-linux-i686-1.2.2.tgz will be created in the current directory.

    Note

    If you prefer, you can use past and development versions of MongoDB instead. Please see the MongoDB downloads page for details.

  12. Extract the files from the archive. Enter tar -xzf mongodb-linux-i686-1.2.2.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/{username}/webapps/mongodb/mongodb-linux-i686-1.2.2/bin/mongod --dbpath /home/{username}/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.