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



  • 相关阅读:
    apicloud教程
    apicloud教程3 (转载)
    apicloud教程2 (转载)
    apicloud教程1 (转载)
    API CLOUD 快捷键
    JS IIFE写法
    php事件驱动
    JQuery实践--Why JQuery
    Jquery实践--精读开篇
    python 实践--新闻聚合
  • 原文地址:https://www.cnblogs.com/gelu/p/9650845.html
Copyright © 2011-2022 走看看