zoukankan      html  css  js  c++  java
  • redis-3.0.3安装測试

    $ tar xzvf redis-3.0.3.tar.gz

    $ cd redis-3.0.3

    $ make     //编译

     

    编译完毕进行 $ make test 命令測试

    得到例如以下错误信息: 

     

    cd src && make test   

    make[1]: Entering directory `/tmp/redis-3.0.1/src'   

    You need tcl 8.5 or newer in order to run the Redis test   

    make[1]: *** [test] Error 1   

    make[1]: Leaving directory `/tmp/redis-3.0.1/src'   

    make: *** [test] Error 2

     

    Redismake test有使用到tclshRedis进行測试,所以须要将tclsh安装好。

     

    下载地址:http://www.tcl.tk/software/tcltk/download.html  版本号选择:tcl8.6.4-src.tar.gz

     

     

    $ tar xzvf tcl8.6.4-src.tar.gz   

    $ cd tcl8.6.4/unix 

    //进行环境变量配置

    $  ./configure --prefix=/home/zhouwei/tools/tcl8.6.4 --enable-64bit

    /

    $make   //编译

    $make install   //安装

    安装完毕之后须要将tclsh加入到PATH中。并使其生效  

       

     

    # vim /etc/profile

      

    PATH=/home/zhouwei/tools/tcl8.6.4/bin:$PATH    //能够在最前面的凝视后面加入

     

    source  /etc/profile

     

     

    再次測试 

    $ make test  通过 ok

     

     

    6、设置配置文件路径

     

    mkdir -p /etc/redis

    7、改动配置文件

     

    vi /etc/redis/redis.conf

     

    仅改动: daemonize yes

    //默认情况下,redis不是在后台执行的,假设须要在后台执行,把该项的值更改为yes

    8、启动

     

    redis-server /etc/redis/redis.conf

     

    9、查看启动

     

    ps -ef | grep redis 

     

    10、使用client

     

    redis-cli

     127.0.0.1:6379> set name test

    OK

    127.0.0.1:6379> get name

    "test"

    >set name 菩提小师傅的博客

    OK

    127.0.0.1:6379> get name

    "xc6xd0xccxe1xd0xa1xcaxa6xb8xb5xb5xc4xb2xa9xbfxcd"

  • 相关阅读:
    [CSP-S模拟测试]:F(DP+线段树)
    [CSP-S模拟测试]:E(贪心)
    [CSP-S模拟测试]:D(暴力+剪枝)
    [CSP-S模拟测试]:C(三分+贪心)
    [CSP-S模拟测试]:B(DP+数学)
    [CSP-S模拟测试]:A(数学)
    [CSP-S模拟测试]:密码(数位DP+库默尔定理)
    BZOJ3456 城市规划 【多项式求逆】
    多项式求逆
    uoj185 [ZJOI2016]小星星 【dp + 容斥】
  • 原文地址:https://www.cnblogs.com/wzzkaifa/p/6891607.html
Copyright © 2011-2022 走看看