|
Using Centos 5.4? You are going to need php 5.2 so this is what helped me:
vi /etc/yum.repos.d/centos-test.repo
and then add this:
[c5-testing] name=CentOS-5 Testing baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/ enabled=0 gpgcheck=1 gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
Next, install php like this:
yum --enablerepo=c5-testing install php php-devel php-mysql php-pear
pecl install apc
vim /etc/php.d/apc.ini
Add the following:
[PHP_APC] extension=apc.so
[APC] apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 64 apc.max_file_size = 10M apc.stat=1
And now - installing memcached:
yum install libevent libevent-devel
cd /usr/local/src wget http://www.danga.com/memcached/dist/memcached-<LATEST VERSION>.tar.gz tar xzvf memcached-<LATEST VERSION>.tar.gz cd memcached-<LATEST VERSION> LDFLAGS=\'-Wl,--rpath /usr/local/lib\' ./configure --prefix=/usr/local make make install
I had to install pecl-memcached not using yum because there is a version conflict:
yum install zlib-devel
pear install pecl/memcache
Configure as you have seen things configured in the beginning of this thread, install magento, add this into your local.xml (before the closing </global> directive):
<backend>apc</backend> <!-- optional?????? --> <fast_backend>apc</fast_backend> <slow_backend>apc</slow_backend>
- do your restarts - etc. and you should have a working memcached/magento installation. I saw big improvements in responsiveness - even having mysql with query cache and memcached running on the same server.
In case you need it:
vim /etc/my.cnf
insert:
query-cache-type = 1 query-cache-size = 20M
and restart mysql:
/etc/init.d/mysqld restart
Tom Tsatsos - CEO / Adam Medeiros - Lead Web Developer
#10 LLC
http://www.nr10.com
San Francisco, CA
415-357-1771
|