Last active
August 29, 2015 14:12
-
-
Save mknkisk/4e1e6b51cacaa77069d6 to your computer and use it in GitHub Desktop.
Upgrade MongoDB v2.4.9 => 2.6.6 ref: http://qiita.com/mknkisk/items/ee826d485430e018cd3c
This file contains 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
pacman -Syu |
This file contains 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
vim /usr/lib/systemd/system/mongodb.service | |
[Unit] | |
Description=High-performance, schema-free document-oriented database | |
After=network.target | |
[Service] | |
User=mongodb | |
ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf | |
# Add this line | |
LimitNOFILE=64000 | |
[Install] | |
WantedBy=multi-user.target |
This file contains 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 admin | |
> db.auth('user', 'pass') | |
> | |
> // slaveOkにしないとcheckできない! | |
> db.getMongo().setSlaveOk() | |
> db.upgradeCheckAllDBs() | |
... | |
true # true を確認する |
This file contains 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 | |
> rs.stepDown(); |
This file contains 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
systemctl daemon-reload |
This file contains 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
systemctl restart mongodb |
This file contains 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
db admin | |
db.auth('user', 'pass') | |
db.getSiblingDB("admin").runCommand({authSchemaUpgrade: 1 }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment