Installation of Redis Services and PHP extensions in the Win7 environment

Source: Internet
Author: User
Tags redis windows redis server

1, download the Redis Windows application, support 32-bit and 64-bit, according to the actual situation download

: Https://github.com/dmajkic/redis/downloads

2, copy the corresponding program to the directory you need, where I use the 64-bit, put in the E:\redis directory

3. Start Redis server: Open a CMD window, first switch to Redis directory (E:\redis), run Redis-server.exe redis.conf

Note Redis.conf is a configuration file that primarily configures information such as the ports used by Redis (default redis.conf if not written)

There is no redis.conf in the Redis compression package that I downloaded, I put the default redis.conf file content at the end of the article.

Note: This window runs Windows for the Redis server, and Redis shuts down when it is closed.

4. Start the Redis client: Open a CMD window and run the command redis-cli.exe-h 127.0.0.1-p 6379 after entering the directory, then you can do it.

5. Download the redis PHP extension:

: Https://github.com/nicolasff/phpredis/downloads

According to the PHP version to download the appropriate extension, the version must correspond to

6, put Php_redis.dll and php_igbinary.dll into the PHP ext folder, and then php.ini Add code (note that the sequence of the two lines of code can not be reversed)

Extension=php_igbinary.dll
Extension=php_redis.dll

7. Restart the Web server

8. PHP Test

<?php    new Redis ();    $redis->connect ('127.0.0.1 ',$redis->set (' test ',$redis->get (' test ');? >       

Installation of Redis Services and PHP extensions in the Win7 environment

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.