zoukankan      html  css  js  c++  java
  • 安装phpredis扩展以及phpRedisAdmin工具

    先从phpredis的git拿到最新的源码包:
    wget https://github.com/nicolasff/phpredis/archive/master.tar.gz
     
    然后解压到进入目录:
    tar xvf master.tar.gz
    cd phpredis-master
     
    编译,安装扩展:
    phpize
    ./configure --enable-redis
    make && make install
     
    然后编辑php.ini加入 Extensions=redis.so
    重启服务器发现php提示缺少redis.so,按照提示的目录把redis.so 拷贝过去就OK了.

    phpRedisAdmin是一个在线管理redis的web工具,基于PHP完成.
    安装也非常简单,进入web目录
    git clone https://github.com/ErikDubbelboer/phpRedisAdmin.git
    cd phpRedisAdmin/
    cat README.markdown
    git submodule init
    git submodule update
     
    然后就可以通过网址访问了.看一下config.inc.php的简单配置
    'servers' => array(
                            0 => array(
                                    'name' => 'local server', // Optional name.
                                    'host' => '127.0.0.1',
                                    'port' => 6379,
                                    'filter' => '*'

                                    // Optional Redis authentication.
                                    ),
     
    这里是一些简单的redis服务配置.
    phpRedisAdmin默认是可以匿名登录的.如果要设置 需要在config里加上
    'login' => array(
                                            // Username => Password
                                            // Multiple combinations can be used
                                            'admin' => array(
                                                    'password' => 'adminpassword',
                                                    ),
                                            'guest' => array(
                                                    'password' => '',
                                                    'servers' => array(1) // Optional list of servers this user can access.
                                                    )
                                            ),

    下载predis(redis客户端: Predis、phpredis、Rediska、Redisent、iRedis,这里我用的是predis,只要放在phpredisadmin下面即可):https://github.com/nrk/predis/downloads

    [root@localhost ~]# mv predis/* /usr/local/apache2/htdocs/phpredisadmin/predis/
  • 相关阅读:
    77777 77777(2) WriteUp 绕waf技巧学习
    简单sql注入学到的延时盲注新式攻击
    代码审计 => 74cms_v3.5.1.20141128 一系列漏洞
    mysql注入新姿势(数字与字符编码注入) hex,conv
    Netty 3升级Netty4实践
    微信小程序获取用户openid,头像昵称信息,后台java代码
    转:JSP 分页显示数据 (Oracle)
    从数据库提取数据通过jstl显示在jsp页面上
    转:微信生成二维码java
    转:微信开发获取地理位置实例(java,非常详细,附工程源码)
  • 原文地址:https://www.cnblogs.com/kezf/p/phpredis.html
Copyright © 2011-2022 走看看