Last active
August 29, 2015 14:07
-
-
Save jacoyutorius/be09ea5eda7ea70f31e4 to your computer and use it in GitHub Desktop.
CentOSにMongoDBをインストールして外部から接続できるようにする ref: http://qiita.com/jacoyutorius/items/3e2cf2c098029e8d4a06
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
| cat /etc/redhat-release | |
| Scientific Linux release 6.5 (Carbon) |
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
| yum install mongodb |
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 restart |
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 {サーバーのホスト名}:27017 | |
| > |
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
| iptables -A INPUT -p tcp --dport 27017 -j ACCEPT | |
| iptables -A INPUT -p tcp --dport 28017 -j ACCEPT |
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
| # コメントアウト | |
| #bind_ip=127.0.0.1 | |
| # Webインターフェースを有効化 | |
| httpinterface=true | |
| rest=true |
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
| [mongodb] | |
| name=MongoDB Repository | |
| baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
| grpcheck=0 | |
| enabled=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment