zoukankan      html  css  js  c++  java
  • redis(二)--安装

    源码安装redis

    参考github上的说明:https://github.com/antirez/redis

    从github中获取最新的源码:

    github地址:https://github.com/antirez/redis

    下载包:https://github.com/antirez/redis/archive/unstable.zip

    github中,redis的页面截图:

    上图红色圈住的就是我们要的下载地址啦。在服务器中下载这个包。

    wget https://github.com/antirez/redis/archive/unstable.zip

     并且解压缩这个压缩包。

    unzip unstable.zip

    (有安装git的话 也可以 git clone 。)

    make

    在上一步解压缩了的redis-unstable文件夹中编译

    cd redis-unstable/
    make

    PS:系统要安装make工具。

    编译完的样子如上图所示。

     

    make PREFIX=[/path] install

    执行命令, 生成redis程序。

    make PREFIX=/root/tools/redis/ install

    命令执行后,会在定义的目录下有一个bin目录。

    运行redis

    先把源码中的redis.conf文件复制到上一步bin目录中。

    cp redis.conf /root/tools/redis/bin/

    把这个conf文件小修改一下。

    daemonize yes

    端口酌情修改:

    # Accept connections on the specified port, default is 6379 (IANA #815344).
    # If port 0 is specified Redis will not listen on a TCP socket.
    port 6379

    然后保存redis.conf文件。

    根据这份修改过的conf文件启动redis:

    ./redis-server ./redis.conf

    netstat 一下,看到程序启动成功即可。

    转载烦请说明出处: github weibo
    新博客: hal123
  • 相关阅读:
    TCP协议特点和三次握手/四次挥手
    CAP定理、BASE理论
    对自写的Asp.Net分页控件的应用方式(异步无刷新分页)
    Asp.Net分页控件
    SqlHelper
    简易贪吃蛇
    测试一下
    iOS --- DIY文件名批量修改
    iOS常用 --- NSDictionary 与 NSMutableDictionary
    iOS常用---NSArray,NSMutabuleArray
  • 原文地址:https://www.cnblogs.com/ELMND/p/4544963.html
Copyright © 2011-2022 走看看