19
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

virtualbox(centos)でmongodbインストールメモ(ついでにrockmongoも)

Last updated at Posted at 2013-02-26

mongo,mongoうるさいので入れることにした。
ローカルとかで持っててログ解析とかにも便利そうだし

注意事項

  • ここから先は全てroo(権限)ユーザーで実行しています
  • 要git
  • 開発環境構築の話です。本番環境などはもっと詳しいブログをみつけてください。

参考にしたサイト

10genリポジトリの追加

10genリポジトリを追加しましょう

/etc/yum.repos.d/10gen.repo
vim /etc/yum.repos.d/10gen.repo

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=0

mongodbのインストール

サクッとyumで

yum install mongo-10gen-server.x86_64 mongo-10gen.x86_64 --enablerepo=10gen


Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
 * base: ftp.riken.jp
 * extras: ftp.riken.jp
 * updates: ftp.riken.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mongo-10gen.x86_64 0:2.2.3-mongodb_1 will be installed
---> Package mongo-10gen-server.x86_64 0:2.2.3-mongodb_1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================
 Package                       Arch              Version                      Repository        Size
=====================================================================================================
Installing:
 mongo-10gen                   x86_64            2.2.3-mongodb_1              10gen             43 M
 mongo-10gen-server            x86_64            2.2.3-mongodb_1              10gen            6.7 M

Transaction Summary
=====================================================================================================
Install       2 Package(s)

Total download size: 49 M
Installed size: 121 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): mongo-10gen-2.2.3-mongodb_1.x86_64.rpm                                 |  43 MB     00:23     
(2/2): mongo-10gen-server-2.2.3-mongodb_1.x86_64.rpm                          | 6.7 MB     00:10     
-----------------------------------------------------------------------------------------------------
Total                                                                1.4 MB/s |  49 MB     00:34     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mongo-10gen-2.2.3-mongodb_1.x86_64                                                1/2 
  Installing : mongo-10gen-server-2.2.3-mongodb_1.x86_64                                         2/2 
  Verifying  : mongo-10gen-2.2.3-mongodb_1.x86_64                                                1/2 
  Verifying  : mongo-10gen-server-2.2.3-mongodb_1.x86_64                                         2/2 

Installed:
  mongo-10gen.x86_64 0:2.2.3-mongodb_1          mongo-10gen-server.x86_64 0:2.2.3-mongodb_1         

Complete!

入った

mongodbの起動

いつもどおり

/etc/init.d/mongod start


Starting mongod: forked process: 13622
all output going to: /var/log/mongo/mongod.log
child process started successfully, parent exiting             [  OK  ]

起動時に自動でmongodbが立ち上がってるようにする

chkconfig mongod on

ついでにrockmongoも

PHPでいうphpMyAdminのようなものです

適当にディレクトリを掘る

ディレクトリ掘って解凍するだけです。

mkdir /home/web/lo.rockmongo.org
cd /home/web/lo.rockmongo.org
wget http://rock-php.googlecode.com/files/rockmongo-v1.1.0.zip
unzip rockmongo-v1.1.0.zip 

解凍したディレクトリをnginx or apacheの設定を書いてください。

※デフォルトのユーザーはadminです。デフォルトのパスワードとかは危険なので入れたらすぐに変更しましょう

後はhttp://localhostとかでアクセスして画面がでていればOKです。

やっぱりなんとなく面倒だから入れてなかったですが、入れるだけなら10分くらいでできた。
こっから色々遊ぼーーっと

19
19
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
19

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?