| Howto install memcached, setup firewall and php API? |
|
|
| Written by Administrator | ||||||
| Friday, 25 May 2007 | ||||||
|
1. At first we need libevent library wget http://www.monkey.org/~provos/libevent-1.3b.tar.gz 2. Install Memcached wget http://www.danga.com/memcached/dist/memcached-1.2.1.tar.gz 3. Run memcached ! Replace 10.0.0.40 wit your ip address and 2048 with memory in KB witch you want to alocate with memcached (max. 2048) In our example we have 4GB of free ram, so we runs 2x memcached with 2GB of RAM on port 11211 and 11212 ./memcached -d -m 2048 -l 10.0.0.40 -p 11211 ./memcached -d -m 2048 -l 10.0.0.40 -p 11212 4. Setup firewall ! Replace 10.0.0.0/255.255.255.0 with your net, where you can allow to use the memcached and eth1 with name of your interface iptables -A INPUT -s ! 10.0.0.0/255.255.255.0 -i eth1 -p tcp -m multiport --dports \ 11211,11212 -j DROP 5. Install memcache phpapi !Replace /usr/local/php with path, where you have php wget http://pecl.php.net/get/memcache-2.1.2.tgz Edit php.ini and add - extension="memcache.so" That´s all. Restart apache (apachectl restart) and you will have memcache support in PHP. See also php memcache documentation Add as favourites (118) | Quote this article on your site | Views: 1387
1. 26-01-2008 12:18 wery good site 2. 08-05-2008 09:38 Thanks! ![]() Write Comment
Powered by AkoComment Tweaked Special Edition v.1.4.5 |
||||||
| < Prev | Next > |
|---|





