zoukankan      html  css  js  c++  java
  • centos_redis 安装脚本

    #!/bin/bash
    
    # change to root
    
    echo "start to install build env..."
    
    sudo yum groupinstall "Development Tools"
    
    sudo yum install wget
    
     
    
    echo "start download redis source code"
    
    wget http://download.redis.io/releases/redis-5.0.4.tar.gz
    
    sudo mv redis-5.0.4.tar.gz /usr/local
    
    cd /usr/local
    
    sudo tar zvxf redis-5.0.4.tar.gz
    
    cd redis-5.0.4
    
    echo "start install redis¡..."
    
    sudo make && sudo ake install
    
    cd src
    
    sudo cp redis-benchmark redis-check-aof redis-check-rdb redis-cli redis-sentinel redis-server redis-trib.rb /usr/bin
    
    sudo mkdir -p /etc/redis
    
    sudo cp ../redis.conf /etc/redis
    
    cd /etc/redis
    
    sudo sed -i '136s/no/yes/g' redis.conf
    
    sudo sed -i '88s/yes/no/g' redis.conf
    
    #sed -i '69s/bind 127.0.0.1/#bind 127.0.0.1/g' redis.conf
    
     
    
    echo "start redis server"
    
    sudo redis-server /etc/redis/redis.conf
    
     
    
    cnt=`ps aux | grep redis | wc -l`
    
    if [ ${cnt} > 1 ]; then
    
    echo "start server ok!"
    
    fi
    
     
    
  • 相关阅读:
    JVM内存问题分析
    CAS
    普通内部类,匿名内部类和静态内部类
    文章简介
    conda更换下载源
    MySQL常见约束
    MySQL常见的数据类型
    DDL(数据定义语言)
    DML语言(数据操纵语言)
    进阶9:联合查询
  • 原文地址:https://www.cnblogs.com/lurenq/p/11987129.html
Copyright © 2011-2022 走看看