Search This Blog

Wednesday, August 17, 2011

HowTo: Admin a Memcached Server

phpmemcacheadmin - Memcached server admin in php for monitoring and debugging - Google Project Hosting

A new admin package for Memcached servers is available at google code. phpMemcachedAdmin is used to display the memcached admin data.
The current project location is in google code at: http://code.google.com/p/phpmemcacheadmin
There is a google code repo for RHEL based systems, but I have not checked if this package is available there.
The install is trivial, by default it looks for a Memcached server on localhost. The documented install needed a little modernization, so here are the steps for RHEL based systems.

First execute the following code as root.
mkdir /usr/share/phpMemcachedAdmin 
cd /usr/share/phpMemcachedAdmin 
wget http://phpmemcacheadmin.googlecode.com/files/phpMemcachedAdmin-1.2.1-r233.tar.gz 
tar -xvzf phpMemcachedAdmin-1.2.1-r233.tar.gz 
chmod 0777 Config/Memcache.php 

Next create the file phpMemcachedAdmin.conf. This will allow access to the application.
# The order is important, the top level directory last or it will overwrite. 
#Alias /phpMemcachedAdmin/docs /usr/share/phpMemcachedAdmin/docs/html  
Alias /phpMemcachedAdmin /usr/share/phpMemcachedAdmin
 
    Options FollowSymlinks
    Order Deny,Allow
    Deny from All 
    Allow from All
    #Allow from ::1
 
Finally, as root, make a link from your conf file into the web server and restart.
ln -s /usr/share/resultsdb/etc/conf.d/phpMemcachedAdmin.conf /etc/httpd/conf.d/phpMemcachedAdmin.conf service httpd restart 
And now you have a working admin system for Memcached at http://localhost/phpMemcachedAdmin/
Note:
The Ubuntu apache2 configuration wasn't described, but is quite similar. On Ubuntu apache2, you could add something similar to the available sites directory (/etc/apache2/available-sites/phpMemcachedAdmin.conf).


No comments:

Post a Comment