[root@minion-1 ~]#wget https://codeload.github.com/phpredis/phpredis/zip/develop
2. 改名
[root@minion-1 ~]#mv develop phpredis-develop.zip
[root@minion-1 ~]#unzip phpredis-develop.zip
[root@minion-1 ~]#cd phpredis-develop
[root@minion-1 phpredis-develop]# /usr/local/php7/bin/phpize
3. 设置编译环境
[root@minion-1 phpredis-develop]#./configure –with-php-config=/usr/local/php7/bin/php-config
4. make
[root@minion-1 phpredis-develop]# make && make install
5. 编辑php.ini,搜索shmop,在后面添加一行extension=redis.so
[root@minion-1 phpredis-develop]# vi /usr/local/php7/etc/php.ini
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
extension=redis.so
6. 检查下是否生效
[root@minion-1 phpredis-develop]# /usr/local/php7/bin/php -m |grep redis
redis
7. 进入之前解压的源码php7的目录
[root@minion-1 phpredis-develop]# cd ~/php-7.3.2/ext/dba
8. 执行phpize
/usr/local/php7/bin/phpize
9. 设置环境
[root@minion-1 dba]# ./configure –with-php-config=/usr/local/php7/bin/php-config
10. make安装
[root@minion-1 dba]#make && make install