zoukankan      html  css  js  c++  java
  • redis 3.0.7安装

    redis-3.2.9 安装查看这个链接:
    https://www.cnblogs.com/yinz/p/7065146.html

    注意:3.2版本安装好后要设置如下配置才可以远程访问:

    vim redis.conf

    protected-modeno
    并且注释掉
    bind 127.0.0.1
    
    设置密码

    服务器:阿里云 centos 6 64位

    [root@iZ112fail84Z ~]# wget http://download.redis.io/releases/redis-3.0.7.tar.gz

    [root@iZ112fail84Z ~]#tar zxvf redis-3.0.7.tar.gz
    [root@iZ112fail84Z ~]# ls
    redis-3.0.7
    [root@iZ112fail84Z ~]# cd redis-3.0.7
    [root@iZ112fail84Z redis-3.0.7]# ls
    00-RELEASENOTES COPYING Makefile redis.conf runtest-sentinel tests
    BUGS deps MANIFESTO runtest sentinel.conf utils
    CONTRIBUTING INSTALL README runtest-cluster src
    [root@iZ112fail84Z redis-3.0.7]# make
    执行之后出现很多,最后显示
    Hint: It’s a good idea to run ‘make test’ ;)

    make[1]: Leaving directory /root/redis-3.0.7/src'
    // 命令是 make install ,下边的cd src && make install是自动显示出来的
    [root@iZ112fail84Z redis-3.0.7]# make install
    cd src && make install
    make[1]: Entering directory
    /root/redis-3.0.7/src’

    Hint: It’s a good idea to run ‘make test’ ;)

    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install
    INSTALL install

    make[1]: Leaving directory `/root/redis-3.0.7/src’

    cp /root/redis-3.0.7/redis.conf /usr/local/bin
    [root@iZ112fail84Z] cd /usr/local/bin
    [root@iZ112fail84Z bin]# ls
    redis-benchmark redis-check-dump redis.conf redis-server
    redis-check-aof redis-cli redis-sentinel

    vim redis.conf
    修改 redis.conf中的daemonize yes
    启动redis
    [root@iZ112fail84Z bin]# redis-server redis.conf
    [root@iZ112fail84Z bin]# ps -ef|grep redis
    root 19935 1 0 22:21 ? 00:00:00 redis-server *:6379
    root 19941 17020 0 22:21 pts/0 00:00:00 grep redis

    [root@iZ112fail84Z bin]# redis-cli
    127.0.0.1:6379> set k1 v1
    OK
    127.0.0.1:6379> get k1
    “v1”

    停止服务:
    [root@iZ112fail84Z bin]# redis-cli shutdown

  • 相关阅读:
    Linux(centos)系统各个目录的作用详解
    java.util.ConcurrentModificationException异常处理
    欧几里得算法
    Google数据中心B4网络具体实现
    网络虚拟化
    SDN/NFV若干问题
    opendaylight的Beryllium安装
    解读SDN的东西、南北向接口
    SFC中的故障管理
    SFC中的问题描述
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13310727.html
Copyright © 2011-2022 走看看