Debian8(amd64)安装部署Memcached管理工具MemAdmin

目录
1、memadmin工具简介
2、nginx及php环境安装
3、memadmin工具部署
4、memadmin工具的简单运用
5、额外的配置优化
6、总结

1、memadmin工具简介
MemAdmin是一款可视化的Memcached管理与监控工具,使用PHP开发,体积小,操作简单。
主要功能:
服务器参数监控:STATS、SETTINGS、ITEMS、SLABS、SIZES实时刷新
服务器性能监控:GET、DELETE、INCR、DECR、CAS等常用操作命中率实时监控
支持数据遍历,方便对存储内容进行监视
支持条件查询,筛选出满足条件的KEY或VALUE
数组、JSON等序列化字符反序列显示
兼容memcache协议的其他服务,如Tokyo Tyrant (遍历功能除外)
支持服务器连接池,多服务器管理切换方便简洁

2、nginx及php环境安装

2.1、安装nginx
1234567 root@com:~# uname -r
3.16.0-4-amd64
root@com:~# cat /etc/issue
Debian GNU/Linux 8 \n \l
root@test1:~# apt-get install nginx
root@test1:~# chkconfig --list nginx
nginx                    0:off  1:off  2:on  3:on  4:on  5:on  6:off

浏览器访问可见nginx的默认页面,如下:

Debian8(amd64)安装部署Memcached管理工具

2.2、php环境部署
root@test1:~# apt-get install php5-fpm
root@test1:~# dpkg -L php5-fpm
/.
/etc
/etc/php5
/etc/php5/fpm
/etc/php5/fpm/conf.d
/etc/php5/fpm/pool.d
/etc/php5/fpm/pool.d/www.conf    #这个是php5-fpm的配置文件
/etc/php5/fpm/php-fpm.conf
/etc/logrotate.d
/etc/logrotate.d/php5-fpm
/etc/init
/etc/init/php5-fpm.conf
/etc/init.d
/etc/init.d/php5-fpm
/usr
/usr/sbin
/usr/sbin/php5-fpm
/usr/lib
/usr/lib/php5
/usr/lib/php5/20131226
/usr/lib/php5/php5-fpm-checkconf
/usr/lib/php5/php5-fpm-reopenlogs
/usr/share
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/php5-fpm.8.gz
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/php5-fpm
/usr/share/php5
/usr/share/php5/sapi
/usr/share/php5/sapi/fpm
/usr/share/bug
/usr/share/bug/php5-fpm
/usr/share/bug/php5-fpm/script
/usr/share/bug/php5-fpm/control
/usr/share/doc
/lib
/lib/systemd
/lib/systemd/system
/lib/systemd/system/php5-fpm.service
/usr/share/doc/php5-fpm

root@test1:~# vim /etc/php5/fpm/pool.d/www.conf
#listen = /var/run/php5-fpm.sock      注释此行,这不是必须的,只是我习惯让php5-fpm监听在一个端口而不是sock上
listen = 9000                                    增加此行使php5-fpm监听在9000端口
root@test1:~# /etc/init.d/php5-fpm restart
[ ok ] Restarting php5-fpm (via systemctl): php5-fpm.service.
root@test1:~# ss -tnl | grep 9000
LISTEN    0      128                      *:9000                    *:*

root@test1:~# vim /etc/nginx/sites-enabled/default   
#修改nginx配置,使其能把php的请求转发到php5-fpm,在“#location ~ \.php$ {”代码块的下方增加如下代码:
      location ~ \.php$ {
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /var/www/html$fastcgi_script_name;
                include        fastcgi_params;
        }
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
root@test1:~# vim /var/www/html/info.php
<?php
    phpinfo();
?>
root@test1:~# nginx -t
root@test1:~# /etc/init.d/nginx restart
[ ok ] Restarting nginx (via systemctl): nginx.service.

浏览器打开php的测试面试,如下:

Debian8(amd64)安装部署Memcached管理工具

3、memadmin工具部署及简单运用

123456 root@test1:~# ls
memadmin-1.0.12.tar.gz
root@test1:~# tar xf memadmin-1.0.12.tar.gz -C /var/www/html/
root@test1:~# cd /var/www/html/
root@test1:/var/www/html# ls
index.nginx-debian.html  info.php  memadmin

访问memadmin测试,如下:

Debian8(amd64)安装部署Memcached管理工具

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/047fb33d84a2a8ba32e6013d5fd33a0a.html