LoginSignup
9
8

More than 5 years have passed since last update.

[MongoDB] RockMongoインストール(PHP製)

Last updated at Posted at 2015-04-10

MongoDB管理ツール(GUIツール)の RockMongo をWEBサーバーにインストールする手順です。(RockMongoはPHP製です)

yotsuba_s.jpg 1)zipをダウンロード

▼ここからダウンロード(画面右の「Download ZIP」ボタン)
https://github.com/iwind/rockmongo

yotsuba_s.jpg 2)アップロード&解凍

ダウンロードしたzipをそのままアップロードした後、サーバーにSSHでログインし、unzipコマンドで解凍します。

yotsuba_s.jpg 3)MongoDBの管理ユーザーを作成

サーバーにSSHでログインして、下記のようなコマンド操作で管理ユーザーを作成します。

$ mongo
> use admin
> db.createUser({
  user: "管理者",
  pwd: "パスワード",
  roles:[{
    role: "userAdminAnyDatabase",
    db: "admin"
  }]
})

yotsuba_s.jpg 4)config.phpを編集

管理ユーザーでログインできるように、config.phpのみ編集して再アップロードします。

config.php
// 29行目をtrueに。
$MONGO["servers"][$i]["mongo_auth"] = true; //false;
// 31行目をfalseに。
$MONGO["servers"][$i]["control_auth"] = false; //true;

yotsuba_s.jpg 5)ブラウザーからログイン

アップしたフォルダ(のURL)にアクセスすれば、ログイン画面が表示されますので、手順3で作成した管理ユーザーでログインします。

(・o・ゞ いじょー。

9
8
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
9
8