1、扩展列表 https://github.com/phpredis/phpredis/releases
[root@VM_27_0_centos server]# ls data lib.pl mysql nginx panel php phpinfo phpmyadmin phpredis-4.0.2 phpredis-4.0.2.tar.gz pure-ftpd redis stop
/2、上传到软件目录
root@VM_27_0_centos server]# cd phpredis-4.0.2/ [root@VM_27_0_centos phpredis-4.0.2]# ls arrays.markdown cluster.markdown config.w32 CREDITS ISSUE_TEMPLATE.md library.h package.xml redis_array.c redis_array_impl.h redis_cluster.h redis_session.c serialize.list cluster_library.c common.h COPYING debian liblzf mkdeb-apache2.sh php_redis.h redis_array.h redis.c redis_commands.c redis_session.h tests cluster_library.h config.m4 crc16.h debian.control library.c mkdeb.sh README.markdown redis_array_impl.c redis_cluster.c redis_commands.h rpm [root@VM_27_0_centos phpredis-4.0.2]# /www/server/php/71/bin/phpize Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303
/3、执行phpize 生成configure 这是要用到的下列变化
[root@VM_27_0_centos phpredis-4.0.2]# ls acinclude.m4 cluster_library.c config.h.in config.w32 debian.control library.h mkdeb.sh redis_array.c redis_cluster.c redis_session.h aclocal.m4 cluster_library.h config.m4 COPYING install-sh ltmain.sh mkinstalldirs redis_array.h redis_cluster.h rpm arrays.markdown cluster.markdown config.sub crc16.h ISSUE_TEMPLATE.md Makefile.global package.xml redis_array_impl.c redis_commands.c run-tests.php autom4te.cache common.h configure CREDITS liblzf missing php_redis.h redis_array_impl.h redis_commands.h serialize.list build config.guess configure.in debian library.c mkdeb-apache2.sh README.markdown redis.c redis_session.c tests
/4、编译安装
[root@VM_27_0_centos phpredis-4.0.2]# ./configure --with-php-config=/www/server/php/71/bin/php-config [root@VM_27_0_centos phpredis-4.0.2]# make & make install
Installing shared extensions: /www/server/php/71/lib/php/extensions/no-debug-non-zts-20160303/
NOTE:根据你的phpize 的路径