Home Backend Development PHP Tutorial windows上redis安装和php的redis扩展安装

windows上redis安装和php的redis扩展安装

Jun 13, 2016 pm 01:12 PM
conf google php redis windows

windows下redis安装和php的redis扩展安装

?

首先下载一个redis的安装包:

windows:http://code.google.com/p/servicestack/wiki/RedisWindowsDownload

linux:http://code.google.com/p/redis/downloads/list

redis-2.0.0版本:?redis-2.0.0 (186)

redis-2.4.5版本:?redis-2.4.5-win32-win64.zip (61)

解压后,得到一个redis的文件夹,打开文件夹得到如下图的一些文件:

安装包中是不提供redis.conf的,关于配置可以到网上搜索一下,或者从这里直接下载:redis.conf (324)

下载后可以将redis.conf放到上图所示位置!

用命令行,切换到redis的根目录,然后启动redis服务端即redis-server.exe,如下图:

启动后的效果图如下:

当前服务端没有1个客户端连接,因此显示0 clients,

现在分别启动两个客户端,如下图:

这里值得注意的是:当你登录redis-cli.exe的时候,服务端并没有检测到客户端的存在,也就是在客户端执行了第一次操作以后,服务端才检测到这个状态.

在windows下安装php的redis扩展非常简单,下载一个.dll扩展包放到php的ext目录下,在php.ini里边添加一行配置就可以了.

这里提供php5.3版本的redis扩展包:php_redis-5.3.zip (732)

解压并放到php的ext目录下,打开php.ini,增加一行:

?
1
extension=php_redis.dll

然后,重启apache或者nginx或者IIS就可以了.

检测是否安装成功,可以打开phpinfo看下:

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem of third-party interface returning 403 in Node.js environment? How to solve the problem of third-party interface returning 403 in Node.js environment? Mar 31, 2025 pm 11:27 PM

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Why does an error occur when installing an extension using PECL in a Docker environment? How to solve it? Apr 01, 2025 pm 03:06 PM

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...

How to download okx trading platform How to download okx trading platform Mar 26, 2025 pm 05:18 PM

The OKX trading platform can be downloaded through mobile devices (Android and iOS) and computers (Windows and macOS). 1. Android users can download it from the official website or Google Play, and they need to pay attention to security settings. 2. iOS users can download it through the App Store or follow the official announcement to obtain other methods. 3. Computer users can download the client of the corresponding system from the official website. Always make sure to use official channels when downloading, and register, log in and security settings after installation.

Compilation and installation of Redis on Apple M1 chip Mac failed. How to troubleshoot PHP7.3 compilation errors? Compilation and installation of Redis on Apple M1 chip Mac failed. How to troubleshoot PHP7.3 compilation errors? Mar 31, 2025 pm 11:39 PM

Problems and solutions encountered when compiling and installing Redis on Apple M1 chip Mac, many users may...

How to trigger the background asynchronous batch sending of SMS messages in the foreground without affecting the user experience? How to trigger the background asynchronous batch sending of SMS messages in the foreground without affecting the user experience? Mar 31, 2025 pm 11:45 PM

How to implement the function of triggering the background asynchronous batch sending of SMS messages in the foreground? In some application scenarios, users need to trigger batch short in the background through foreground operations...

Which is better PHP or Laravel? Which is better PHP or Laravel? Mar 27, 2025 pm 05:31 PM

PHP and Laravel are not directly comparable, because Laravel is a PHP-based framework. 1.PHP is suitable for small projects or rapid prototyping because it is simple and direct. 2. Laravel is suitable for large projects or efficient development because it provides rich functions and tools, but has a steep learning curve and may not be as good as pure PHP.

Explain late static binding in PHP (static::). Explain late static binding in PHP (static::). Apr 03, 2025 am 12:04 AM

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

See all articles