zoukankan      html  css  js  c++  java
  • How to install Redis 3.2 on CentOS 6 and 7

    What is Redis?

    Redis is a flexible open-source, key value data store, used as a database, cache and message broker. Redis allows the user to store vast amounts of data without the limits of a relational database.
    In order to achieve its outstanding performance, Redis works with an in-memory dataset. Depending on your use case, you can persist it either by dumping the dataset to disk every once in a while, or by appending each command to a log. Persistence can be optionally disabled, if you just need a feature-rich, networked, in-memory cache.

    Install necessary packages

    On CentOS 6:

    yum install wget make gcc tcl

    On CentOS 7

    yum install wget make gcc

    Install Redis 3.2

    For installing Redis 3.2 you have to download the source file and compile it because Redis 3.2 is not available in any repository yet.

    On CentOS 6 and CentOS 7

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

    Now you have to extract the file that you just downloaded by typing:

    tar -xvzf redis-3.2.8.tar.gz

    Change directory with the command below:

    cd redis-3.2.8

    It’s time to compile your Redis step by step:

    cd deps
    make hiredis lua jemalloc linenoise
    make geohash-int

    Now run below command to get back to the parent directory and run the next command:

    cd ../
    make
    make install

    And for getting sure running a test:

    make test

    It’s going to take a few minutes, you can check that everything is ok.

    Install init script

    In this section, we are going to install “init script” to manage the process of Redis.

    cd utils
    
    ./install_server.sh

    You will be prompt for some configuration you can hit “Enter” to accept all the default values or you can set yours.

    Finally, your Redis server is installed and you can start the service by the command below:

    For CentOS 6

    service redis_6379 start

    For CentOS 7

    systemctl start redis_6379

    If you want to test your Redis server you can easily use the instruction below:

    redis-cli
    > set test "HugeServer"
    > get test
     

    The answer should be “HugeServer”

    If you need a control panel for your Redis Server you may use Phpredmin or Redmon

  • 相关阅读:
    js读取解析json数据
    dot.js简单入门
    免费API接口整理
    综合方式输出通信数据
    redis常用
    数据库主从复制
    数据库存储过程
    数据库触发器
    局域网访问本地wampserver调试环境
    远程数据同步工具cwRsync
  • 原文地址:https://www.cnblogs.com/sos-blue/p/7606925.html
Copyright © 2011-2022 走看看