If you’re running the default Ubuntu 14 LTS server on AWS, you’ll find that the package manage will only install MongoDB v2.x. However, you can install the latest version by updating apt-get using this tutorial, allowing you to use install the Parse API Server.
Installing MongoDB
To install the latest version of MongoDB on your Ubuntu instance, run the following script as root / sudo. This will update the apt-get package manager to access the official MongoDB repository and install the latest version of the software.
| # Import the Public Key for Official MongoDB Repo | |
| sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
| # Update apt-get to get latest MongoDB packages | |
| echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
| # Update apt-get package list with new repo details | |
| sudo apt-get update | |
| # Install the latest version of MongoDB | |
| sudo apt-get install -y mongodb-org |
Once MongoDB is installed, the service will automatically be started. You can verify this by running the following command:
service mongod status
The command line will output something similar to the following it was successfully started:
Using MongoDB
To start using MongoDB, you can issue commands like the below examples:
| # Start MongoDB Shell | |
| mongo | |
| # Get MongoDB version | |
| mongo --version | |
| # Show Mongo Databases (from MongoDB Shell) | |
| show dbs | |
| # Create DB `parse` and Insert Data to `users` collection | |
| use parse | |
| db.users.insert({"name":"Niraj Shah"}) |
Which will result in the following output:



[…] MongoDB version v2.6.x or v3.0.x (tested with v3.0.9) […]
Thanks for this tutorial, its very clear. One question: If I import db from Parse to Mongodb, does this action will remove my parse db from host or it will stay there?
If you Import or Migrate your data away from Parse, it will still be available on Parse until you manually delete it (or until the service closes down in Jan 2017).
Thanks.