Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed MongoDB on live VPS to write logs. The server is running on Ubuntu 10.04 LTS and Mongodb version is 2.0.3. I want to upgrade to latest version (2.0.5) but I want to upgrade only MongoDB. I made test on my desktop with apt-get upgrade and everything is OK after the upgrade. However on my VPS I prefer to update just MongoDB. Any help is appreciated.

share|improve this question
    
Here is a up to date guide as of March 2013 lancejian.com/2012/03/12/install-nodejs-in-ubuntu-1004.html –  Gourneau Mar 19 '13 at 0:30

2 Answers 2

up vote 4 down vote accepted

I'm assuming that MongoDB is available in a configured apt repository. You can upgrade only certain packages by listing them in an install command, like this:

apt-get install mongodb

(You should however be keeping your server up to date with packages in the lucid-security repository though.)

share|improve this answer
    
Thanks for the advice. I tried apt-get install mongodb-10gen but I get message that I already have the newest version which is strange since my version is 2.0.3 and the current version is 2.0.5 . The same happens with apt-get install mongodb –  George Nikolov May 13 '12 at 6:51
    
What repository are you using for the MongoDB packages? Did you run apt-get update before trying this? –  mgorven May 13 '12 at 7:15

I'm guessing you accepted mgorven's answer because running apt-get update resolved your issue. To make it clear for anyone else, to get the latest releases of MongoDB on an apt based system, follow the instructions here:

http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

The relevant line to add to your sources list for Ubuntu 10.04 LTS is:

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

Then (after importing the key and running an apt-get update), you should install using:

sudo apt-get install mongodb-10gen

If you install just using "mongodb" you will get a very old release from the 10.04 repositories instead (1.6.x if I remember correctly).

Once the 10gen package is installed, sudo apt-get update followed by sudo apt-get upgrade will take care of installing new versions for you.

share|improve this answer
2  
Yes, I decided to run apt-get update and then apt-get upgrade and this resolved the issue. Thanks :) –  George Nikolov May 14 '12 at 14:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.