Skip to content

Instantly share code, notes, and snippets.

@jacoyutorius
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save jacoyutorius/be09ea5eda7ea70f31e4 to your computer and use it in GitHub Desktop.

Select an option

Save jacoyutorius/be09ea5eda7ea70f31e4 to your computer and use it in GitHub Desktop.
CentOSにMongoDBをインストールして外部から接続できるようにする ref: http://qiita.com/jacoyutorius/items/3e2cf2c098029e8d4a06
cat /etc/redhat-release
Scientific Linux release 6.5 (Carbon)
yum install mongodb
service mongod restart
mongo {サーバーのホスト名}:27017
>
iptables -A INPUT -p tcp --dport 27017 -j ACCEPT
iptables -A INPUT -p tcp --dport 28017 -j ACCEPT
# コメントアウト
#bind_ip=127.0.0.1
# Webインターフェースを有効化
httpinterface=true
rest=true
[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