Created
March 20, 2013 12:15
-
-
Save shinofara/5204217 to your computer and use it in GitHub Desktop.
mongodb 2.2系から2.4系へのアップグレード手順 ref: http://qiita.com/items/3ee5b3cf401ff699c385
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mongo --version | |
MongoDB shell version: 2.2.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mongo --version | |
MongoDB shell version: 2.4.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -pr /var/lib/mongo{,.`date +"%Y%m%d"`} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -O http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.0.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tar zxf mongodb-linux-x86_64-2.4.0.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rm -f mongodb-linux-x86_64-2.4.0.tgz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ service mongod stop | |
Stopping mongod: [ OK ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ps auxww | grep mongo | |
root 19788 0.0 0.0 6380 664 pts/0 S+ 20:59 0:00 grep mongo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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