zoukankan      html  css  js  c++  java
  • 安装redis-4.0.11

    • 安装
    cd /download
    wget wget http://download.redis.io/releases/redis-4.0.11.tar.gz
    tar xvf redis-4.0.11.tar.gz
    cd redis-4.0.11
    make
    make install
    
    mkdir -p /var/redis/6379 # Redis的PID文件位置
    mkdir -p /etc/redis # 配置文件
    • 配置文件
    cp /download/redis-4.0.11/redis.conf /etc/redis/6379.conf
    cd /etc/redis
    vim 6379.conf
    
    # 修改以下内容
    daemonize = yes
    port = 6379
    pidfile = /var/run/redis_6379.pid
    dir= /var/redis/6379
    • 启动脚本
    cd /etc/init.d/
    cp /download/redis-4.0.11/utils/redis_init_script /etc/init.d/redis_6379
    vim /etc/init.d/redis_6379
    
    # 加入以下内容
    # chkconfig: 2345 90 10 
    # description: Redis is a persistent key-value database
    
    /etc/init.d/redis_6379 start
    /etc/init.d/redis_6379 stop
    
    # 设置开机执行redis脚本
    chkconfig redis_6379 on
    
    # 杀掉以前的redis进程。否则执行stop时,可能会报[/var/run/redis_6379.pid does not exist, process is not running]的错误
    ps -ef | grep "redis"
    kill 5013
    
    service redis_6379 start
    service redis_6379 stop



  • 相关阅读:
    hh
    SDUT 3923 打字
    最短路
    阶乘后面0的个数(51Nod 1003)
    大数加法
    Biorhythms(中国剩余定理)
    usaco-5.1-theme-passed
    usaco-5.1-starry-passed
    usaco-5.1-fc-passed
    usaco-4.4-frameup-passed
  • 原文地址:https://www.cnblogs.com/gelu/p/9650845.html
Copyright © 2011-2022 走看看