Home >Backend Development >PHP Tutorial >Install phpredis instance sharing in docker
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的安装地址
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
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!