MAMP下安装memcache
来源:互联网 发布:使命召唤4mac迅雷下载 编辑:程序博客网 时间:2024/06/10 08:13
原文地址
按照网上的教程,并不能顺利地安装下来,整合了几篇文章,并附上图片
参考:https://www.douban.com/note/337110939/
http://www.cnblogs.com/shengshuai/p/3696466.html
1: Memcached 推荐用 homebrew 安装。http://brew.sh/
2: 安装memcache ,
3: 我PHP用的是 5.6.6,编译 memcache 模块需要用到 php 源码,mamp 不自带,到 php 官网(http://www.php.net/downloads.php)下一个 php-5.6.25.tar.gz版本源码包,解压放到目录: /Applications/MAMP/bin/php/php5.6.6/include/php
4:然后编译:
/Applications/MAMP/bin/php/php5.6.6/include/php/configure
如果出现错误: configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>
通过brew安装:
安装之后,我们再使用./configure安装php,还是报相同错误,也就是:configure: error: Please specify the install prefix of iconv with --with-iconv=<DIR>
这是因为我们虽然安装了libiconv,但是没有指定目录,我们这样:
./configure --with-iconv=/usr/local/Cellar/libiconv/1.14/
这样就可以编译成功了~~
5:
这里可能出现错误:configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
ERROR: `/private/tmp/pear/temp/memcache/configure --enable-memcache-session=yes' failed
这个问题引起是因为zlib在安装时没有正确被引入,解决的办法是使用brew进行zlib的安装安装后执行pecl i memcache 时还会出现同样的问题,需要将zlib的头文件及库文件添加至系统默认的路径
然后再执行
6: 至此安装完成,点 mamp 菜单,file->edit template -> php -> php 5.6.6 php.ini ,增加:
[memcache]
extension=memcache.so
7:打开phpinfo(),
启动memcache:
/usr/local/bin/memcached -p 11211 -m 64 -u root -d
- MAMP下安装memcache
- MAMP PRO(Mac) 下安装memcache
- MAMP安装memcache
- MAMP下安装phpredis扩展
- MAMP下安装Swoole拓展
- MAMP 下安装Swoole拓展
- mamp 下安装redis扩展
- MAMP下安装phpredis扩展
- Mac电脑上MAMP开发环境安装memcache
- mamp下如何安装XDEBUG,webgrind?
- MAMP环境下安装php扩展
- MAMP下安装phpredis扩展(微原创)
- 在MAMP下PHP7安装Redis扩展
- MAC MAMP 增加 memcache 扩展
- linux下安装memcache
- ubuntu下安装memcache
- Windows下安装Memcache
- windows下安装memcache
- 2017.9.26 于神之怒加强版 失败总结
- 使用Log4j将程序日志实时写入Kafka
- 字符串内存
- 程序员业余赚钱致富的10种方法
- hdu 1542 Atlantis (线段树求矩形面积并)
- MAMP下安装memcache
- test1
- <c++>两个特别大的数之间相乘怎么计算?
- 虚函数
- linux服务器免密钥登录配置
- loadrunner Web_类函数之web_static_image()
- 【LeetCode】 3. Longest Substring Without Repeating Characters
- 机器学习实战(二)梯度下降调用scikit-learn库函数(病马问题)
- 2-SAT两题(可行性判断,不含方案求解)