php memcache and memcached on CentOS 5 and up

Запись создана марта 1, 2010

The first thing we should do is install rpmforge repo if still not, you can use this HOWTO.

the next step is installing memcached and libmemcache

yum install libmemcache memcached -y

starting memcached:

memcached -d -m 256 -l 127.0.0.1 -p 11211 -u nobody

you can add a line above to /etc/rc.local to start memcached daemon at system startup

now we will install memcache php extension

wget http://pecl.php.net/get/memcache-2.1.2.tgz
tar -xvf memcache-2.1.2.tgz && cd memcache-2.1.2
phpize && ./configure --enable-memcache && make && make install
echo "extension=memcache.so" >> `php -i | grep "Loaded Configuration File" | awk '{print $5}'`

and restart apache: /etc/init.d/httpd restart

and now the task is done. enjoy it!

PS: sorry for terrible english.


В закладки на Google.comВ Google Закладки
Memori.ruСохранить на Memori.ru

Random Posts

» Запись из раздела CentOS Linux, PHP | 2 комментариев

Комментарии

2 ответов to “php memcache and memcached on CentOS 5 and up”

  1. Валера on июля 8, 2010 13:29

    А почему не: service httpd restart
    еще полезная утилита, написал стартап скрипт и:
    chkconfig –level 345 xxx on

  2. Артур Шакиров on июля 8, 2010 14:24

    ну, кто как привык.

    для debian семейства идеологически правильно через service, для центос не критично.

Головоломки для детей 5 лет. Занимательные головоломки для детей. Головоломки ребусы для детей.


Ответить




*

Anti-Spam Image