{"id":564,"date":"2011-06-25T15:38:31","date_gmt":"2011-06-25T15:38:31","guid":{"rendered":"http:\/\/blog.nixwind.com\/?p=564"},"modified":"2011-06-25T15:39:52","modified_gmt":"2011-06-25T15:39:52","slug":"memcached-installation","status":"publish","type":"post","link":"https:\/\/blog.nixwind.com\/?p=564","title":{"rendered":"Memcached Installation"},"content":{"rendered":"<p><strong>Memcached<\/strong> is a general-purpose distributed memory caching system. It can be used to speed up dynamic database-driven  websites by caching data and objects in RAM to reduce the number of times database must be read.<\/p>\n<p>Please make sure that Memcached port is opened and access is allowed only to desired servers. If the memcached port is left open to all any one can connect to it and access the data objects.<\/p>\n<p><strong>1) Install libevent<\/strong><\/p>\n<p>libevent is required to install memcached<br \/>\n<code><br \/>\n# yum install libevent-devel libevent<br \/>\n<\/code><br \/>\n<strong>2) Install memcached<\/strong><br \/>\n<code><br \/>\n# cd \/usr\/local\/src<br \/>\n# wget http:\/\/memcached.googlecode.com\/files\/memcached-1.4.5.tar.gz<br \/>\n# tar -zxvf memcached*<br \/>\n# cd memcached*<br \/>\n# .\/configure<br \/>\n# make<br \/>\n# make install<br \/>\n<\/code><\/p>\n<p><strong>3) Run memcached as a daemon and make it listen on default port<\/strong><\/p>\n<p>Create a user,<br \/>\n<code># useradd memcache<\/code><\/p>\n<p>Use the below command to run memcached<br \/>\n<code># memcached -u memcache -p 11211 &amp;<\/code><\/p>\n<p><strong>To use memcahe with PHP on the same server , you can install it with <\/strong><\/p>\n<p><code># pecl install memcache<br \/>\n<\/code><br \/>\nMake sure that below line is added to main php.ini<br \/>\n<code>extension=memcache.so<\/code><br \/>\nTo load the module and reflect the changes restart\u00a0 apache<br \/>\n<code><br \/>\n# \/usr\/local\/apache\/bin\/apachectl restart<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Memcached is a general-purpose distributed memory caching system. It can be used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times database must be read. Please make sure that Memcached port is opened and access is allowed only to desired servers. If the memcached port [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84],"tags":[85,86,65],"_links":{"self":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/564"}],"collection":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=564"}],"version-history":[{"count":4,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions"}],"predecessor-version":[{"id":598,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=\/wp\/v2\/posts\/564\/revisions\/598"}],"wp:attachment":[{"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nixwind.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}