phpRedisAdmin安装配置
一、介绍phpRedisAdmin是一个web端管理redis的工具,本次安装过程做个记录。
二、安装依赖包
1
yum -y install php-fpm php-redis php-devel php-mbstring
三、下载phpRedisAdmin软件包和predis模块支持
1、下载phpRedisAdmin
1
2
3
4
5
cd /usr/local/
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
cd phpRedisAdmin/
git submodule init
git submodule update
2、下载predis模块支持
下载地址:https://github.com/nrk/predis
1
2
3
unzip predis-1.0.zip
mv predis-1.0 vendor
mv vendor /usr/local/phpRedisAdmin
四、配置phpRedisAdmin
1
2
3
cd /usr/local/phpRedisAdmin
cp includes/config.sample.inc.php includes/config.inc.php
vim includes/config.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$config = array(
'servers' => array(
array(
'name' => '127 server', // Optional name.可以设置多个服务器
'host' => '10.57.1.127',
'port' => 6379,
'filter' => '*',
),
array(
'name' => '197 server', // Optional name.
'host' => '10.57.1.197',
'port' => 6379,
'filter' => '*',
),
),
'seperator' => ':',
'maxkeylen' => 100,
'count_elements_page' => 100
);
?>
五、配置nginx
1
2
3
4
5
6
7
8
9
10
11
12
server {
listen 8090;
server_name 10.57.1.111;
index index.php index.html;
root/usr/local/phpRedisAdmin/;
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_indexindex.php;
fastcgi_paramSCRIPT_FILENAME$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
六、启动服务
1
2
/etc/init.d/php-fpm restart
/etc/init.d/nginx restart
七、访问phpRedisAdmin页面
页:
[1]