1.下载redis的php扩展
wget https://github.com/phpredis/phpredis/archive/2.2.6.zip
2.解压与编译
unzip 2.2.6
cd phpredis-2.2.6
/www/wdlinux/php-5.3.10/bin/phpize
./configure –with-php-config=/www/wdlinux/php-5.3.10/bin/php-config
make
make install
运行到这一句话的时候
/www/wdlinux/php-5.3.10/bin/phpize
补充出错信息
Running phpize does not require you to enter the directory of phpize to run, but to run it in the source code directory. Run /usr/bin/phpize directly in the source directory without changing directories. The directory environment is a very important part of executing a program. When you refer to other people's code, you should pay attention to other people's directory structures.
Translate the error message for you: Make sure /usr/bin/phpize is running in the root directory of your source code
This is someone else’s path, you can’t copy it.
Check where phpize is:
which phpize
which phpize
如果你的PHP是用yum安装的话,应该是在
/usr/bin
,那么直接运行phpize
If your PHP is installed with yum, it should be in/usr/bin
, then runphpize will do.