Saw a blog post today. I had great success in my GAE projects using memcache and local cache, and I decided to follow the instruction to add memcache to my blog.
The plugin mentioned above is http://wordpress.org/extend/plugins/memcached/. Install was easy. But I got error "Fatal error: Cannot redeclare class wp\_object\_cache" when I was trying to activate the plugin. Oops, I forgot to define the memcached server.
I was googling for a simple memcache server, but after reading this, I decide to install extension apc rather memcache. Because this blog is small, and memcache server will be running on the same server as the http server. Extension apc is enough!
I updated the php apc extension by
pecl install apc
service php5-fpm restart
Verify it with <?php phpinfo( );?>
Then, edit /etc/php5/fpm/conf.d/apc.ini to enable it
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=32M
By the way, I installed php5-fpm with the following command. I don't really need to pecl install apc. I followed this post to install ZendGuardLoader and eaccelerator.
add-apt-repository ppa:brianmercer/php && apt-get update
apt-get -q -y install php5-cli php5-common php5-mysql php5-suhosin php5-gd
apt-get -q -y install php5-fpm php5-cgi php-pear php5-memcache php-apc
- 作者:cail
- 版权声明:署名-非商业性使用-禁止演绎 CC BY-NC-ND 3.0
- 原文网址:http://en.dogeno.us/?p=7902
- 最后修改时间:2012年8月1日 05:52 PDT
Previous:
redmine 1.3.x on Ubuntu Lucid with nginx
Next:
忽然想吃 重庆辣子鸡 了
blog by cail
- » the Paper Link - my latest Creation for PubMed users
- » How to use ImageJ to analyze images?
- » 2shRNA - design oligos for RNAi
- » Play background music
- » about this blog
- » about me
Hot in 'How-To'
- analog - analog/digital - digital, VGA - DVI - HDMI - 74,618 views
- Ez-12 windsurfer antenna - 54,007 views
- Import custom ringtones to iPhone via iTunes (no jailbreaking required) - 47,084 views
- How to add new ringtones to iPhone - 42,499 views
- Use GParted to align partitions on a SSD hard drive for better performance - 40,990 views

Leave a Reply