Install phpredis under Linux
phpredis is a redis extension of php. Only with phpredis installed, php code can operate the redis database. The following only introduces how to install phpredis.
1. Download phpredis directly from the official git to the local directory (~/soft/)
git clone https://github.com/jiangtong1125/phpredis.git (git can also be packaged without installing it Download)
2. Enter the phpredis directory
cd ~/soft/phpredis/
3. Execute phpize, /usr/local/php/bin/phpize (if there are multiple php versions locally) , please use the correct version)
4. Compile./configure --with-php-c/local/php/bin/php-config
5. Compile Completed, directly execute make&&make install installation, the installation completion result
6. Enter the directory marked by the red line in the picture above, and copy the redis.so file in the directory to the extension directory of PHP
How to view php extension directory? Execute phpinfo, extension_dir is,
Copy to this directory
7. Add extension=redis.so in php.ini
8. Restart apache and check phpinfo again
well done, have fun playing! ! ! !
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the installation of phpredis under Linux, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











How does the Redis caching solution realize the requirements of product ranking list? During the development process, we often need to deal with the requirements of rankings, such as displaying a...

Redis plays a key role in data storage and management, and has become the core of modern applications through its multiple data structures and persistence mechanisms. 1) Redis supports data structures such as strings, lists, collections, ordered collections and hash tables, and is suitable for cache and complex business logic. 2) Through two persistence methods, RDB and AOF, Redis ensures reliable storage and rapid recovery of data.

Cryptocurrency data platforms suitable for beginners include CoinMarketCap and non-small trumpet. 1. CoinMarketCap provides global real-time price, market value, and trading volume rankings for novice and basic analysis needs. 2. The non-small quotation provides a Chinese-friendly interface, suitable for Chinese users to quickly screen low-risk potential projects.

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

How to set the SpringBoot project default run configuration list in Idea using IntelliJ...

Git and GitHub are key tools for modern software development. Git provides version control capabilities to manage code through repositories, branches, commits and merges. GitHub provides code hosting and collaboration features such as Issues and PullRequests. Using Git and GitHub can significantly improve development efficiency and team collaboration capabilities.

The optimization solution for SpringBoot timing tasks in a multi-node environment is developing Spring...

Why is the return value empty when using RedisTemplate for batch query? When using RedisTemplate for batch query operations, you may encounter the returned results...
