Skip to content

Instantly share code, notes, and snippets.

@kurap
Created November 13, 2013 03:52
Show Gist options
  • Save kurap/7443420 to your computer and use it in GitHub Desktop.
Save kurap/7443420 to your computer and use it in GitHub Desktop.
##### repo ファイルを作成
vi /etc/yum.repos.d/10gen.repo
## 以下を記述
## 64bitOSの場合
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
## 32bitの場合
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0
enabled=1
## yum update
yum update
## mongo install
yum install mongo-10gen mongo-10gen-server
## mongo config file
/etc/mongod.conf
##### コマンド
## サービススタート
service mongod start
## サービスストップ
service mongod stop
## 自動起動の設定(インストールしたらonになっている)
chkconfig mongod on
## リスタート
service mongod restart
## mongo using
mongo
## test
db.test.save( { a: 1 } )
db.test.find()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment