Installation and use of Redis under window

Source: Internet
Author: User
Tags install redis

1. Download and install Redis

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

Find the corresponding version download installation

Open the CMD window and use the CD command to go to the root directory where Redis is installed and run Redis-server.exe redis.conf

If the report is an error, you can open redis.conf find search port and then modify the port (redis default port is 6379)

Now change to Port 6680

Keep this window (close this window is tantamount to shutting down the Redis service), open a new window, go to the root directory under Redis, run Redis-cli.exe-h 127.0.0.1-p 6680, start testing with Set,get

2. Using Redis in PHP

To use Redis in PHP, you first need to get the redis extension

Redis extension: https://windows.php.net/downloads/pecl/snaps/redis/2.2.5/, note to download the corresponding version number, the extension file Php_ Redis.dll in the Ext directory, open the php.ini file plus the following configuration

Extension=php_igbinary.dllextension=php_redis.dll restart Apache, Output phpinfo, as shown, find the Redis entry to prove the successful configuration run the following code in test2.php, Access: 3. Using Redis in TP because the Redis class has already been encapsulated in TP, so the call can refer to the article link: http://www.cnblogs.com/lpyan/p/5608333.html

Installation and use of Redis under window

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.