Install redis and redis extension under windows, set redis as windows self-starting service

1. Install redis

There is no official Windows version of Redis, but the Microsoft Open Tech group develops and maintains the Win64 version.

I downloaded version 3.0: https://github.com/MicrosoftArchive/redis/releases

After downloading, unzip it. I unzip it here to the root directory of the D drive:

1.png

1.1 Start the redis server program:

Open the cmd command, enter the redis installation directory, and run the following command:

redis-server redis.windows.conf

2.png

1.2 Start the redis client program

After the server program starts, do not close it. Double-click redis-cli.exe in the redis installation directory to start the client program.

2. Install the php-redis extension. Confirm the installed version

Check the information in phpinfo to confirm the installed version, for example, I need to install the TS version of X64.

3.png

2.1 Install redis and igbinary extensions

Redis extension download address: https://windows.php.net/downloads/pecl/releases/redis/

igbinary extension download address: http://windows.php.net/downlo...

4.png

5.png

After downloading and unzipping, copy php_redis.dll and php_igbinary.dll to the ext directory under the php installation directory

6.png

Open the php.ini file and add the extension:

extension=php_igbinary.dll
extension=php_redis.dll

7.png

8.png

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324613751&siteId=291194637