$ tar -zxvf phpredis-4.0.2.tar.gz
 
$ cd phpredis-4.0.2
 
$ /usr/local/php/bin/phpize
 
# php安装后的路径
$ ./configure --with-php-config=/usr/local/php/bin/php-config
 
$ make && make install
 
#将redis.so添加到php.ini中
$ echo 'extension=redis.so' >> /usr/local/php71/lib/php.ini
或者
extension=  /usr/local/php/lib/php/extensions/no-debug-zts-20160303/redis.so
 
测试:
<?php
//连接本地的 Redis 服务
$redis = new Redis();
$redis->connect('127.0.0.1', 6379);
$redis->auth('123456');
echo "Connection to server sucessfully";
//查看服务是否运行
echo "Server is running: " . $redis->ping();
 
问题:
Cannot find autoconf. Please check your autoconf installation and the
$PHP_AUTOCONF environment variable. Then, rerun this script.
 
安装依赖 autoconf
$ yum -y install autoconf

CentOS7 安装PHP7的redis扩展:的更多相关文章

  1. centos7安装PHP7的redis扩展

    前言: 在本篇博客中,我将给大家介绍如何在Centos7上安装PHP-Redis扩展,关于如何在Centos上安装redis的,可以参考另外一篇博客:Centos7安装redis 想要在php中操作r ...

  2. CentOS7 安装PHP7的swoole扩展:

    一.绪 Swoole简介 PHP异步网络通信引擎 最终编译为so文件作为PHP的扩展 准备工作 Linux环境 PHP7 swoole2.1 redis 源码安装PHP7 源码安装swoole htt ...

  3. Centos7 安装php7.3 并扩展 MySQL、postgresql

    首先是安装需要的扩展文件 yum -y install freetype-devel yum -y install libpng-devel yum -y install libjpeg-devel ...

  4. centos7安装redist 以及redis扩展

    wget http://download.redis.io/releases/redis-3.2.1.tar.gz   用wget下载 $ tar xzf redis-3.2.1.tar.gz   解 ...

  5. Centos7 安装PHP7版本及php-fpm,redis ,php-redis,hiredis,swoole 扩展安装

    ============================PHP7.1 ========================================= 1. 更换rpm 源,执行下面两个 rpm - ...

  6. linux下php7安装memcached、redis扩展

    linux下php7安装memcached.redis扩展 1.php7安装Memcached扩展 比如说我现在使用了最新的 Ubuntu 16.04,虽然内置了 PHP 7 源,但 memcache ...

  7. Windows 64位下安装php的redis扩展(php7.2+redis3.0)

    前置条件:为php7.2搭建redis扩展的前提是在本机上已经成功搭建好php的运行环境,我的电脑的运行环境时 apache2.4+mysql5.5+php7.2. 操作系统为64位,编译环境为Mic ...

  8. Centos7安装gearman和php扩展

    Centos7安装gearman和php扩展 标签(空格分隔): php,linux gearman所需要的依赖 yum install \ vim \ git \ gcc \ gcc-c++ \ w ...

  9. centos6下安装php7的memcached扩展

    安装php7的memcached扩展 .编译安装libmemcached- wget https://launchpadlibrarian.net/165454254/libmemcached-1.0 ...

随机推荐

  1. 关于 RabbitMQ 的 Dead-Letters-Queue “死信队列”

      来自一个队列的消息可以被当做‘死信’,即被重新发布到另外一个“exchange”去,这样的情况有: 消息被拒绝 (basic.reject or basic.nack) 且带 requeue=fa ...

  2. LuoguP5221 Product

    题目地址 题目链接 题解 注,下方\((i,j)\)均指\(gcd(i,j)\),以及证明过程有一定的跳步,请确保自己会莫比乌斯反演的基本套路. 介绍本题的\(O(n)\)和\(O(n\sqrt{n} ...

  3. 微信发送红包示例(php)

    微信红包接口 微信红包是微信支付推出的一款基于微信客户端的免费服务应用,微信红包以微信支付 为核心安全保障,为广大用户提供安全,快捷的移劢支付服务. 请求URL 现金红包 https://api.mc ...

  4. Latex: 减少图与文字之间的空白间隙

    参考: Remove space after figure and before text Latex: 减少图与文字之间的空白间隙 论文中图与文字之间的空白间隙过大,导致排版不大美观.解决方法是在\ ...

  5. jenkins 异常

    八月 03, 2017 7:23:54 下午 org.eclipse.jetty.util.log.JavaUtilLog warn 警告: FAILED ServerConnector@29e6eb ...

  6. C#判断数据类型的简单示例代码

    ; Console.WriteLine( "i is an int? {0}",i.GetType()==typeof(int)); Console.WriteLine( &quo ...

  7. node.js基本概念简单解释

    1:什么是回调函数? 2:什么是同步异步 3:什么是I/O 4:什么是单线程/多线程 5:什么是阻塞/非阻塞 6:什么是事件 7:什么是事件驱动 8:什么是事件驱动的回调 9:什么是事件循环 解释: ...

  8. 【UOJ】#273. 【清华集训2016】你的生命已如风中残烛

    题目链接:http://uoj.ac/problem/273 $${Ans=\frac{\prod _{i=1}^{m}i}{w-n+1}}$$ #include<iostream> #i ...

  9. SpringBoot学习路线

    网上也有很多github资源,都是自己学习Spring Boot时候,自己练的代码 虽然现在最新的版本用2.1.3.RELEASE版本,以前版本的demo运行可能会遇到错误.但是有总比没有要好,不是么 ...

  10. Spring boot 整合JSP开发步骤

    1. 新建Springboot项目,war <dependency> <groupId>org.springframework.boot</groupId> < ...