zoukankan      html  css  js  c++  java
  • redis单机安装

    1、下载安装包

    wget http://download.redis.io/releases/redis-3.2.1.tar.gz
    

    2、安装

    tar -zxvf redis-3.2.1.tar.gz 
    cd redis-3.2.1
    make
    make PREFIX=/usr/local/redis install
    
    
    mkdir /usr/local/redis/etc/
    cp redis.conf /usr/local/redis/etc/ 
    cd /usr/local/redis/bin/
    cp redis-benchmark redis-cli redis-server /usr/bin/
    
    
    vim /usr/local/redis/etc/redis.conf
    
    # 修改一下配置
    # redis以守护进程的方式运行
    # no表示不以守护进程的方式运行(会占用一个终端)  
    daemonize yes
    bind 192.168.30.128 #改成自己的ip地址
    
    
    # 启动redis(指定配置文件)
    redis-server /usr/local/redis/etc/redis.conf
    
    #检查
    [root@linux-node1 bin]# lsof -i:6379
    COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
    redis-ser 4906 root    4u  IPv4  75872      0t0  TCP linux-node1:6379 (LISTEN)
    redis-ser 4906 root    6u  IPv4  75875      0t0  TCP linux-node1:6379->linux-node3:34242 (ESTABLISHED)
    redis-ser 4906 root    7u  IPv4  75877      0t0  TCP linux-node1:6379->linux-node2:42326 (ESTABLISHED)
    

      

      

  • 相关阅读:
    BZOJ1049 [HAOI2006]数字序列0
    UOJ265 【NOIP2016】愤怒的小鸟
    #include <deque>
    #include <queue>
    #include <vector>
    #include <set>
    #include <map>
    BZOJ1217:[HNOI2003]消防局的设立
    浅谈贪心
    CF1060B:Maximum Sum of Digits
  • 原文地址:https://www.cnblogs.com/zhaojingyu/p/12744111.html
Copyright © 2011-2022 走看看