Following are the commands which I used to upgrade my mongodb version from 2.6.9 to latest, but its still showing me the previous version. Let me know what I am doing wrong
You can replace binaries to upgrade to mongodb 3.0 as follows (works on Ubuntu/CentOs but commands are listed for Ubuntu) :
Untar downloaded file.
tar -zxvf {mongo-tar-file}.tgz
Stop mongod service.
sudo service mongod stop
Replace binaries from your tar/bin to /usr/bin.
cd {your-extracted-folder}/bin
sudo mv -f * /usr/bin/
Start mongod service.
sudo service mongod start
After you connect to mongo after this, you can see version has been updated. I have upgraded in this way on my production servers without any issue.
You should backup your data before upgrading. Usually no backup/restore is necessary but sometimes things don't go as expected.