Skip to content

Instantly share code, notes, and snippets.

@shinofara
Created March 20, 2013 12:15
Show Gist options
  • Save shinofara/5204217 to your computer and use it in GitHub Desktop.
Save shinofara/5204217 to your computer and use it in GitHub Desktop.
mongodb 2.2系から2.4系へのアップグレード手順 ref: http://qiita.com/items/3ee5b3cf401ff699c385
$ mongo --version
MongoDB shell version: 2.2.2
$ mongo --version
MongoDB shell version: 2.4.0
cp -pr /var/lib/mongo{,.`date +"%Y%m%d"`}
curl -O http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.0.tgz
tar zxf mongodb-linux-x86_64-2.4.0.tgz
rm -f mongodb-linux-x86_64-2.4.0.tgz
$ service mongod stop
Stopping mongod: [ OK ]
$ ps auxww | grep mongo
root 19788 0.0 0.0 6380 664 pts/0 S+ 20:59 0:00 grep mongo
$ cp -r --force mongodb-linux-x86_64-2.4.0/bin/* /usr/bin/
cp: overwrite `/usr/bin/bsondump'? y
cp: overwrite `/usr/bin/mongo'? y
cp: overwrite `/usr/bin/mongod'? y
cp: overwrite `/usr/bin/mongodump'? y
cp: overwrite `/usr/bin/mongoexport'? y
cp: overwrite `/usr/bin/mongofiles'? y
cp: overwrite `/usr/bin/mongoimport'? y
cp: overwrite `/usr/bin/mongooplog'? y
cp: overwrite `/usr/bin/mongoperf'? y
cp: overwrite `/usr/bin/mongorestore'? y
cp: overwrite `/usr/bin/mongos'? y
cp: overwrite `/usr/bin/mongosniff'? y
cp: overwrite `/usr/bin/mongostat'? y
cp: overwrite `/usr/bin/mongotop'? y
$ service mongod start
Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: 19939
all output going to: /var/log/mongo/mongod.log
child process started successfully, parent exiting
[ OK ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment