zoukankan      html  css  js  c++  java
  • liunx部署redis

    一、下载redis

    • 安装gcc-c++
    yum install gcc-c++
    
    wget http://download.redis.io/releases/redis-6.0.3.tar.gz
    tar -zxvf redis-6.0.3.tar.gz -C /opt/module/  # -C 指定解压到那个目录下
    
    

    安装

    • 进入到解压后的目录,并编译redis
    cd /opt/module/redis-6.0.3/
    make
    
    • 安装
    make install PREFIX=/opt/module/redissrver  # 后面是指定的安装目录
    

    如果报错,需要升级gcc,执行一下命令

    gcc -v 
    yum -y install centos-release-scl
    yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
    scl enable devtoolset-9 bash
    # 以上为临时启用,如果要长期使用gcc 9.1的话:
    echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
    

    在执行make

    • 启动服务
    ./redis-server /opt/module/redis-6.0.3/redis.conf
    


    启动成功

    • 修改redis服务的配置文件
      修改绑定的ip,在redis.conf的69行左右

      damonize改为yes 可以后台运行

      requirepass 设置密码

      执行命令:
    ./redis-server /opt/module/redis-6.0.3/redis.conf
    
  • 相关阅读:
    测试工作——XML
    js call apply
    JavaScript 作用域和作用域链
    hybird app
    正则表达式
    浏览器渲染原理
    head 头标签(转发)
    参考资料地址
    unix 常用命令
    phantomjs 自动化测试
  • 原文地址:https://www.cnblogs.com/hziwei/p/12980668.html
Copyright © 2011-2022 走看看