phpMemcachedAdmin installation in Linux

In our earlier tutorial, we have learned to install Memcached on Centos/RHEL & Ubuntu operating systems. For this tutorial we will discuss phpMemcachedAdmin installation, it is graphical\web interface used for the administration of memcached & that provides all the live stats for memcached. It provides real time stats for get, set, increment, decrements, evictions etc as well as other server stats.

(Recommended Read :- Installing Memcached in Ubuntu & CentOS/RHEL)

Pre-requisites

We need to have PHP packages installed on the system, most of these packages have been installed while installing memcached. But make sure that they are installed before configuring phpMemcachedAdmin,

$ yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml php-xmlrpc php-snmp

After installing these packages move ahead.

Step 1 – Downloading phpMemcachedAdmin

We will start by creating a folder for phpMemcachedAdmin in /var/www,

$ mkdir /var/www/phpMemcachedAdmin

Next , download the required phpmemcachedadmin files using the below mentioned commands,

$ wget https://github.com/hgschmie/phpmemcacheadmin/archive/master.zip

file downloaded will be in a zip format, unzip the file & keep all the contents in the directory ‘/var/www/phpMemcachedAdmin’. Next we will assign the necessary permissions to the folder & its contents,

$ chown -R apache.apache /var/www/phpMemcachedAdmin
$ chmod -R 755 /var/www/phpMemcachedAdmin

 

Step 2 – Configuring phpMemcachedAdmin in Apache

We now need to add conffiguration file for phpMemcachedAdmin under the apache directory,

$ vi /etc/httpd/conf.d/phpMemcachedAdmin.conf

& add the following configurations to it,

Alias /phpMemcachedAdmin /var/www/phpMemcachedAdmin
Alias /phpmemcachedadmin /var/www/phpMemcachedAdmin

<Directory /var/www/phpMemcachedAdmin>
Order Deny,Allow
Deny from All
Allow from 192.168.0.0/24
Allow from 127.0.0.1
</Directory>
<Directory /var/www/phpMemcachedAdmin>
AuthUserFile /etc/httpd/.htpasswd
AuthName “phpMemcachedAdmin Login Area”
AuthType Basic
require user admin
</Directory>

 

Step 3 – Setting up authentication

We have already mentioned the user that we will use i.e. admin, in the configurations of apache. We will now assign the user admin with a password by executing the following command,

$ htpasswd -cm /etc/httpd/.htpasswd admin

We now have completed our setup for phpMemcachedAdmin, restart the apache services to implement the changes.

$ service httpd restart

 

Step 4- Access the web interface

Open a web browser & enter the following URL from the web-browser,

http://IP address of the server/phpMemcachedAdmin

You will now be asked for username & password, after successful authentication we will be able to access the web interface for Memcached.

If you think we have helped you or just want to support us, please consider these :-

Connect to us: Facebook | Twitter | Google Plus

Become a Supporter – Donate us some of you hard earned money:

Linux TechLab is thankful for your continued support.

Shusain

Passionate about Linux & open source. Loves to learn, read & write about Linux as well as new technologies.

You may also like...

Leave a Reply

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