Install Memcached + PHP Memcached Extension under Mac OS X lion
来源:互联网 发布:淘宝买家怎么样刷信誉 编辑:程序博客网 时间:2024/04/29 06:19
Install Memcached + PHP Memcached Extension under Mac OS X Snow Leopard
This step-by-step tutorial was successfully tested under Snow Leopard (OS X 10.6) with MAMP installed, but it should also work under Leopard (OS X 10.5) and without MAMP.
Copy & paste the following code line-by-line into your terminal and enter your user password whenever it is requested:
Install libevent:
cd /tmp; curl -O http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gz
tar zxvf libevent-1.4.12-stable.tar.gz
cd libevent-1.4.12-stable
./configure; make
sudo make install
Install the Memcache application (called daemon because it runs in the background):
cd /tmp; curl -O http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz
tar zxvf memcached-1.4.1.tar.gz
cd memcached-1.4.1
./configure; make
sudo make install
Test if the Memcache Daemon was successfully installed:
memcached -h
You should see the possible command line options for the memcache daemon. But we are not quite ready, yet. Let’s set up the PHP extension so that you can call the daemon from a PHP script:
Building the great, new PHP Memcached extension (http://de.php.net/manual/en/book.memcached.php):
cd /tmp; curl -O http://download.tangent.org/ibmemcached-1.0.10.tar.gz
tar zxvf ibmemcached-1.0.10.tar.gz
cd libmemcached-1.0.10
./configure; make
sudo make install
Installing the PHP Memcached Extension via PECL (we install 1.0.0, because 1.0.2 has an installation bug under Mac OS X):
sudo pecl install memcached-1.0.0
In the case of success you should see something similar like:
Build process completed successfully
Installing '/usr/lib/php/extensions/no-debug-non-zts-20090626/memcached.so'
If you use MAMP then you should copy that newly generated memcached.so file to somewhere like /Applications/MAMP/bin/php5/lib/php/extensions/no-debug-non-zts-20050922/
And finally, add the following line to your php.ini:
extension = memcached.so
Restart your Apache and then create a new PHP script and put a <? phpinfo(); ?> inside.
Start that PHP script in your browser and search for the string “memcached”. If you find it then your memcached extension is correctly installed.
Hints:
To start your memcache daemon type this in your terminal:
memcached -d
To stop your memcache daemon type this in your terminal:
killall memcached
- lecloud posted this
We love Tumblr &Stationery byThijs
请使用 php-5.3.17.tar.gz libevent-2.0.20-stable.tar.gz libmemcached-1.0.10.tar.gz memcached-2.1.0.tgz
hope it will help some one who failed like me! 可以成功。
转自:http://www.lecloud.net/post/3102678831/install-memcached-php-memcached-extension-under-mac
- Install Memcached + PHP Memcached Extension under Mac OS X lion
- mac os lion 编译安装php memcached 扩展
- Mac OS X 下 php 扩展 memcached 编译安装失败
- Installing the PHP "memcached" Extension on OS X 10.9 Mavericks / 10.10 Yosemite / 10.11 El Capitan
- Memcached 的静态编译(Mac OS X)
- mac os x lion 10.7 install xcode 3 (mac os c lion 10.7安装xcode 3)
- `gem install therubyracer` fails on Mac OS X Lion
- MAC OS 10.11 php开启memcached扩展
- Install Nginx and PHP on OS X Mountain Lion (10.8)
- install php memcached libmemcached
- Mac OS X Lion 快捷键
- Mac OS X Lion使用指南
- How to Install PHP intl extension on OS X
- Mac OS X install PHP intl
- Install wget on OS X Lion
- Mac OS 下的 memcached
- centos install memcached php-memcache
- Mac OS X Lion:狮子来了
- Windows CE下开发控制面板应用程序
- WinCE系统字体的设置
- Problem G
- 详解WinCE下USB Host驱动开发(2)
- Deli Deli
- Install Memcached + PHP Memcached Extension under Mac OS X lion
- 让移动硬盘windows2003自动无法识别
- 详解WinCE下USB Host驱动开发(1)
- 华为上机(3)
- C++经典类库(C++开发必看)
- 在WinCE 6.0系统下实现USB功能定制
- Linux下Apache配置cgi
- HDU 2099 整数的尾数
- 串连字符串strcat