XMPP JavaScript Library

How to install memcache on linux box

Linux, Sachin Puri, 2012-01-17 16:22:42

To install memcache you should have "libevent".

Follow following steps to install libevent:

Step 1: Download libevent using following command

wget https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz

Step 2: tar -zxvf libevent-2.0.16-stable.tar.gz

Step 3: cd libevent-2.0.16-stable

Step 4: ./configure

Step 5: make

Step 6: make install

Step 7: Create a symbolic link

ln -s /usr/local/lib/libevent-2.0.so.5 /usr/lib/libevent-2.0.so.5

That's it now you are ready to install memcache

 

Now, Follow following steps to install memcache

Step 1: Download memcache using following command

wget http://memcached.org/latest

Step 2: tar -zxvf memcached-1.4.13.tar.gz

Step 3: cd memcached-1.4.13

Step 4: ./configure

Step 5: make

Step 6: make install

Step 7: run following command to start memcache server

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

where: -

-d daemon

-u username

-p port

-m memory

-l ip to listen

now your memcache server should run, don't get excited there is some more work to do. Now you have to install PHP memcache extension so that you can start writing memcache code in your PHP files.

Follow following steps to install memcache PHP extension

Step 1: Download memcache PHP extension

wget http://pecl.php.net/get/memcache-2.2.4.tgz

Step 2: tar -zxvf memcached-2.2.4.tgz

Step 3: cd memcached-2.2.4

Step 4: phpize && ./configure --enable-memcache

Step 5: make

Step 6: copy modules/memcache.so to your PHP extension directory (see php.ini file and search for extension_dir to know your PHP extension directory path)

Step 7: open your php.ini file and add following line

extension=memcache.so


Please feel free to ask any question related to this article.

Add Your Comment
   
    Yes! I want to receive all comments by email

  by aaa on 17-May-2019 12:12 pm
Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. cd duplication
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by yamuqetou on 16-May-2019 03:40 pm
Very good written article. It will be supportive to anyone who utilizes it, including me. Keep doing what you are doing – can’r wait to read more posts. locksmith Salt Lake City
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by Susan Howard on 15-May-2019 12:13 am
Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our. Marble Falls Insurance
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by sss on 12-May-2019 02:28 am
thank you for your interesting infomation. fruit picking crates
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by aaa on 10-May-2019 02:49 pm
thank you for your interesting infomation. specialized bikes
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by aaa on 06-May-2019 12:05 pm
Great write-up, I am a big believer in commenting on blogs to inform the blog writers know that they’ve added something worthwhile to the world wide web!.. porn reviews
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by aa on 01-May-2019 06:11 pm
thank you for your interesting infomation. Buy 50 Euro Bills
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by aa on 30-Apr-2019 03:02 pm
thank you for your interesting infomation. اختبار قدرات تجريبي
  • Reply
  •  0 Like
  •  0 Dislike
  • Report
  by NameFintalk on 23-Oct-2018 02:58 pm
Nice Informative Blog having nice sharing..
  • Reply
  •  1 Like
  •  1 Dislike
  • Report