🔔 🔔 🔔 Duyuru: 24. Yılımıza özel indirimler sizleri bekliyor ! Kampanya Kodu : TDATA2024 | Detaylı bilgi için tıklayınız.

How to install Memcached


How to install Memcached


Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

memcached : High Performance, Distributed Memory Object Cache server package.
perl-Cache-Memcached : Perl client (library) to work with memcached server.
python-memcached : Perl client (library) to work with memcached server.
php-pecl-memcache : PHP extension to work with the Memcached server.

Steps to install LibEvent

First we need to check if libevent is installed or not?
whereis libevent

Try to install it through yum
yum install libevent

If you don’t find it, then we need to download and install it.  Type following sequence of commands on your shell

wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar xfz libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure
make
make install

Steps to install Memcached

Try to with Yum

yum install memcached

or

Download and install from source.

wget http://memcached.googlecode.com/files/memcached-1.4.15.tar.gz
tar xfz memcached-1.4.15.tar.gz
cd memcached-1.4.15
./configure
make
make install

Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)

memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211

Install PHP Memcache

Try to install it through easyapache. Otherwise, use the following steps.

wget  http://pecl.php.net/get/memcache-3.0.8.tgz
tar zxvf memcache-3.0.8.tgz
cd memcache-3.0.8
phpize
./configure
make
make install

vi /usr/local/lib/php.ini

Find the extension as below and if it is not existed, add it in the php.ini.

extension=memcache.so

Restart the Apache services.

service httpd restart

Tomonitor the memcached status

watch “echo stats | nc 127.0.0.1 11211″

$ echo “stats” | nc 127.0.0.1 11211

watch ‘php -r ‘”‘”‘$m=new Memcache;$m->connect(“127.0.0.1″, 11211);print_r($m->getstats());’”‘”

Bu cevap yeterince yardımcı oldu mu?

Diğer Dökümanlar


  • What is cPanel and how to access it?

    CPanel is a fully featured web-based control panel that allows you to manage your domain through a web interface. cPanel gives you complete control over a vast amount of functions, streamlining...

  • CloudFlare Plugin install on cpanel

    CloudFlare is a performance and security service. With 14 points of presence around the world, a website on CloudFlare typically loads twice as fast, uses 65% less server resources, saves 60% of...

  • Enable Cronjob in cpanel and examples

    What is cron? It is the scheduling daemon of the Linux operating system Cron jobs allow you to automate repetitive tasks on the server that hosts your web site. This is a powerful tool that allows...

  • What is Anonymous FTP and how to enable it

    Anonymous FTP allows you and others that you give permission to, to access your “public_ftp” folder. There are two options available: 1. ftp://ftp.yourdomain.com –This allows...

  • Unable to connect cpanel using IP/whm and IP/cpanel

    If cpanel cannot be accessed using IP/whm and IP/cpanel, but can be accessed using IP:2086 and IP:2082, then here goes the solution for the same. The reason for this issue due to missing some...