Menu

MongoDB with RockMongo on CentOS

RockMongo is a MongoDB administration GUI tool, written in PHP 5.
MongoDB is a NoSQL document-oriented database and it is cross-platform which makes the process of data integration faster and much easier. 

Main features:
  • Open source under New BSD License
  • Runs fast, and easy to install
  • I18N (English, Chinese(English, Chinese, French, Japanese, British, Spanish, German, Russion, Italian)
  • System
  1. Multiple hosts, and one host can has multiple administrators
  2. Switch among hosts freely
  3. Password protection
  • Server
  1. Server info (web server, PHP, directives in PHP.ini ...)
  2. Status
  3. Databases overview
  4. Replication status
  • Database
  1. Query, create, drop, repair
  2. Execute commands and javascript codes
  3. Statistics
  4. Profiling
  5. Users management
  6. Data transfer(clone)
  7. Export/import
  • Collection
  1. Advanced query and explain tool
  2. Read, insert, update, duplicate and remove single row
  3. Query, create and drop indexes
  4. Validate collection
  5. Clear all records in collection
  6. Remove and change a batch of criteria matched rows
  7. Statistics
  8. Rename
  9. Modify properties (capped, size, max ...)
  10. Data transfer(clone)
  11. Export/import
  • Field
  1. Update/Remove/Clear operations
  2. GridFS
  3. View chunks
  4. Download file
INSTALL MONGODB and ROCKMONGO
First you need to install some much needed packages. Execute the following command:
yum install git install gcc php-pear php-devel openssl-devel unzip
Now create a MongoDB repo using your favorite text editor. and paste following code
# nano /etc/yum.repos.d/mongodb.repo
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1
Install MongoDB:
# yum install mongo-10gen mongo-10gen-server
Start MongoDB and enable it to start on boot:
# systemctl start mongod
# systemctl enable mongod
You can check the status of MongoDB with the below commands:
#  systemctl status mongod
#  mongostat
MongoDB is now installed on your server, so let’s continue with the RockMongo installation. RockMongo needs an active php_mongo extension. So let’s start. To install php_mongo we will use PECL. PECL is a repository for PHP Extensions.
# pecl install mongo
Once the installation is finished you should get the message below:
Build process completed successfully
Installing '/usr/lib64/php/modules/mongo.so'
install ok: channel://pecl.php.net/mongo-1.6.13
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini
As the message says, you now need to edit your server php.ini file and add the Mongo extension. To find which is your actual php.ini file execute:
# php -i |grep php.ini
Now edit the file and paste the 'extension=mongo.so' line in the 'Dynamic Extensions' section. Save and close the file. Then restart Apache for the changes to take effect.
# nano /etc/php.ini
# service httpd restart
Verify that the extension is available and output bellow
# php -m | grep -i mongo
mongo
Now download RockMongo and install it. Enter the /opt directory:
# cd /opt
# wget https://github.com/iwind/rockmongo/archive/master.zip
# unzip master.zip
# mv rockmongo-master/ /var/www/html/rockmongo
Now Restart the server with following command:
# service httpd restart
Now open your favorite web browser and navigate to http://your_server_IP/rockmongo/ where you will be welcomed by the RockMongo interface as shown in the image below:

About Author:


I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Next
Newer Post
Previous
Older Post

0 comments:

Post a Comment

 
Top