- Create a directory /data and untar your downloaded file into this directory so that you now have a /data/mongodb-linux-x86_64-ubuntu1404-3.4.4 directory. All of MongoDB's core binaries are available in the /data/mongodb-linux-x86_64-ubuntu1404-3.4.4/bin directory.
- Create a symbolic link to the versioned file directory for a simpler naming convention and also allowing us to use a generic directory name (for example, in scripts):
ln -s /data/mongodb-linux-x86_64-ubuntu1404-3.4.4/ /data/mongodb
- Create a directory for the database:
mkdir /data/db
- Start the MongoDB server:
/data/mongodb/bin/mongod --dbpath /data/db
- You should see output like this:
2017-05-14T10:07:15.247+0000 I CONTROL [initandlisten] MongoDB starting : pid=3298 ...