Welcome to UltratechHost Forum, Guest. Please take the time to register if you haven't, or click

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[-]
Tags
install memcached and libmemcached

How To Install memcached And libmemcached
#1
Step 1 – Install memcached from source.
Download the latest source from : http://memcached.org/

Debian/Ubuntu:

Code:
apt-get install libevent-dev

Redhat/Centos:

Code:
yum install libevent-devel 


Lets download and install it:

Code:
wget http://memcached.org/latest
tar -zxvf memcached-1.x.x.tar.gz
cd memcached-1.x.x
./configure -–with-libevent && make && make test && make install

Please ensure libevent & libevent-devel packages have been installed before executing the command above.

Step 2 – Install libmemcached from source.
Download the latest source from
Code:
http://libmemcached.org/libMemcached.html


Code:
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar xvf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure
make && make install

Step 3 – Start the memcached as daemon process and ensure memcached is automatically started after each server reboot.

Code:
memcached -d -u nobody -m 1048 -p 11211 127.0.0.1

Code:
vim /etc/rc.d/rc.local
// add this line
memcached -d -u nobody -m 1048 -p 11211 127.0.0.1

Step 4 – Install the Memcache PECL Extension for PHP.

Code:
pecl install memcache

Add the following codes into php.ini

Code:
vim /usr/local/lib/php.ini
// add this line
extension=memcache.so

Restart the httpd service.

Code:
/etc/init.d/httpd restart

Step 5 – Verify the memcached

Code:
strace -p `pidof memcached`
(This post was last modified: 05-14-2015, 11:58 AM by UltratechHost.)


Dinesh Kumar Mohanty
Ultra Web Solutions®
Bhubaneswar, Odisha, India.

UltratechHost - Your One Stop Offshore & Onshore Hosting Provider
Server Locations : Netherlands, Germany, Russia, Singapore & USA
Service Offers: Shared hosting | Reseller hosting | Cloud server | Dedicated server | VPS Hosting



Forum Jump:


Users browsing this thread: 1 Guest(s)