ABHIONLINUX
Site useful for linux administration and web hosting

2011/05/25

How to install memcache in the server

You can use the steps below to install memcache



cd /usr/local/src/
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
tar -xvf libevent-1.4.13-stable.tar.gz
cd libevent-1.4.13-stable
./configure 
make
make install


cd ..
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz


tar -xvf memcached-1.4.5.tar.gz
cd memcached-1.4.5
./configure && make
make install


 vi /etc/ld.so.conf.d/libevent-i386.conf  
create this file and add one line ->  # /usr/local/lib/


/sbin/ldconfig


start your memcached server up


/usr/local/bin/memcached -u nobody &


you should add this last command to /etc/rc.local so the memcached server starts if there is a reboot

2011/05/17

How to clear cache memory(RAM) in linux


Clear cache memory.

You can use the command given below to clear the pagecache
echo 1 > /proc/sys/vm/drop_caches

To  free dentries and inodes, you can use the command
echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches