Linux安装phpredis扩展
2017-02-15 16:23
369 查看
Linux下php安装Redis扩展
安装环境:CentOS 7 1、下载
下载地址:http://pecl.php.net/package/redis
文件名:redis-2.2.8.tgz
文件下载成功后,用Xshell 5使用rz命令上传至/usr/local
安装lrzsz命令:yum install lrzsz -y
2、安装
[root@localhost local]# tar -zxvf redis-2.2.8.tgz #解压
[root@localhost local]# cd redis-2.2.8 #进入安装目录
[root@localhost redis-2.2.8]# /usr/bin/phpize #用phpize生成configure配置文件
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
[root@localhost redis-2.2.8]# ./configure --with-php-config=/usr/bin/php-config #配置
[root@localhost redis-2.2.8]# make #编译
[root@localhost redis-2.2.8]# make install #安装
Installing shared extensions: /usr/lib64/php/modules/
安装完成之后,出现上面的安装路径,目录中的redis.so.
3、配置支持php
[root@localhost redis-2.2.8]# vim
+ /etc/php.ini #编辑配置文件
在最后一行添加以下内容
extension=redis.so
:wq!
4、重启服务
[root@localhost
redis-2.2.8]# systemctl restart httpd.service #保存退出
查看phpinfo可以看到支持了
转载自:http://www.cnblogs.com/yangxia-test/p/4195198.html
相关文章推荐
- linux下安装phpredis扩展--update20141127
- linux phpredis扩展 安装
- 在Linux上安装phpredis扩展
- linux下安装redis及PHP扩展应用
- Linux下php安装Redis扩展
- Linux下php安装Redis扩展
- linux 下安装redis以及php Redis扩展
- linux phpredis扩展 安装
- linux下安装phpredis扩展
- Linux下php安装Redis扩展
- linux下安装redis及redis的php扩展
- Linux下php安装Redis扩展
- Linux下编译安装PHPRedis扩展
- Linux下php安装Redis扩展
- linux redis 安装配置, 以及redis php扩展
- 转:linux下安装Redis以及phpredis扩展总结(简单明了)
- linux 安装redis和php-redis扩展
- linux下Redis与phpredis扩展安装
- Linux下php安装Redis扩展
- linux 下安装redis以及php Redis扩展