22 8 / 2011
Upgrading to new Mongodb version
Whenever new version popups, I always wanted my system stays updated. Recently, well, I think version 1.8.3 is just around the corner, my current installation is at 1.8.0, so I just update my current version to the latest on available.
Well, instead of using the usual download/compile method, I use the software called ‘HomeBrew’ which you may download it from here:
Once you have download/compile the ‘HomeBrew’, you can just type in:
brew <command> <software_name>
For instance, I want to install mongodb, so I would type in:
brew install mongodb
Just give it a few minutes (including the downloading) and it should give you something like this:
/usr/local/Cellar/mongodb/1.8.2-x86_64: 16 files, 93M, built in 2 seconds
Should be easy.
The following are text which I copied from the result page.
==> first time installation, do
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/mongodb/1.8.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
==> upgrade and haveĀ org.mongodb.mongod.plist loaded, do
launchctl unload -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
cp /usr/local/Cellar/mongodb/1.8.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
In case, you have multiple mongodb installed, do the following to remove the old one
brew cleanup mongodb
should be harmless