Database Reference
In-Depth Information
Next, you need to import 10gen's public GPG key, used to sign the packages, ensuring their consistency; you can
do so by using the apt-key command:
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
When that is done, you need to tell apt-get that it contains new repositories; you can do so using apt-get's
update command:
$ sudo apt-get update
This line made aptitude aware of your manually added repository. This means you can now tell apt-get to install
the software itself. You do this by typing the following command in the shell:
$ sudo apt-get install mongodb-10gen
This line installs the current stable (production) version from MongoDB. If you wish to install any other version
from MongoDB instead, you need to specify the version number. For example, to install the current unstable
(development) version from MongoDB, type in the following command instead:
$ sudo apt-get install mongodb-10gen=2.5.0
That's all there is to it. At this point, MongoDB has been installed and is (almost) ready to use!
running apt-get update on a system running an older version of MongoDB will upgrade the software to the
latest stable version available. You can prevent this from happening by running this command:
Note
echo "mongodb-10gen hold" | sudo dpkg --set-selections
Installing MongoDB Manually
Next, we'll cover how to install MongoDB manually. Given how easy it is to install MongoDB with aptitude
automatically, you might wonder why you would want to install the software manually. For starters, not all Linux
distributions use apt-get. Sure, many of them do (including primarily the ones that are based on Debian Linux),
but some don't. Also, the packaging remains a work in progress , so it might be the case that there are versions not yet
available through the repositories. It's also possible that the version of MongoDB you want to use isn't included in
the repository. Installing the software manually also gives you the ability to run multiple versions of MongoDB at the
same time.
You've decided which version of MongoDB you would like to use, and you've downloaded it from their website,
http://mongodb.org/downloads , to your Home directory. Next, you need to extract the package with the following
command:
$ tar xzf mongodb-linux-x86_64-latest.tgz
This command extracts the entire contents of the package to a new directory called
mongodb-linux-x86_64-xxxx-yy-zz ; this directory is located under your current directory. This directory will
contain a number of subdirectories and files. The directory that contains the executable files is called the bin directory.
We will cover which applications perform which tasks shortly.
 
 
Search WWH ::




Custom Search