How To Access Remote Amazon RDS With PHPMyAdmin

Amazon Relational Database Service (Amazon RDS) is a web service that makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while managing time-consuming database management tasks, freeing you up to focus on your applications and business.

First of all we need to install PHPMyAdmin in ec2 instance (CentOS, Fedora, Amazon Linux AMI)

Step:1

First we need to enable the RPMforge repository on our CentOS system as PHPMyAdmin is not available in the official CentOS/Fedora/Amazon Linux AMI repositories:

Import the RPMforge GPG key:

# rpm --import  http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

On x86_64 systems:

#  yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

On i386 systems:

# yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

Step:2

PHPMyAdmin can now be installed as follows:

# yum install phpmyadmin

Step:3

Now, we configure PHPMyAdmin. We change the Apache configuration so that PHPMyAdmin allows connections not just from localhost (by commenting out the <Directory “/usr/share/phpmyadmin”> stanza):

vi /etc/httpd/conf.d/phpmyadmin.conf
#
# Web application to manage MySQL
#
 
#<Directory "/usr/share/phpmyadmin">
# Order Deny, Allow
# Deny from all
# Allow from 127.0.0.1
#</Directory>
 
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

Step:4

Next, we change the authentication in PHPMyAdmin from cookie to http: and host from local to RDS host url:

vi /usr/share/phpmyadmin/config.inc.php
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
/* Server parameters */
$cfg['Servers'][$i]['host'] = '*******.******.us-east-1.rds.amazonaws.com';

Step:5

Restart Apache service:

# /etc/init.d/httpd restart

Step:6

Now we can browse RDS database.

# http://<IPADDRESS> /phpmyadmin

Or

# http://<Domain name>/phpmyadmin

Advantages Of PHPMyAdmin Over Command line Interface.

  • One of the advantages of using PHPMyAdmin is that it has a user interface and you can run queries within the SQL.
  • It is also used in checking referential integrity in MyISAM tables.
  • One can execute, edit and bookmark any SQL-statement, even batch-queries (This will work only in the latest version of PHPMyAdmin).
  • Multiple MySQL servers can be managed by PHPMyAdmin.
  • One can export data to various formats: CSV, SQL, XML, Excel and more.
  • Using Query-By-Example(QBE), create complex queries automatically connecting required tables.
  • One can Browse, view and drop databases, tables, views, fields and indexes.
  • It supports InnoDB tables and foreign keys.

Also See: How to install and configure Jaspersoft in Linux Server(RHEL/Centos/Fedora)

I hope you will find this useful. Feel free to give your valuable feedback.

If you want to update your traditional IT infrastructure to cloud computing, then you can hire expert cloud engineers from Andolasoft.

How To Install Nagios Core on CentOS, Fedora, or RHEL Server

Nagios® Core™ is the industry standard Open Source system and network monitoring application which enables organizations to identify, resolve IT infrastructure problems before they affect critical business processes. It watches hosts and services that you specify, alerting you when things go bad and when they get better. Nagios Core serves as one of the foundation blocks of Nagios XI – commercial monitoring solution.

It was originally designed to run under Linux, although it should work under most other unices as well.

Steps to install :

STEP-1:

Install prerequisites packages

       #   yum  install  gd  gd-devel  httpd  php  gcc  glibc  glibc-common

STEP-2:

Disable selinux. open the file: /etc/selinux/config by issuing the following command          

       # vi /etc/selinux/config

Then, type “disable” opposite to “SELINUX” e.g  SELINUX= disable

STEP-3:

Create a user “nagios” and set password for it by typing the below commands.

       #   /usr/sbin/useradd -m nagios
       #   passwd nagios

STEP-4:

Create a new group “nagios” for allowing external commands to be submitted    through the web interface and add both the nagios user and the apache user to the group by following the below steps

       #    /usr/sbin/groupadd nagios
       #    /usr/sbin/usermod -a -G nagios nagios
       #    /usr/sbin/usermod -a -G nagios apache

STEP-5:

Create a directory “download “ and download nagios-core and plugins to it.

       #  mkdir download                  
       #  cd  download
       #  wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.4.4.tar.gz
       #  wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.16.tar.gz

STEP-6:

Compile and Install nagios-core package by following below steps

  • Change directory to “download” folder
       #   cd ~/download
  • Untar the nagios-core tar bal
       #   tar xzf nagios-3.4.4.tar.gz
  • Change the directory to “nagios-3.4.4”
       # cd nagios-3.4.4
  • Configure the package and install
    #  ./configure
    #   make all
    #   make install
    #   make install-init
    #   make install-commandmode
    #   make install-config
    #   make install-webconf

STEP-7:

Create a password to log in to the web interface by issuing the following command.

       # htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

STEP-8: 

Start the service and set it on chkconfig to start at booting time.

       #  service nagios start
       #  chkconfig nagios on

STEP-9:  

Compile and Install nagios-plugin package by following below steps.

  • Change directory to “download” folder
       # cd   ~/download
  • Untar nagios-plugin tar ball
       # tar xzf  nagios-plugins-1.4.16.tar.gz
  • Change the directory to “nagios-plugins-1.4.16”
       # cd  nagios-plugins-1.4.16
  • Configure the package and install.
       # ./configure
       # make
       # make install

STEP-10:

Start the apache service and enable it on boot by issuing following command.

       # service httpd start
       # chkconfig httpd on

STEP-11:  Now, connect to your nagios server through browser by typing.

       # http://Your-Nagios-IP/nagios or  http://localhost/nagios

Then, enter login credentials.
Username: nagiosadmin & password you have chosen earlier

Features of NAGIOS Core

  • Monitoring of network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
  • Monitoring of host resources (processor load, disk usage, etc.)
  • Simple plugin design that allows users to easily develop their own service checks
  • Parallelized service checks
  • Ability to define network host hierarchy using “parent” hosts, allowing detection of and distinction between hosts that are down and those that are unreachable
  • Contact notifications when service or host problems occur and get resolved (via email, pager, or user-defined method)
  • Ability to define event handlers to be run during service or host events for proactive problem resolution
  • Automatic log file rotation
  • Support for implementing redundant monitoring hosts
  • Optional web interface for viewing current network status, notification and problem history, log file, etc.

Recommended Blog: How to install and configure Jaspersoft in Linux Server(RHEL/Centos/Fedora)

I hope you liked this topic, if you have any questions or comments please feel free to put under comments!