MongoDBをRed Hat Enterprise, CentOS, Fedoraにインストールする場合は、yumを利用してインストールするのが簡単です。公式サイトでもyumの利用を進めています。
以下のコマンドで完了です。
1, レポジトリ追加
[html]vi /etc/yum.repos.d/mongodb.repo[/html]
以下を記述します。
※ 64bit版ならこれ
[html]
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=0
[/html]
※ 32bit版ならこれ
[html]
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=0
[/html]
2, yumでパッケージをインストールします。レポジトリを指定してインストールしましょう。
[html]yum install –enablerepo=mongodb mongo-10gen mongo-10gen-server
[/html]
3, パーッケージの確認
[html]# rpm -qa | grep "mongodb"
mongo-10gen-2.4.9-mongodb_1
mongo-10gen-server-2.4.9-mongodb_1[/html]
これで完了です。
続いて、初期設定をしてみます。
初期設定は次の記事で。
[amazonjs asin=”4873115906″ locale=”JP” title=”MongoDBイン・アクション”]
[amazonjs asin=”4897978874″ locale=”JP” title=”NOSQLの基礎知識 (ビッグデータを活かすデータベース技術)”]