Thread: Memcached Help
View Single Post
  #4  
Old 27th September 2011, 09:16
x360zone's Avatar
x360zone x360zone is offline
Senior Member
 
Join Date: Jul 2011
United Kingdom
Posts: 915
Default try this
This is a step by step guide to installing memcached from source on CentOS. To install using yum instead, run yum install memcached. The version of CentOS that I am using is CentOS release 5.2 (Final);

to find what version you are using: cat /etc/redhat-release

First, install the dependency libevent:
cd /usr/local/src curl -O http://monkey.org/~provos/libevent-1.4.14b-stable.tar.gz tar xzvf libevent-1.4.14b-stable.tar.gz cd libevent-1.4.14b-stable ./configure --prefix=/usr/local make && make install

Next, install memcached:
cd /usr/local/src curl -O http://memcached.googlecode.com/file...d-1.4.5.tar.gz tar xzvf memcached-1.4.5.tar.gz cd memcached-1.4.5 LDFLAGS='-Wl,--rpath /usr/local/lib' ./configure --prefix=/usr/local make && make install

Verify that memcached starts:
memcached -u root -d If there were no errors, make sure it is running:
ps aux | grep memcached

And finally, to stop memcached: pkill memcached or tutorial 2:

memcached up and running on your CentOS 5 server. First, we start with installing libevent; at least version 1.1 is required. This one’s easy, we can install it using yum.

yum install libevent libevent-devel

Now, onto memcached. Change your working directory to /usr/local/src and download the memcached source:

cd /usr/local/src
wget http://memcached.googlecode.com/file...d-1.4.1.tar.gz

Uncompress the tarball you download and change into the directory that is created:

tar xvzf memcached-1.4.1.tar.gz
cd memcached-1.4.1
Memcached is actively developed, so the version used in this tutorial may be out of date by the time you read this. As of this writing, 1.4.1 is the latest stable version. Check http://danga.com/memcached/download.bml for a newer version before proceeding with the installation.

Up next, configuring our Makefile.

This can be as simple as:
./configure

Additional configure flags are available and can improve performance if your server is capable. For 64-bit OSes, you can enable memcached to utilize a larger memory allocation than is possible with 32-bit OSes:

./configure --enable-64bit
If your server has multiple CPUs or uses mutli-core CPUs, enable threading:
./configure --enable-threads

If you’ve got both a 64-bit OS and multiple CPUs, use both:
./configure --enable-threads --enable-64bit

Once the configure script completes, build and install memcached:
make && make install

Last but not least, start a memcached server:
memcached -d -u nobody -m 512 -p 11211 127.0.0.1

Put another way, the previous command can be laid out like this:
memcached -d -u [user] -m [memory size] -p [port] [listening IP]

Let’s go over what each switch does in the above command:
-dTell memcached to start up as a backgrounded daemon process-uSpecify the user that you want to run memcached-mSet the memory that you want to be allocated my memcached-p

The port on which memcached will listen.
And that’s it. Now go forth and speed up your sites!
__________________

7.5 tsse
future tracker source & hosting, vps
trackers installs + Themes
http://www.foxyhosting.co.uk
http://www.downmy.top testing zone
offshore vps & cpanel hosting & Shoutcast & VPN
STOP cyberbullying
any setups tracker installs vps hosting vps setups themes mods hit me up
over the last three months ive become a snake breeder,pythons,hogs,boa,corn,rat,king,carpet and what joy it is


Reply With Quote