扩展:
apache rewrite教程:
http://coffeelet.blog.163.com/blog/static/13515745320115842755199/
http://www.cnblogs.com/top5/archive/2009/08/12/1544098.html
apache rewrite 出现死循环 http://ask.apelearn.com/question/1043
php错误日志级别参考 http://ask.apelearn.com/question/6973
php开启短标签 http://ask.apelearn.com/question/120
php.ini详解 http://legolas.blog.51cto.com/2682485/493917
11.32 PHP扩展模块安装
1. 查看模块 :
[[email protected]~]# /usr/local/php/bin/php -m
2. 进入src目录:
[[email protected] ~]# cd /usr/local/src/
3. 下载phpredis—develop:
[[email protected] src]# wget https://codeload.github.com/phpredis/phpredis/zip/develop
4. phpredis—develop是zip包(刚刚下载这个包本身就是压缩包!),重命名下:
[[email protected] src]# mv develop phpredis-develop.zip
5. 解压phpredis-develop.zip:
[[email protected] src]# unzip phpredis-develop.zip
6. 进入phpredis-develop目录:
[[email protected] src]# cd phpredis-develop
7. 安装依赖包:
[[email protected] phpredis-develop]# yum install -y autoconf
8. 生成configure文件:
[[email protected] phpredis-develop]# /usr/local/php/bin/phpize
10. 编译:
[[email protected] phpredis-develop]# ./configure --with-php-config=/usr/local/php/bin/php-config
11. 检查上一条命令执行是否有错误?
[[email protected] phpredis-develop]# echo $?
12. make 并且 make install:
[[email protected] phpredis-develop]# make && make install
13. 检查上一条命令执行是否有错误?
[[email protected] phpredis-develop]# echo $?
14. 查看扩展模块存放目录(可以在php.ini中去自定义该路径)
[[email protected] phpredis-develop]# /usr/local/php/bin/php -i |grep extension_dir
15. 查看是否有redis.so文件:
[[email protected] phpredis-develop]# ls /usr/local/php/lib/php/extensions/no-debug-zts-20131226
16. 编辑php.ini配置文件
[[email protected] phpredis-develop]# vim /usr/local/php/etc/php.ini
在末尾添加一行配置内容:
extension = redis.so
17. 搜索是否有redis扩展模块!!!
[[email protected] phpredis-develop]# /usr/local/php/bin/php -m |grep redis