Download Mongodb For Linux




Preparation
You have to set up linux, and also a great internet connection, we'll get on with it how can I download mongodb.

Download
To download mongodb you get by typing the following command in your linux terminal:
32bit
wget -c http://downloads.mongodb.org/linux/mongodb-linux-i686-2.4.7.tgz

64bit
wget -c http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.4.7.tgz




Install
Once you do and you can now download installation of mongodb, but you have to extract the file you downloaded with the new way of entering the following command in your terminal.

After that the following directory rename mongodb-linux-x86_64-2.4.7 be mongodb in the following ways
$ mv mongodb-linux-x86_64-2.4.7/ mongodb

Setting Path
Open the file ~/.bashrc and add at the end of the file is the script below
PATH=$PATH:$HOME/tools/mongodb/bin

and then save

Running the service
To start the service, type the following command mongodb
$ mongod

To save the database file by default, mongodb will use the/data/db directory, so when we are running mongodb, that directory service must be available, if not, mongodb will issue an error like this.

Test connection
To connect to mongdb, type the following command
$ mongo


Next
Previous
Click here for Comments

0 comments: