phpRedisAdmin is a simple web interface to manage Redis databases.
phpRedisAdmin 在 Redis clients 的列表中,目前還零星有更新;
It is released under the Creative Commons Attribution 3.0 license. This code is being developed and maintained by Erik Dubbelboer.
Example,感受一下
You can find an example database at http://dubbelboer.com/phpRedisAdmin/

- server:同時可以管理若干個 server;每個 server 是 redis 的一個實例;
- database:每個 server 默認划分為 16 個庫,用於 key 空間的隔離;
- 第 1 個filter是過濾 server 的(type here to server filter),默認 * 星號即可;
- 第 2 個filter是過濾 key 的(type here to filter),即 KEYS 命令;
- 藍色 i 圖標可以查看 INFO 命令結果;
安裝
- 下載版本包
從 github 下載 [phpRedisAdmin],最新版 v1.6.0。依賴 predis 1.0.3 及以上;
從 github 下載 predis,最新 v1.1.1。 - 或者從 git 庫直接 clone
git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git cd phpRedisAdmin git clone https://github.com/nrk/predis.git vendor
- 或者使用 composer。
配置
- Predis 代碼直接放在 phpRedisAdmin 的 vendor 子目錄下;
如果 predis 不存在,報 500 錯誤。
Predis:Flexible and feature-complete Redis client for PHP and HHVM; - 配置 config.inc.php
You may also want to copy includes/config.simple.inc.php to includes/config.inc.php and edit it with your specific redis configuration.
如果你要修改配置,則復制 config.simple.inc.php 到 config.inc.php 進行修改即可;通常不必修改;
訪問 redis 數據通常要進行認證,要確保數據安全;
login 變量就是負責認證的; - 直接使用 nginx HTTP Basic Authentication 進行認證即可(不必配置修改 login 變量);
redisadmin.conf 配置片段 の nginx
auth_basic "redisadmin authentication required"; auth_basic_user_file htpasswd/redisadmin.example.com; index index.php; location ~ ".*\.php$" { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; }
Troubleshooting(性能問題)
- 初始頁面會加載全部數據;
- 當 keys 上萬時,篩選是比較耗時的;
- 內存分配耗盡問題;
error.log 如下:
2016/10/25 12:23:36 [error] 19098#0: *3394834 FastCGI sent in stderr: "PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /home/app/example/phpRedisAdmin/index.php on line 53" while reading response header from upstream, client: 1.202.201.13, server: redisadmin.example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "redisadmin.example.com"
注:memory_limit 128M 內存限制問題,修改 /usr/local/php/lib/php.ini,或者 php 腳本加入ini_set('memory_limit', '256M');
詳見 ini_set 函數;
sasanrose/phpredmin
Sasan Rose 主導開發的這個 Web 界面,頗具特色,支持 console 命令,有統計圖形,操控性看起來很強大;
作者:michael_jia
鏈接:https://www.jianshu.com/p/0792472b4a1d
來源:簡書
著作權歸作者所有。商業轉載請聯系作者獲得授權,非商業轉載請注明出處。