zoukankan      html  css  js  c++  java
  • CentOS7.2 安装Redis3.2.8

    Redis3.2.8 下载

    下载Redis3.2.8.tar.gz

    将文件放置在usr/local/redis/中

    解压文件

    安装:

    make && make install
    [root@localhost redis-3.2.8]# make && make install

    进入usr/local/redis/redis-3.2.8/utils文件夹

    ./install_server.sh

    详情:

    [root@localhost utils]# ./install_server.sh
    Welcome to the redis service installer
    This script will help you easily set up a running redis server
    
    Please select the redis port for this instance: [6379] 
    Selecting default: 6379
    Please select the redis config file name [/etc/redis/6379.conf] 
    Selected default - /etc/redis/6379.conf
    Please select the redis log file name [/var/log/redis_6379.log] 
    Selected default - /var/log/redis_6379.log
    Please select the data directory for this instance [/var/lib/redis/6379] 
    Selected default - /var/lib/redis/6379
    Please select the redis executable path [/usr/local/bin/redis-server] 
    Selected config:
    Port           : 6379
    Config file    : /etc/redis/6379.conf
    Log file       : /var/log/redis_6379.log
    Data dir       : /var/lib/redis/6379
    Executable     : /usr/local/bin/redis-server
    Cli Executable : /usr/local/bin/redis-cli
    Is this ok? Then press ENTER to go on or Ctrl-C to abort.
    Copied /tmp/6379.conf => /etc/init.d/redis_6379
    Installing service...
    Successfully added to chkconfig!
    Successfully added to runlevels 345!
    Starting Redis server...
    Installation successful!

    从上面可以看出redis的配置文件路径。

    启动服务:

    systemctl start redis_6379
    systemctl status redis_6379

    详情:

    [root@localhost ~]# systemctl start redis_6379
    [root@localhost ~]# systemctl status redis_6379
    ● redis_6379.service - LSB: start and stop redis_6379
       Loaded: loaded (/etc/rc.d/init.d/redis_6379; bad; vendor preset: disabled)
       Active: active (exited) since 六 2017-04-08 23:03:01 CST; 9s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 10566 ExecStart=/etc/rc.d/init.d/redis_6379 start (code=exited, status=0/SUCCESS)
    
    4月 08 23:03:01 localhost.localdomain systemd[1]: Starting LSB: start and stop red....
    4月 08 23:03:01 localhost.localdomain redis_6379[10566]: /var/run/redis_6379.pid ex...
    4月 08 23:03:01 localhost.localdomain systemd[1]: Started LSB: start and stop redi....
    Hint: Some lines were ellipsized, use -l to show in full.

    修改6379.conf

    修改 bind 127.0.0.1 为 bind 0.0.0.0

    http://www.cnblogs.com/cndavidwang/p/6429406.html

  • 相关阅读:
    Spring Aop表达式以及EL表达式处理
    Java 设计模式-观察者(Observer )
    Java 设计模式-命令模式(Command Pattern)
    Java 设计模式-策略模式(Strategy Pattern)
    隐式使用This 引用逸出
    Java 设计模式-代理模式(Proxy Pattern)
    Java 设计模式-装饰器模式(Decorator)
    单例设计模式
    抽象工厂
    XML
  • 原文地址:https://www.cnblogs.com/hongdada/p/6683382.html
Copyright © 2011-2022 走看看