Detailed tutorial on installing Redis under Windows 64-bit

Source: Internet
Author: User

Method/Step
  1. Create a new Folder "Redis" on the D drive, unzip the Redis Zip package and unzip all the files into the Redis folder. (Other drive characters can also drip ^_^)

    File Description:

    Redis-benchmark.exe #基准测试

    Redis-check-aof.exe # AOF

    Redischeck-dump.exe # Dump

    Redis-cli.exe # Client

    Redis-server.exe # Server

    REDIS.WINDOWS.CONF # configuration file

  2. Windows run (shortcut key: Windows key +r), enter the "cmd" command to enter the Doc OS window.

    Use the command "Redis-server.exe redis.windows.conf" to start the Redis service "skip directly if you don't see the following error." If you also like me to appear the following error, do not worry, there is always a solution drip!

    Workaround:

    As a hint, there is a problem with the Maxheap identity, open the profile redis.windows.conf, search for maxheap, and then directly specify the good content.

    ......

    #

    # Maxheap <bytes>

    Maxheap 1024000000

    .......

    Then start again, OK, success.

  3. Service Start Success Status

  4. Start the Doc window for the Redis service without shutting down because the service needs to be executed all the time, close the service, and close the window directly.

    Open a new doc window with your own client tool to test the command "Redis-cli.exe" with the following details: The example shows a basic read-write operation that sets the set Key->age,value->21,get age to get the value of key. ^_^

    3. Use in PHP – Install Php_redis.dll extensions

    linux:https://pecl.php.net/package/redis/2.2.7/

    Windows:https://pecl.php.net/package/redis/2.2.7/windows

    First put the Php_redis.dll into the PHP ext folder, and then add the following code in the php.ini configuration file:
    Extension=php_redis.dll

    Restarting the Web server

    4. Use in PHP

    The code is as follows

    <?php
    $redis = new Redis ();
    $redis->connect (' 127.0.0.1 ', 6379);
    $redis->set (' Test ', ' Hello Redis ');
    echo $redis->get (' Test ');
    ?>

    Output Hello Redis success!

    Additional Redis Command Reference http://redisdoc.com/
    How to automatically start redis hidden command-line windows under Windows

Installing Redis under Windows 64-bit detailed tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.