• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

Install RockMongo on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
16
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Update and reboot your server
  3. Step 2: Install Apache
  4. Step 3: Setup the firewall
  5. Step 4: Install PHP 5 and all the necessary extensions
  6. Step 5: Install the latest stable version of MongoDB
  7. Step 6: Configure the system to prevent warning messages when using MongoDB
  8. Step 7: Install and Use RockMongo
  9. Want to contribute?


RockMongo is a web-based MongoDB Management tool that is similar to the MySQL Management tool: phpMyAdmin.

This tutorial will cover the process of installing and using RockMongo on CentOS 7 x64.

Prerequisites

In order to get hands-on experiences from this tutorial, you need to:

  • A Vultr instance running CentOS 7 x64
  • A sudo user.

Step 1: Update and reboot your server

sudo yum update
sudo shutdown -r now

After the reboot, use the same sudo user to log in again.

Step 2: Install Apache

Since RockMongo is web-based, you need to have a running web server. For the purpose of this tutorial, we will be using Apache:

sudo yum install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service

Step 3: Setup the firewall

In order to access RockMongo from your browser, you need to allow the http traffic to get through the firewall.

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Then you can visit http://[YourServerIP] from your browser to verify your setup.

Step 4: Install PHP 5 and all the necessary extensions

RockMongo is a PHP 5-based software. You need to install PHP 5 and some extensions in order for RockMongo to function properly:

sudo yum install php php-devel php-pear php-pecl-mongo
sudo yum install gcc openssl.x86_64 openssl-devel.x86_64
sudo pecl install mongodb
echo 'extension=mongodb.so' | sudo tee -a /etc/php.ini

Step 5: Install the latest stable version of MongoDB

Here, I will use Yum to install MongoDB 3.2.1 which as of writing is the latest stable version of MongoDB.

First, create a Yum repo for MongoDB:

cd /etc/yum.repos.d
sudo vi mongodb-org-3.2.repo

Populate this file with:

[mongodb-org-3.2]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1

Save and quit:

:wq!

Then install and setup MongoDB using the following commands:

sudo yum install -y mongodb-org
sudo systemctl start mongod.service
sudo systemctl enable mongod.service

Step 6: Configure the system to prevent warning messages when using MongoDB

Some configuration tweaks are required before you can start using MongoDB:

a) Disable the transparent huge pages

For this purpose, you need to create a startup script:

sudo vi /etc/init.d/disable-transparent-hugepages

Copy the following code section into it:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          disable-transparent-hugepages
# Required-Start:    $local_fs
# Required-Stop:
# X-Start-Before:    mongod mongodb-mms-automation-agent
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description:       Disable Linux transparent huge pages, to improve
#                    database performance.
### END INIT INFO

case $1 in
  start)
    if [ -d /sys/kernel/mm/transparent_hugepage ]; then
      thp_path=/sys/kernel/mm/transparent_hugepage
    elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then
      thp_path=/sys/kernel/mm/redhat_transparent_hugepage
    else
      return 0
    fi

    echo 'never' > $/enabled
    echo 'never' > $/defrag

    unset thp_path
    ;;
esac

Save and quit:

:wq!

Make sure the script is executable and added to the system startup:

sudo chmod 755 /etc/init.d/disable-transparent-hugepages
sudo chkconfig --add disable-transparent-hugepages

Additionally, you need to adjust the tuned configuration:

sudo mkdir /etc/tuned/no-thp
sudo vi /etc/tuned/no-thp/tuned.conf

Copy the following content into it:

[main]
include=virtual-guest

[vm]
transparent_hugepages=never

Save and quit:

:wq!

Execute tuned-adm:

sudo tuned-adm profile no-thp

b) Configure ulimit values

sudo vi /etc/security/limits.conf

Append the following 4 rows to the end of this file:

mongod soft nofile 64000
mongod hard nofile 64000
mongod soft nproc 32000
mongod hard nproc 32000

Save and quit:

:wq!

Reboot the system to put your changes into effect:

sudo shutdown -r now

Step 7: Install and Use RockMongo

Download the latest stable release of RockMongo from GitHub:

cd ~
wget https://github.com/iwind/rockmongo/archive/1.1.7.tar.gz
tar zxvf 1.1.7.tar.gz

For security purposes, you need to modify the RockMongo administrator’s username and password:

vi rockmongo-1.1.7/config.php

Find the following row:

$MONGO["servers"][$i]["control_users"]["admin"] = "admin";//one of control users ["USERNAME"]=PASSWORD, works only if mongo_auth=false

In this row, modify the first admin string as your custom username, the second admin string as your custom password. Then save and quit:

:wq!

Finally, move the whole directory to your Web directory:

sudo mv ~/rockmongo-1.1.7 /var/www/html/

Now, you can visit http://[YourServerIP]/rockmongo-1.1.7 from your browser and log in RockMongo with the credentials you setup earlier.

This concludes our tutorial. Thank you for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How To Install SA-MP San Andreas Multiplayer on CentOS 7

Next Post

Install Tiki Wiki CMS Groupware on CentOS 7

Next Post

Install Tiki Wiki CMS Groupware on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet