{"id":1848,"date":"2020-10-19T10:26:41","date_gmt":"2020-10-19T10:26:41","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=1848"},"modified":"2025-09-17T05:00:00","modified_gmt":"2025-09-17T05:00:00","slug":"how-to-install-memcached-in-apache","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/","title":{"rendered":"How to Install memcached in Ubuntu &amp; CentOS"},"content":{"rendered":"\n<p>Memcached is a powerful caching system that improves website speed and performance. It can be used with PHP, Apache, NGINX and other popular platforms. Here are the steps to install memcached in Apache for Ubuntu, CentOS. You can also use them to install memcached in WordPress, Drupal, Magento and other applications and CMS systems.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#What_is_memcached\" >What is memcached<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#How_Memcached_Works\" >How Memcached Works<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#How_to_Install_memcached_in_Ubuntu_CentOS\" >How to Install memcached in Ubuntu &amp; CentOS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#1_Installing_memcached_in_Ubuntu\" >1. Installing memcached in Ubuntu<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#2_Installing_memcached_in_CentOS\" >2. Installing memcached in CentOS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#3_Verify_memcached\" >3. Verify memcached<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#4_Configure_Memcached\" >4. Configure Memcached<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_memcached\"><\/span>What is memcached<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Memcached is a free, open-source memory-based caching system used by websites and apps to cache &amp; retrieve data in key-store format. They are often employed by websites to reduce database queries by caching frequent and recent query results. They can be used to cache all sorts of data such as images, files and also full web pages. Memcached can be deployed as a single standalone instance as well as distributed caching system. It supports both Linux as well as Windows systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_Memcached_Works\"><\/span>How Memcached Works<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Memcached uses a client-server architecture. The server stores an array of key-value combinations that are created by the client and accessed using the keys. These arrays are stored in the server&#8217;s RAM. The clients connect to servers using TCP\/UDP protocol via one of the many client libraries available. It computes the hash value of a key to determine the server to be used, in case it is a distributed system. Then it reads or write the value using its key. <\/p>\n\n\n\n<p>If the RAM space allocated for Memcached on a server becomes full, it will discard the old key-value pairs to store new ones. So Memcached is a temporary cache and not a permanent one unlike Apache\/NGINX caching systems that provide persistent caches. If you want persistent storage, you need to use MemcacheDB or CouchDB that also use Memcached algorithms but deliver a permanent storage for key-value pairs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Install_memcached_in_Ubuntu_CentOS\"><\/span>How to Install memcached in Ubuntu &amp; CentOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>We will look at how to install memcached in Ubuntu as well as CentOS. The following steps will also enable memcached after installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Installing_memcached_in_Ubuntu\"><\/span>1. Installing memcached in Ubuntu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can install memcached on Ubuntu\/Debian systems using APT package manager. Open terminal and run the following command to update packages<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt-get update<\/pre>\n\n\n\n<p>Install memcached and its dependencies<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt-get install php-memcached memcached<\/pre>\n\n\n\n<p>If you also want to install command line tool to manage memcached run the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt-get install libmemcached-tools<\/pre>\n\n\n\n<p>You can check its status with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl status memcached<\/pre>\n\n\n\n<p>Restart Apache web server to apply changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo service restart apache2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Installing_memcached_in_CentOS\"><\/span>2. Installing memcached in CentOS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>You can install memcached on CentOS\/RHEL\/Fedora systems using YUM package manager. Open terminal and run the following commands to install <a href=\"https:\/\/memcached.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">memcached<\/a> and its dependencies.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum clean all \n\u200b# yum -y update \u200b\n# yum -y install memcached php-memcached<\/pre>\n\n\n\n<p>This will install memcached but not enable it to run on startup. Run the following commands to enable it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl start memcached \u200b\nsystemctl enable memcached \u200b\nsystemctl status memcached<\/pre>\n\n\n\n<p>You can check memcached status with the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl status memcached<\/pre>\n\n\n\n<p>Restart Apache web server to apply changes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo systemctl restart httpd.service<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Verify_memcached\"><\/span>3. Verify memcached<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To ensure that memcached is installed and enabled, create a test file <em>\/var\/www\/html\/test.php<\/em> with the following contents.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php \n$mem = new Memcached(); \n$mem-&gt;addServer(\"127.0.0.1\", 11211); \n\n$result = $mem-&gt;get(\"blah\"); \n\nif ($result) { \n    echo $result; \n} else { \n   echo \"No matching key found yet\"; \n   $mem-&gt;set(\"blah\", \"Data from memcached\") \n    or die(\"Couldn't save anything to memcached...\"); \n} \n?&gt;<\/pre>\n\n\n\n<p>Save and close the file. Open browser and go to <em>http:\/\/IP_OF_SERVER\/test.php<\/em><\/p>\n\n\n\n<p>Replace IP_OF_SERVER with your server&#8217;s IP or domain name.<\/p>\n\n\n\n<p>First time, you will see the message &#8220;No matching key found yet&#8221; since your memcached is empty and populated only on your first request. Refresh your page on browser. This time, you will see the message &#8220;Data from memcached&#8221; indicating that the response was sent from memcached instead of web server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Configure_Memcached\"><\/span>4. Configure Memcached<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The configuration file of memcached is located at \/etc\/memcached.conf and the default configuration is more than enough for most users. By default, memcached installation is configured for local client and server systems. Sometimes, you may want to allow remote access to your memcached server. For this purpose, open the memcached configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo vi \/etc\/memcached.conf<\/pre>\n\n\n\n<p>Look for the following line.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-l 127.0.0.1<\/pre>\n\n\n\n<p>Let us say you want to allow remote access from IP address 54.43.32.21. Then replace 127.0.0.1 with this IP address.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-l 54.43.32.21<\/pre>\n\n\n\n<p>Also, update firewall rules to allow access from 54.43.32.21 IP address.<\/p>\n\n\n\n<p>Also, in order to increase the cache size, look for -m option and increase it as per your requirement. -m option specifies the amount of RAM to be used for memcached cache. Its minimum value is 64Mb. Here is an example to increase it to 1Gb.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-m 1024<\/pre>\n\n\n\n<p>Save and close the file. Restart Memcached server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart memcached<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Caching systems are very useful in <a href=\"https:\/\/ubiq.co\/tech-blog\/speed-apache-web-server\/\">speeding up your web server<\/a> and reducing server load. Memcached is a popular, scalable and free caching system used by famous organizations such as YouTube, Facebook, Twitter, etc. It can be setup as a standalone or a distributed caching system in Linux as well as Windows systems. It works well with all major web servers such as Apache and NGINX and plays well with all popular programming languages such as PHP, Python, Perl, etc. Hopefully, the above article will help you install and configure memcached in Apache for Ubuntu as well as CentOS.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-html-from-url-in-apache-wordpress\/\">How to Remove .html from URL in Apache\/Wordpress<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-remove-php-from-url-in-apache-wordpress\/\">How to Remove .php from URL in Apache\/Wordpress<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/install-varnish-ubuntu\/\">How to Install Varnish in Ubuntu<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Memcached is a caching system for Apache and NGINX. Here&#8217;s how to install memcached in Apache in Ubuntu, CentOS<\/p>\n","protected":false},"author":1,"featured_media":1856,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[199],"class_list":["post-1848","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apache","tag-install-memcache"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI<\/title>\n<meta name=\"description\" content=\"Memcached is a caching system for Apache and NGINX. Here&#039;s how to install memcached in Ubuntu, CentOS\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"Memcached is a caching system for Apache and NGINX. Here&#039;s how to install memcached in Ubuntu, CentOS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-19T10:26:41+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-17T05:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Install memcached in Ubuntu &amp; CentOS\",\"datePublished\":\"2020-10-19T10:26:41+00:00\",\"dateModified\":\"2025-09-17T05:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/\"},\"wordCount\":827,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/install-memcache-apache.png?fit=1200%2C630&ssl=1\",\"keywords\":[\"install memcache\"],\"articleSection\":[\"Apache\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/\",\"name\":\"How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/install-memcache-apache.png?fit=1200%2C630&ssl=1\",\"datePublished\":\"2020-10-19T10:26:41+00:00\",\"dateModified\":\"2025-09-17T05:00:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"Memcached is a caching system for Apache and NGINX. Here's how to install memcached in Ubuntu, CentOS\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/install-memcache-apache.png?fit=1200%2C630&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/10\\\/install-memcache-apache.png?fit=1200%2C630&ssl=1\",\"width\":1200,\"height\":630,\"caption\":\"install memcache in apache\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-install-memcached-in-apache\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install memcached in Ubuntu &amp; CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI","description":"Memcached is a caching system for Apache and NGINX. Here's how to install memcached in Ubuntu, CentOS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/","og_locale":"en_US","og_type":"article","og_title":"How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI","og_description":"Memcached is a caching system for Apache and NGINX. Here's how to install memcached in Ubuntu, CentOS","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-10-19T10:26:41+00:00","article_modified_time":"2025-09-17T05:00:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png","type":"image\/png"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Install memcached in Ubuntu &amp; CentOS","datePublished":"2020-10-19T10:26:41+00:00","dateModified":"2025-09-17T05:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/"},"wordCount":827,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png?fit=1200%2C630&ssl=1","keywords":["install memcache"],"articleSection":["Apache"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/","name":"How to Install memcached in Ubuntu &amp; CentOS - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png?fit=1200%2C630&ssl=1","datePublished":"2020-10-19T10:26:41+00:00","dateModified":"2025-09-17T05:00:00+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"Memcached is a caching system for Apache and NGINX. Here's how to install memcached in Ubuntu, CentOS","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png?fit=1200%2C630&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png?fit=1200%2C630&ssl=1","width":1200,"height":630,"caption":"install memcache in apache"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-install-memcached-in-apache\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Install memcached in Ubuntu &amp; CentOS"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/10\/install-memcache-apache.png?fit=1200%2C630&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-tO","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=1848"}],"version-history":[{"count":23,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1848\/revisions"}],"predecessor-version":[{"id":9559,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/1848\/revisions\/9559"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/1856"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=1848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=1848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=1848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}