phpMemcachedAdmin : Installation Guide
Security
phpMemcachedAdmin does not provide any security system, you need to add this feature by yourself.
Installation Guide
Download
Download latest release from this page
Unzip/Untar & Give files permissions
You have to give Read & Execute right to all files, and Read, Write & Execute to configuration files and temporary directory.
It depend on your system, user and group but here is an exemple
1 2 3 4 |
tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz chmod +rx * chmod 0777 Config/Memcache.php chmod 0777 Temp/ |
Apache with vhost or Nginx with secure access
Check this guide from Leenoux of http://www.kutukupret.com
Unix Socket
To connect via Unix Socket, type unix:///tmp/memcached.socket in IP/Hostname, and 0 in Port in configuration.
Thanks to bondarets.
SELinux & Permission Denied error
For those having an issue with Permission Denied error it could be related to SELINUX.
Run the following on the cl of the server hosting phpmemcacheadmin :
1 |
setenforce 0 |
If you can now gather stats from servers you are attempting to monitor, you may have to allow httpd by running the following :
1 |
grep httpd /var/log/audit/audit.log | audit2allow -M httpd |
Once this command is run, you will be asked to run the following :
1 |
semodule -i httpd.pp |
Now, you will need to run :
1 |
setenforce 1 |
Test to make sure you are still able to poll stats.
“Permission Denied” issue also can be fixex by :
1 |
setsebool -P httpd_can_network_memcache 1 |
Thanks to ryan.taylor0 & jamesliu78
ModSecurity and Permission Denied Error
If you are getting permission errors when saving the server configuration and you are using Apache Mod_Security, it appears that a rule can block the following POST parameters send in saving configuration
1 |
ARGS_NAMES:server[1][1][hostname] ARGS_NAMES:server[1][1][port] |
Disabling the Mod_Security rule or Mod_Security itself resolved the issue.
Thanks to darre…brien@vendoservices.com
Contributions
Many thanks to people you contributed to this guide.
How to see the stats?
stats items
tar -xvzf phpMemcachedAdmin-1.2.2-r262.tar.gz
chmod +rx *
chmod 0777 Config/Memcache.php
chmod 0777 Temp/
This is incorrect. That first chmod needs to be recursive, ie
chmod -R +rx *
Hi Everyone, I tried to install phpmemcachedadmin and I found some difficult to work using nginx. I installed it using nginx + php-fpm + CentOS 7:
INSTALLING NGINX + PHP-FPM
yum install nginx php-fpm -y
CREATING NGINX VHOST:
/etc/nginx/conf.d/memcachedadmin.conf
server {
listen 80;
server_name memcachedadmin.mydomain.local;
access_log /var/log/nginx/memcachedadmin-access.log main;
error_log /var/log/nginx/memcachedadmin-error.log;
root /var/www/html/memcachedadmin;
index index.php;
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
CONFIGURING PHP-FPM
/etc/php-fpm.d/www.conf
Change the follow variables:
listen = /var/run/php-fpm.sock
listen.owner = apache
listen.group = apache
listen.mode = 0666
Starting services
systemctl start fpm-php
systemctl start nginx
Hello all,
I’ve just installed phpMemcachedAdmin on my Syno NAS. The default server is localhost. I’ve red on Syno forum that Memcache is included in DSM (Syno operating system), working with a default API, not the PECL one. So no need to install Memcache as it allready exists on the NAS.
I would like to make my Drupal site faster. This site is located on the Syno NAS.
A Drupal Memcache module exists.
My question is : do I need to install this module or is the NAS Memcache enough as it is the same physical server ?
However I’ve tried to activate the Memcache module for Drupal, but I get a message telling me that PECL API is missing.
In the phpMemcachedAdmin I tried to add a server (127.0.0.1 on port 80) in order to use the default API but it doesn’t work too.
Thanx for your help.