Home MongoDB RockMongo – A Graphical MongoDB administration tool

RockMongo – A Graphical MongoDB administration tool

By sk
Published: Updated: 2.1K views

RockMongo is a free, open source GUI database administration tool for MongoDB, just like phpMyAdmin to MySQL/MariaDB. RockMongo makes the database administration tasks such as creating, editing, deleting databases, create tables, reports etc., much easier and faster. In this tutorial, we will see how to install RockMongo in Linux. If you haven't install MongoDB already, refer the following link to install it in various Linux distributions such as CentOS, Debian, Ubuntu, and openSUSE etc.

Install RockMongo

RockMongo is a web-based database management tool, written using PHP 5 programming language. In order to install this, make sure you have installed a web server and PHP 5, and some additional dependencies. RockMongo will not work in PHP 7 version. So, I recommend you to use PHP 5.

Let us Install a web server (Apache), php 5, and some required dependencies. For the purpose of this guide, I will be using CentOS 7 64 bit server. Do not forget to set SELinux mode as permissive or disabled mode. Otherwise, you can't access the RockMongo dashboard from any remote system's browser.

On RHEL / CentOS:

$ sudo yum install httpd gcc php php-gd php-pear php-devel openssl-devel unzip wget

Start and enable the Apache service using the following command:

$ sudo systemctl start httpd
$ sudo systemctl enable httpd

Allow Apache webserver service through your firewall.

$ sudo firewall-cmd --permanent --add-service=http
$ sudo systemctl restart firewalld

Then, Install the php_mongo extension using command:

$ sudo pecl install mongo

Sample output:

[...]
Build process completed successfully
Installing '/usr/lib64/php/modules/mongo.so'
install ok: channel://pecl.php.net/mongo-1.6.14
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini

Edit /etc/php.ini file,

$ sudo vi /etc/php.ini

And the following line:

extension=mongo.so

Save and close the file. Restart Apache service to take effect the changes.

$ sudo systemctl restart httpd

Verify the extension is added or not using command:

$ php -m | grep -i mongo

You should see the following output:

mongo

Well, we have installed required prerequisites. Now, download the latest RockMongo version from the releases page.

Or, use the following command to download latest RockMongo version.

$ wget https://github.com/iwind/rockmongo/archive/master.zip

Extract the downloaded zip file using command:

$ unzip master.zip

Move the extracted folder to the web root folder as shown below.

$ sudo mv rockmongo-master/ /var/www/html/rockmongo

Restart httpd service:

$ sudo systemctl restart httpd

Access RockMongo web console

Open the web browser, and navigate to http://IP-Address/rockmongo. You should see the following screen.

Enter the username and password. The default username and password is admin/admin.

RockMongo Login page

RockMongo Login page

Here it is how RockMongo dashboard looks like.

RockMongo Dashboard

RockMongo Dashboard

From here, you can create, rename, edit, delete databases, users, tables and more.

You can change the default username and password from the RockMongo config.php file.

To do so, edit config.php file:

$ sudo vi /var/www/html/rockmongo/config.php

Change the ports, host, and admins as per your liking.

Resource:

Related read:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More