博客
关于我
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/

    你可能感兴趣的文章
    Nginx基础知识点与使用场景梳理
    查看>>
    Nginx多域名,多证书,多服务配置,实用版
    查看>>
    nginx如何实现图片防盗链
    查看>>
    Nginx学习总结(10)——Nginx前后端分离将多个请求转发到多个Tomcat,负载均衡反向代理
    查看>>
    Nginx学习总结(11)——提高Nginx服务器的安全性,稳定性和性能的12种技巧
    查看>>
    Nginx学习总结(12)——Nginx各项配置总结
    查看>>
    Nginx学习总结(13)——Nginx 重要知识点回顾
    查看>>
    Nginx学习总结(14)——Nginx配置参数详细说明与整理
    查看>>
    Nginx学习总结(15)—— 提升 Web 应用性能的十个步骤
    查看>>
    Nginx学习总结(1)——Nginx入门简介
    查看>>
    Nginx学习总结(2)——Nginx手机版和PC电脑版网站配置
    查看>>
    Nginx学习总结(3)——Nginx配置及应用场景之高级配置
    查看>>
    Nginx学习总结(4)——负载均衡session会话保持方法
    查看>>
    Nginx学习总结(5)——Nginx基本配置备忘
    查看>>
    Nginx学习总结(7)——Nginx配置HTTPS 服务器
    查看>>
    Nginx学习总结(8)——Nginx服务器详解
    查看>>
    Nginx学习总结(9)——前端跨域问题解决
    查看>>
    nginx学习笔记
    查看>>
    nginx学习笔记002---Nginx代理配置_案例1_实现了对前端代码的方向代理_并且配置了后端api接口的访问地址
    查看>>
    nginx学习笔记003---Nginx代理配置_注意,在Windows中路径要用/
    查看>>