• redis的linux安装


    一、配置文件修改

    redis.conf----------------------------------------------------
    1
    bind 127.0.0.1
    # bind 127.0.0.1
    2
    protected-mode yes
    protected-mode no
    3
    daemonize no
    daemonize yes
    sentinel.conf----------------------------------------------------
    1
    # protected-mode no
    protected-mode no
    2
    daemonize yes
    3
    sentinel monitor mymaster 127.0.0.1 6379 2
    sentinel monitor mymaster 172.24.132.127 6379 2

    二、配置文件修改

    1、拷贝压缩包到服务器,解压

    rz
    rz

    find -name '*redis*'
    tar zxvf redis-4.0.1.tar.gz

    2、执行make 对Redis解压后文件进行编译
    cd redis-4.0.1
    make

    编译完成之后,可以看到解压文件redis-3.0.7 中会有对应的src、conf等文件夹,这和windows下安装解压的文件一样,大部分安装包都会有对应的类文件、配置文件和一些命令文件。

    3、编译成功后,进入src文件夹,执行make install进行Redis安装

    4、执行Redis-server 命令,启动Redis 服务

    redis-server ../redis.conf

    5、执行Redis-sentinel命令,启动哨兵 服务

    redis-sentinel ../sentinel.conf

  • 相关阅读:
    塔 · 第 二 条 约 定
    nyoj 325
    塔 · 第 一 条 约 定
    大一上
    Django之ORM
    mysql概念
    数据库索引
    使用pymysql进行数据库的增删改查
    sql注入攻击
    pymysql
  • 原文地址:https://www.cnblogs.com/xsj891107/p/7607741.html
Copyright © 2020-2023  润新知