美文网首页
Redis 的安装

Redis 的安装

作者: 码农UP2U | 来源:发表于2020-03-25 23:53 被阅读0次

    Redis 是一种支持多种数据结构的缓存,也是一种存储。具体看 Redis 的官网

    Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes with radius queries and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

    它的安装比较容易,具体如下:

    • 下载源码
      将源码下载到 /usr/src 目录下:
    cd /usr/src
    wget http://download.redis.io/releases/redis-5.0.8.tar.gz
    
    • 解压源码
    tar xf redis-5.0.8.tar.gz
    
    • 编译
      进入 redis 目录,进行编译
    cd redis-5.0.8
    make
    
    • 安装
      将 Redis 安装到 /usr/local/redis 目录下
    make PREFIX=/usr/local/redis install
    
    • 拷贝配置文件
      从 /usr/local/redis-5.0.8 目录下拷贝 redis.conf 文件到 /usr/local/redis 目录下
    cd /usr/local/redis
    cp /usr/src/redis-5.0.8/redis.conf ./
    
    • 启动 Redis
      启动 /usr/local/redis/bin 目录下的 redis-server 文件,启动的配置文件是 /usr/local/redis 目录下的 redis.conf 文件
    cd /usr/local/redis
    ./bin/redis-server redis.conf
    


    微信中搜索 “码农UP2U” 关注我的公众号吧!!!

    相关文章

      网友评论

          本文标题:Redis 的安装

          本文链接:https://www.haomeiwen.com/subject/zegfuhtx.html