Compile Memcached on Mac OS X First of all lets make it clear, memcahced on mac? why bother?! Well i have to work on mac at work so i dont really have a choice. I assume if you are interested in that hint you are in same situation. Personally i think its just pain that i dont work on debian but any way.
If you need memcached running locally on mac download sources of libevent from lib event site. Then follow typical procedure of compilation and installation:
./configure --prefix=/usr/local make make install
The reason you have to install libevent is that memcache is using new socket functions like epoll. This allows memcached to handle hundreds (and with kernel modificated settings) thousands of sockets. Regular select syscall is much more CPU intensive if you decide to listen to many open sockets at the same time. Memcache does not use threads for client connections so all sockets are handled by the same code.
Once libevent is installed you can downlaod and install memcached. Get sourced from memcached website. Then follow as usually:
./configure --with-libevent=/usr/local/ make
To run memcached as root with full actions preview execute:
./memcached -u root -vv
That preview gives you very good debugging peek view into memecached activity.
But seriously, format your drive and install linux ;- )
Comments
I am just not a fan of mac.
I am just not a fan of mac. Debian/Ubuntu are hands down best for PHP development and deployment. Stuff just works. Currently running ubuntu 2011.10 on my HP laptop at home and i am quite happy :)
As good as mamp and xampp are they are not a real production-like development environment. Unfortunately i still need to support php 5.2 so ports are not an option either. Over last 3 years had a lot of issues mainly with extensions, pecl, pear etc. But there is a hope i wont have to support 5.2 any more :) will see how it goes.
Art
Thanks for the info. What is
Thanks for the info.
What is with the anti OS X? You would honestly rather use Linux as a desktop box?
Post new comment