How to install RockMongo in CentOS

To install RockMongo in CentOS

RockMongo is a MongoDB administration tool using which you can manage your server, collections, indexes, databases, documents etc. It provides a user-friendly way for reading, writing, and creating documents. Installation of RockMongo in CentOS is explained in this manual.


Features

  • Open source under New BSD License
  • Contains easy installation.
  • I18N


Installation of RockMongo

Verify the MongoDB service status.

[root@linuxhelp ~]# systemctl status mongod.service 
mongod.service - SYSV: Mongo is a scalable, document-oriented database.
   Loaded: loaded (/etc/rc.d/init.d/mongod)
   Active: active (running) since Thu 2016-10-13 13:42:41 IST  3min 9s ago
  Process: 40076 ExecStop=/etc/rc.d/init.d/mongod stop (code=exited, status=0/SUCCESS)
  Process: 40094 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=0/SUCCESS)
 Main PID: 40107 (mongod)
   CGroup: /system.slice/mongod.service
           ??40107 /usr/bin/mongod -f /etc/mongod.conf

Oct 13 13:42:41 linuxhelp.com systemd[1]: Starting SYSV: Mongo is a scalable....
Oct 13 13:42:41 linuxhelp.com runuser[40103]: pam_unix(runuser:session): ses...)
Oct 13 13:42:41 linuxhelp.com runuser[40103]: pam_unix(runuser:session): ses...d
Oct 13 13:42:41 linuxhelp.com mongod[40094]: Starting mongod: [  OK  ]
Oct 13 13:42:41 linuxhelp.com systemd[1]: Started SYSV: Mongo is a scalable,....
Hint: Some lines were ellipsized, use -l to show in full.


Check whether the PHP installed or not, if not installed then add PHP.

[root@linuxhelp ~]# whereis php 
php: /usr/bin/php /usr/lib64/php /etc/php.ini /etc/php.d /usr/include/php /usr/share/php /usr/share/man/man1/php.1.gz
next open php.ini file and add mongo.so extension  “  extension=mongo.so” .
[root@linuxhelp ~]# vim /etc/php.ini  
extension=mongo.so


Navigate to “ /opt/” directory by running the following command.

[root@linuxhelp ~]# cd /opt/ 


Download RockMongo by using " wget" command.

[root@linuxhelp opt]# wget https://github.com/iwind/rockmongo/archive/master.zip 
--2016-10-13 13:49:34--  https://github.com/iwind/rockmongo/archive/master.zip
Resolving github.com (github.com)... 192.30.253.113
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/iwind/rockmongo/zip/master [following]
--2016-10-13 13:49:36--  https://codeload.github.com/iwind/rockmongo/zip/master
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘ master.zip’ 

    [                   < =>                  ] 338,767     62.0KB/s   in 5.3s   

2016-10-13 13:49:42 (62.0 KB/s) - ‘ master.zip’  saved [338767]


Once the download is completed, unwind the zip file.

[root@linuxhelp opt]# unzip master.zip  
Archive:  master.zip
939017a6b4d0b6eb488288d362ed07744e3163d3
   creating: rockmongo-master/
  inflating: rockmongo-master/CHANGELOG.txt  
  inflating: rockmongo-master/INSTALL.txt  
  inflating: rockmongo-master/LICENSE.txt  
.
.
.
  inflating: rockmongo-master/themes/default/views/server/createDatabase.php  
  inflating: rockmongo-master/themes/default/views/server/databases.php  
  inflating: rockmongo-master/themes/default/views/server/execute.php  
  inflating: rockmongo-master/themes/default/views/server/index.php  
  inflating: rockmongo-master/themes/default/views/server/killOp.php  
  inflating: rockmongo-master/themes/default/views/server/processlist.php  
  inflating: rockmongo-master/themes/default/views/server/replication.php  
  inflating: rockmongo-master/themes/default/views/server/status.php  


List the file and check the extracted “ rockmongo-master” directory

[root@linuxhelp opt]# ls 
master.zip  rh  rockmongo-master


Next move the extracted file to the “ /var/www/html/rockmongo” directory.

[root@linuxhelp opt]# mv rockmongo-master/ /var/www/html/rockmongo


Restart the httpd services.

[root@linuxhelp opt]# systemctl restart httpd.service  


Open your browser and navigate to http://< IP_address> /rockmongo

Then login to the RockMongo using the credentials.

The main page of RockMongo appears. Start managing your server, indexes, databases, collections, documents etc.

Tag : Mongodb
FAQ
Q
How to Export/Import Data in rockmongo?
A
To import/export data of any collection, click on that collection and then click on Export/Import link on the top panel. Follow the next instructions to export your data in a zip format and then import the same zip file to import back data.
Q
How to Working with RockMongo?
A
We will now be looking at some basic operations that you can perform with RockMongo.
Q
how to Creating New Document?
A
To create a new document, click on the collection under which you want to add documents. When you click on a collection, you will be able to see all the documents within that collection listed there.
Q
What is uses of RockMango?
A
RockMongo is a MongoDB administration tool using which you can manage your server, collections, indexes, databases, documents etc. It provides a user-friendly way for reading, writing, and cr
Q
How to access RockMongo?
A
You should be able to access RockMongo directly, by browsing to http://127.0.0.1:8080/rockmongo (Linux or Mac OS X) or http://127.0.0.1/rockmongo (Windows). The username is root, and the pas