zoukankan      html  css  js  c++  java
  • Linux下的Redis的安装配置

    安装redis

    步骤一:安装最新的redis,需要安装Remi的软件源,官网地址:http://rpms.famillecollet.com.

    yum install -y http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

    步骤二:安装redis(默认安装最新版本)

    yum --enablerepo=remi install -y  redis

    步骤三:启动redis

    [root@localhost ~]# systemctl start redis
    [root@localhost ~]# systemctl status redis
    ● redis.service - Redis persistent key-value database
       Loaded: loaded (/usr/lib/systemd/system/redis.service; disabled; vendor preset: disabled)
      Drop-In: /etc/systemd/system/redis.service.d
               └─limit.conf
       Active: active (running) since Tue 2020-08-04 00:36:27 CST; 8s ago
     Main PID: 5713 (redis-server)
       Status: "Ready to accept connections"
       CGroup: /system.slice/redis.service
               └─5713 /usr/bin/redis-server 127.0.0.1:6379
    
    Aug 04 00:36:27 localhost.localdomain systemd[1]: Starting Redis persistent key-value .....
    Aug 04 00:36:27 localhost.localdomain systemd[1]: Started Redis persistent key-value d...e.
    Hint: Some lines were ellipsized, use -l to show in full.

    步骤四:查看redis版本号

    [root@server01 ~]# redis-cli --version
    redis-cli 6.0.6

    步骤五:设置redis开机自启

    systemctl enable redis.service
    
    默认yum安装之后,redis的配置文件在/etc/redis.conf
        vim redis.conf
                  daemonize  yes  // 222行
    127.0.0.1  192.168.11.100  //69
  • 相关阅读:
    210
    209
    208
    207
    定时任务crontab
    Python的zip与*zip函数的应用
    Python的reduce函数与map函数
    解析:cpu与io密集在何场景适合使用多进程,多线程,协程
    Python上下文(转载)
    C10K与C10M的问题
  • 原文地址:https://www.cnblogs.com/cwshuo/p/13428166.html
Copyright © 2011-2022 走看看