zoukankan      html  css  js  c++  java
  • centos安装redis总结

    1、redis需要 gcc等软件编译,所以需要安装依赖:

    yum -y install gcc gcc-c++ make tcl
    yum -y install centos-release-scl
    yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
    scl enable devtoolset-9 bash

    2、redis配置文件位于:需要拷贝到 安装目录下面:

    cp redis-6.0.10/redis.conf /opt/sys/redis/redisSoft/bin/

    3、redis后台启动,需要修改redis.conf

    daemonize yes

    4、redis的开机启动文件:

    /etc/systemd/system/redis.service

    [Unit]
    Description=redis-server
    After=network.target
    
    [Service]
    Type=forking
    ExecStart=/opt/sys/redis/redis-6.0.10/bin/redis-server /opt/sys/redis/redis-6.0.10/bin/redis.conf
    PrivateTmp=true
    
    [Install]
    WantedBy=multi-user.target

    5、第一次启动 需要进入安装目录

    cd redis/bin

    执行:

    /redis-server redis.conf
  • 相关阅读:
    2020软件工程最后一次作业
    常用的10种算法

    赫夫曼编码
    哈希表(散列)
    查找算法
    排序算法
    递归

    软件工程最后一次作业
  • 原文地址:https://www.cnblogs.com/easyidea/p/14299948.html
Copyright © 2011-2022 走看看