Redis

一、关系型数据库和非关系型数据库

二、redis介绍

三、redis命令

四、安装redis

        1.关闭防火墙和核心防护

        systemctl stop firewalld

        systemctl disable firewalld

        setenforce 0

        

        2.安装redis

        yum install -y gcc gcc-c++ make

        cd /opt

        tar zxvf /opt/redis-7.0.9.tar.gz -C /opt/

        

        #由于Redis源码包中直接提供了 Makefile 文件,所以在解压完软件包后,

        不用先执行 ./configure 进行配置,可直接执行 make 与 make install 命令进行安装。

        cd /opt/redis-7.0.9

        make

        make PREFIX=/usr/local/redis install

         

         

         

 

#执行软件包提供的 install_server.sh 脚本文件设置 Redis 服务所需要的相关配置文件

cd /opt/redis-5.0.7/utils

./install_server.sh

......                                        #一直回车

Please select the redis executable path [] /usr/local/redis/bin/redis-server

#需要手动输入 /usr/local/redis/bin/redis-server ,注意要一次性正确输入

 

3.把redis的可执行程序文件放入路径环境变量的目录中便于系统识别

        ln -s /usr/local/redis/bin/* /usr/local/bin/

4.当 install_server.sh 脚本运行完毕,Redis 服务就已经启动,默认监听端口为 6379

        netstat -natp | grep redis

5.修改配置 /etc/redis/6379.conf 参数

        vim /etc/redis/6379.conf

        #70行,添加 监听的主机地址

        bind 127.0.0.1 192.168.10.23

6.使配置文件生效

        /etc/init.d/redis_6379 restart

 

 

redis-cli  -h host -p port -a password  进入命令行

 

相关推荐

  1. <span style='color:red;'>Redis</span>

    Redis

    2024-04-02 14:16:01      61 阅读
  2. <span style='color:red;'>Redis</span>

    Redis

    2024-04-02 14:16:01      128 阅读
  3. <span style='color:red;'>Redis</span>

    Redis

    2024-04-02 14:16:01      42 阅读
  4. <span style='color:red;'>redis</span>

    redis

    2024-04-02 14:16:01      67 阅读
  5. <span style='color:red;'>Redis</span>

    Redis

    2024-04-02 14:16:01      51 阅读
  6. <span style='color:red;'>redis</span>

    redis

    2024-04-02 14:16:01      67 阅读
  7. <span style='color:red;'>Redis</span>

    Redis

    2024-04-02 14:16:01      60 阅读
  8. <span style='color:red;'>redis</span>

    redis

    2024-04-02 14:16:01      70 阅读
  9. Redis

    2024-04-02 14:16:01       58 阅读
  10. <span style='color:red;'>redis</span>

    redis

    2024-04-02 14:16:01      62 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-02 14:16:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-02 14:16:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-02 14:16:01       82 阅读
  4. Python语言-面向对象

    2024-04-02 14:16:01       91 阅读

热门阅读

  1. 递归---算法

    2024-04-02 14:16:01       44 阅读
  2. 2024最新华为OD机试试题库全 -【符号运算】- C卷

    2024-04-02 14:16:01       38 阅读
  3. ES6中的Map与Set

    2024-04-02 14:16:01       43 阅读
  4. C语言中向函数中传递函数指针的方法

    2024-04-02 14:16:01       44 阅读
  5. 简单设计模式讲解

    2024-04-02 14:16:01       42 阅读
  6. C++命名空间详解

    2024-04-02 14:16:01       45 阅读
  7. 【Ubuntu】可配置环境变量位置

    2024-04-02 14:16:01       41 阅读