zoukankan      html  css  js  c++  java
  • centos 8 安装 redis 6

    下载:https://download.redis.io/releases/redis-6.2.6.tar.gz

    解压:tar xvzf redis-6.2.6.tar.gz

    进入解压目录:cd redis-6.2.6

    编译:make

    安装:make install

    复制默认脚本:cp utils/redis_init_script /etc/init.d/redis_6379

    编辑默认脚本端口:vim /etc/init.d/redis_6379 (REDISPORT)

    创建目录:mkdir /etc/redis/

    复制配置文件:cp redis.conf /etc/redis/6379.conf

    创建主目录:mkdir /var/redis/6379

    编辑配置文件:vim /etc/redis/6379.conf

    • 编辑配置文件,确保执行以下更改:

      • daemonize设置为yes(默认情况下设置为 no)。
      • pidfile设置为(如果需要,请修改端口)。/var/run/redis_6379.pid
      • 相应地更改 port。在我们的示例中,不需要它,因为默认端口已经是 6379。
      • 设置您的首选loglevel
      • 将 logfile设置为/var/log/redis_6379.log
      • dir设置为 /var/redis/6379(非常重要的步骤!)

    开机启动:/usr/lib/systemd/systemd-sysv-install enable redis_6379

    重启:reboot

    检查服务是否启动:redis-cli ping(pong is ok)

  • 相关阅读:
    团队项目-选题报告
    第一次结对编程作业
    第一次个人编程作业
    第一次软工作业
    antd form表单数组对象格式
    antd form表单验证失去焦点时验证和重置验证状态
    fetch请求
    typescript类装饰器
    typescript泛型
    浮点数问题
  • 原文地址:https://www.cnblogs.com/bmate/p/15706373.html
Copyright © 2011-2022 走看看