zoukankan      html  css  js  c++  java
  • MAC 下 安装redis 并配置 php redis 扩展

    下载 redis 

    redis-3.1.2.tgz

    sudo tar -xzf redis-3.1.2.tgz

    cd redis-3.1.2

    sudo phpize

    grep: /usr/include/php/main/php.h: No such file or directory
    grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
    grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
    Configuring for:
    PHP Api Version:        
    Zend Module Api No:     
    Zend Extension Api No: 

    find / -name php-config

    /usr/bin/php-config

    sudo ./configure --with-php-config=/usr/bin/php-config

     

    sudo make

    In file included from /Users/anbaojia/redis-3.1.2/redis.c:27:
    ./common.h:1:10: fatal error: 'php.h' file not found
    #include "php.h"
             ^~~~~~~
    1 error generated.
    make: *** [redis.lo] Error 1

    解决方法  我的mac 版本是10.14

    sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include /usr/include

     

    sudo make install

     

    如果报错 

    Permission denied

     

    重启电脑   command+r 进入安全模式   csrutil disable

     

    再重启

    sudo make install  

     

    php -m|grep redis

    redis

    开启 

    redis-server

     

     

     

    php.ihi 

    extension=redis.so

    重启apache

     

     

     

     

     

     

     

     

     

  • 相关阅读:
    合理配置SQL Server的最大内存
    理解内存----优化SQL Server内存配置
    Systems Performance: Enterprise and the Cloud 读书笔记系列
    google perftools分析程序性能
    源代码分析-构建调用图
    Intel VTune性能分析器基础
    代微机原理与接口技术(第3版)课程配套实验包和电子课件
    【MySQL性能优化】MySQL常见SQL错误用法
    Linux 内核分析 -- Linux内核学习总结
    《Linux就该这么学》 软件库
  • 原文地址:https://www.cnblogs.com/arvin-an/p/10796687.html
Copyright © 2011-2022 走看看