php7安装redis扩展PhpRedis

1.git clone https://github.com/phpredis/phpredis.git
2./usr/local/php7/bin/phpize
提示缺autoconf
apt-get install m4
apt-get install autoconf
3../configure 报错,找不到php-config
./configure –with-php-config=/usr/local/php7/bin/php-config
4.make && make install 报错,文件各种找不到
默认分支没法给php7编译,换分支
5.git clone -b php7 https://github.com/phpredis/phpredis.git
6.重复之前步骤
7.编译通过

———————————————————————-
Libraries have been installed in:
/usr/local/php7/redis4php7/phpredis/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
– have your system administrator add LIBDIR to `/etc/ld.so.conf’

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
———————————————————————-

Build complete.
Don’t forget to run ‘make test’.

Installing shared extensions: /usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/

发表评论

邮箱地址不会被公开。 必填项已用*标注