How to Install Memcached on Linux Server?

Memcached is a caching mechainsm for PHP which helps server to speed up serving data from data stores in RAM. Memcache runs as a server utilite which compiles data once and serve it, Memcached is very furuit full to reduce the resource utilization of the server.

Download PECL Memcache Demon:

[sourcecode language="plain"]</span>
<span style="color: #000000;">pecl install memcache</span>
<span style="color: #000000;">cd /usr/local/src/</span>
<span style="color: #000000;">pecl download memcache</span>
<span style="color: #000000;">[/sourcecode]

Unpack the tar and newly created directory:

[sourcecode language="plain"]</span>
<span style="color: #000000;">tar -xvzf memcache-X.X.X.tgz</span>
<span style="color: #000000;">cd memcache-X.X.X</span>
<span style="color: #000000;">[/sourcecode]

Configure and Install:

[sourcecode language="plain"]</span>
<span style="color: #000000;">/usr/local/bin/phpize</span>
<span style="color: #000000;">./configure –with-php-config=/usr/local/bin/php-config</span>
<span style="color: #000000;">[/sourcecode]

Verify Memcached Install :

[sourcecode language="plain"]</span>
<span style="color: #000000;">php -m</span>
<span style="color: #000000;">memcache</span>
<span style="color: #000000;">[/sourcecode]

Don’t forget to Secure Memcached listing port.

[sourcecode language="plain"]</span>
<span style="color: #000000;">vi /etc/sysconfig/memcached</span>
<span style="color: #000000;">file, changing the line</span>
<span style="color: #000000;">OPTIONS=""</span>
<span style="color: #000000;">to</span>
<span style="color: #000000;">OPTIONS="-l"</span>
<span style="color: #000000;">[/sourcecode]

This will ensure that Memcached only respond to local host.

6 thoughts on “How to Install Memcached on Linux Server?”

  1. Thanks so much for providing individuals with a very terrific chance to discover important secrets from this site. It is often very lovely and packed with a lot of fun for me personally and my office colleagues to search your site at the least thrice every week to learn the latest guides you have got. And lastly, we’re actually happy with your spectacular principles you give. Selected 4 ideas on this page are in fact the simplest we have all ever had.

  2. I am commenting to let you know what a cool encounter my cousin’s girl encountered viewing your blog. She came to understand numerous issues, including what it’s like to possess an ideal helping mood to get men and women smoothly learn specific tricky topics. You undoubtedly did more than visitors’ expected results. Thanks for presenting these effective, dependable, revealing and even cool guidance on that topic to Kate.

  3. Thank you a lot for giving everyone such a wonderful opportunity to read from this web site. It is always so awesome and as well , stuffed with a good time for me and my office colleagues to visit your site on the least three times weekly to see the newest secrets you have. And indeed, we’re always fulfilled with all the mind-boggling suggestions served by you. Some 2 areas in this posting are completely the simplest we have ever had.

  4. I must express some appreciation to you for bailing me out of this type of setting. Right after browsing throughout the the net and finding ideas that were not beneficial, I believed my entire life was over. Being alive without the presence of solutions to the problems you have fixed as a result of your entire posting is a serious case, and the kind that could have negatively affected my career if I hadn’t encountered your blog post. Your primary competence and kindness in handling every part was very useful. I’m not sure what I would’ve done if I hadn’t encountered such a subject like this. It’s possible to at this point look ahead to my future. Thanks so much for the reliable and effective help. I won’t think twice to propose your web page to anybody who will need assistance about this issue.

  5. I want to express some thanks to the writer for rescuing me from this particular incident. Because of looking out throughout the search engines and meeting tips that were not productive, I believed my entire life was well over. Being alive devoid of the strategies to the difficulties you’ve solved by way of this short article is a critical case, as well as ones which could have in a negative way affected my career if I had not encountered the website. Your primary natural talent and kindness in handling every part was precious. I don’t know what I would have done if I hadn’t come across such a subject like this. I can at this moment look forward to my future. Thank you very much for this impressive and effective help. I won’t think twice to refer the sites to any person who requires care on this situation.

  6. A lot of thanks for your entire effort on this site. My mother loves getting into research and it’s simple to grasp why. A number of us know all relating to the dynamic form you make efficient information via the web blog and even encourage response from the others about this issue plus our favorite girl has been becoming educated a lot of things. Take pleasure in the rest of the year. You have been doing a fantastic job.

Leave a Reply

Your email address will not be published.