Install phpredis instance sharing in docker

小云云
Release: 2023-03-20 14:34:01
Original
2453 people have browsed it


1. Download the php redis extension
wget https://github.com/phpredis/phpredis/archive/3.1.4.tar.gz
2. Unzip
tar -xvf 3.1.4.tar.gz Enter the folder

3. Compile

Use phpize to report an error about missing installation of php-devel

Then use yum install php-devel but there is a compatibility error

Later use yum install php56w-devel (installation successful)

/usr/bin/phpize 执行phpize 具体的环境phpize位置不同
./configure --with-php-config=/usr/bin/php-config 需要核对php的安装地址
Copy after login

4. Install
make&&make install
5. Modify php .ini
vim /etc/php.ini
Add the next 2 lines, but the specific environment still needs to be installed in a specific way

extension_dir = "/usr/lib64/php/modules"
extension=redis.so
Copy after login

Related recommendations:

How to install phpredis extension under Mac
PHP extension PHPredis gets data and returns something like: 1 data
Install phpRedisAdmin under contos

The above is the detailed content of Install phpredis instance sharing in docker. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!