博客
关于我
Redis安装(linux)
阅读量:775 次
发布时间:2019-03-23

本文共 1318 字,大约阅读时间需要 4 分钟。

installation redis on centos

redis installation guide for centos

below is step-by-step instructions for installing redis on centos 7.x or later:

  • download redis installation package

    visit the official redis website or use package manager to download the latest stable version of redis.

  • unzip redis

    after downloading the tar.gz file follow these steps:

  • mkdir -p /opt/redis  mv redis-6.x.x.tar.gz /opt/redis/  cd /opt/redis/  tar -zxvf redis-6.x.x.tar.gz
    1. install dependencies for centos
      if your system does not have gcc-c++ installed perform the following:
    2. sudo yum install gcc-c++
      1. compile redis
        run the make command to compile redis from source.
      2. make
        1. install redis
          after compilation run the make install command to install redis to the default location.
        2. make install
          1. default installation path

            on centos the redis server binary is typically installed in /usr/local/bin/redis-server.

          2. copy configuration file

            after installation copy the sample redis.conf configuration file from the source directory to your desired path.

          3. modify configuration file

            编辑配置文件default设置为后台运行将daemonize换成yes。

          4. start redis

            使用指定config文件启动redis服务。

          5. sudo ./redis-server /etc/redis.conf
            1. connect to redis
              测试连接使用redis cli客户端工具.
            2. redis-cli
              1. shutdown redis
                执行shutdown命令停止服务。
              2. shutdown

                check if redis processes have been terminated by running

                ps aux | grep redis

    转载地址:http://gyzzk.baihongyu.com/

    你可能感兴趣的文章
    Netty工作笔记0056---Unpooled应用实例2
    查看>>
    Netty工作笔记0057---Netty群聊系统服务端
    查看>>
    Netty工作笔记0058---Netty群聊系统客户端
    查看>>
    Netty工作笔记0059---Netty私聊实现思路
    查看>>
    Netty工作笔记0060---Netty心跳机制实例
    查看>>
    Netty工作笔记0060---Tcp长连接和短连接_Http长连接和短连接_UDP长连接和短连接
    查看>>
    Netty工作笔记0061---Netty心跳处理器编写
    查看>>
    Netty工作笔记0063---WebSocket长连接开发2
    查看>>
    Netty工作笔记0065---WebSocket长连接开发4
    查看>>
    Netty工作笔记0066---Netty核心模块内容梳理
    查看>>
    Vue基本使用---vue工作笔记0002
    查看>>
    Netty工作笔记0068---Protobuf机制简述
    查看>>
    Netty工作笔记0069---Protobuf使用案例
    查看>>
    Netty工作笔记0070---Protobuf使用案例Codec使用
    查看>>
    Netty工作笔记0071---Protobuf传输多种类型
    查看>>
    Netty工作笔记0072---Protobuf内容小结
    查看>>
    Netty工作笔记0073---Neety的出站和入站机制
    查看>>
    Netty工作笔记0074---handler链调用机制实例1
    查看>>
    Netty工作笔记0075---handler链调用机制实例1
    查看>>
    Netty工作笔记0076---handler链调用机制实例3
    查看>>