MediaTemple DV – Centos 6.4 – install memcached and PECL memcache

# yum install memcached

^^ this should work just fine. edit the /etc/sysconfig/memcached to only allow localhost connections:

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1"

And make sure memcached starts at boot

chkconfig --add memcached

An attemp to install the PHP memcache PECL module using YUM failed though:

[root@dtbaker ~]# yum install php-pecl-memcache
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * epel: mirror.symnds.com
 * extras: mirror.es.its.nyu.edu
 * updates: mirror.linux.duke.edu
472 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-memcache.x86_64 0:3.0.7-5.el6.remi will be installed
--> Processing Dependency: php(zend-abi) = 20100525-x86-64 for package: php-pecl-memcache-3.0.7-5.el6.remi.x86_64
--> Processing Dependency: php(api) = 20100412-x86-64 for package: php-pecl-memcache-3.0.7-5.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-pecl-memcache-3.0.7-5.el6.remi.x86_64 (mt_dv_extras)
 Requires: php(zend-abi) = 20100525-x86-64
 Installed: php-common-5.4.13-1.el6.remi.x86_64 (installed)
 php(zend-abi) = 20100525-x86-64
 Available: php-common-5.4.10-1.el6.remi.x86_64 (mt_dv_extras)
 php(zend-abi) = 20100525-x86-64
 Available: php-common-5.4.11-1.el6.remi.x86_64 (mt_dv_extras)
 php(zend-abi) = 20100525-x86-64
 Available: php-common-5.4.12-1.el6.remi.x86_64 (mt_dv_extras)
 php(zend-abi) = 20100525-x86-64
Error: Package: php-pecl-memcache-3.0.7-5.el6.remi.x86_64 (mt_dv_extras)
 Requires: php(api) = 20100412-x86-64
 Installed: php-common-5.4.13-1.el6.remi.x86_64 (installed)
 php(api) = 20100412-x86-64
 Available: php-common-5.4.10-1.el6.remi.x86_64 (mt_dv_extras)
 php(api) = 20100412-x86-64
 Available: php-common-5.4.11-1.el6.remi.x86_64 (mt_dv_extras)
 php(api) = 20100412-x86-64
 Available: php-common-5.4.12-1.el6.remi.x86_64 (mt_dv_extras)
 php(api) = 20100412-x86-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

So you have to install it like this:

# wget http://pecl.php.net/get/memcache
# tar -xvf memcache
# cd memcache-3.0.8/
# phpize && ./configure –enable-memcache && make
# cp modules/memcache.so /usr/lib64/php/modules/
# echo “extension=memcache.so” > /etc/php.d/memcache.ini
# service httpd restart

 

Leave a Reply

Your email address will not be published. Required fields are marked *