{"id":1102,"date":"2009-12-14T01:10:07","date_gmt":"2009-12-14T06:10:07","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=1102"},"modified":"2009-12-14T01:10:07","modified_gmt":"2009-12-14T06:10:07","slug":"install-memcached-on-redhat-centos","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/","title":{"rendered":"Install Memcached on Redhat \/ CentOS"},"content":{"rendered":"<p>Memcached is very fast caching system for MySQL. It uses libevent or epoll (Linux runtime) to scale to any number of open connections and uses non-blocking network I\/O.<\/p>\n<p>Required Packages<\/p>\n<p>   1. memcached : High Performance, Distributed Memory Object Cache.<br \/>\n   2. memcached-selinux : SELinux policy module supporting memcached.<br \/>\n   3. perl-Cache-Memcached : Perl client for memcached.<br \/>\n   4. php-pecl-memcache : Php client \/ extension to work with the Memcached caching daemon.<br \/>\n   5. python-memcached : A Python memcached client library.<\/p>\n<p>Step # 1: Turn on EPEL Repo<\/p>\n<p>Type the following command to enable EPEL repo which carries required memcache packages.<br \/>\n<code><br \/>\nrpm -Uvh http:\/\/download.fedora.redhat.com\/pub\/epel\/5\/i386\/epel-release-5-3.noarch.rpm <\/code><br \/>\nSee this <u><a href=\"http:\/\/g33kinfo.com\/info\/?p=1103\">FAQ<\/a><\/u> for further details.<br \/>\nStep # 2: Install memcached<\/p>\n<p>Type the following command to install memcached with php extension:<br \/>\n<code>yum install memcached php-pecl-memcache memcached-selinux<\/code><br \/>\nSample outputs:<br \/>\n<code><br \/>\nLoaded plugins: downloadonly, rhnplugin, security, verify<br \/>\nSetting up Install Process<br \/>\nResolving Dependencies<br \/>\n--> Running transaction check<br \/>\n---> Package memcached.x86_64 0:1.2.8-1.el5 set to be updated<br \/>\n--> Finished Dependency Resolution<\/p>\n<p>Dependencies Resolved<\/p>\n<p>==============================================================================================================================================================<br \/>\n Package                                Arch                                Version                                   Repository                         Size<br \/>\n==============================================================================================================================================================<br \/>\nInstalling:<br \/>\n memcached                              x86_64                              1.2.8-1.el5                               epel                               60 k<\/p>\n<p>Transaction Summary<br \/>\n==============================================================================================================================================================<br \/>\nInstall      1 Package(s)<br \/>\nUpdate       0 Package(s)<br \/>\nRemove       0 Package(s)         <\/p>\n<p>Total download size: 60 k<br \/>\nIs this ok [y\/N]: y<br \/>\nDownloading Packages:<br \/>\nmemcached-1.2.8-1.el5.x86_64.rpm                                                                                                       |  60 kB     00:00<br \/>\nRunning rpm_check_debug<br \/>\nRunning Transaction Test<br \/>\nFinished Transaction Test<br \/>\nTransaction Test Succeeded<br \/>\nRunning Transaction<br \/>\n  Installing     : memcached                                                                                                                              1\/1 <\/p>\n<p>Installed:<br \/>\n  memcached.x86_64 0:1.2.8-1.el5                                                                                                                              <\/p>\n<p>Complete!<br \/>\n<\/code><br \/>\nStep # 3: Configure memcached<\/p>\n<p>Edit using vim or nano \/etc\/sysconfig\/memcached, and enter:<br \/>\n<code> vi \/etc\/sysconfig\/memcached<\/code><br \/>\nUpdate it as follows:<br \/>\n<code><br \/>\nPORT=\"11211\"<br \/>\nUSER=\"memcached\"<br \/>\n# max connection 2048<br \/>\nMAXCONN=\"2048\"<br \/>\n# set ram size to 2048 - 2GiB<br \/>\nCACHESIZE=\"4096\"<br \/>\n# listen to loopback ip 127.0.0.1, for network connection use real ip e.g., 10.0.0.4<br \/>\nOPTIONS=\"-l 127.0.0.1\"<br \/>\n<\/code><\/p>\n<p>The above options will starts memcached up as a daemon, using 4GB of memory, and listening on IP 127.0.0.1, port 11211. Save and close the file.<\/p>\n<p>Step # 4: Run memcached<\/p>\n<p>Type the following command to start memcached, enter:<br \/>\n<code> chkconfig memcached on<\/code><br \/>\n<code> service memcached start<\/code><br \/>\nTo stop \/ restart use the following commands:<br \/>\n<code> service memcached stop<\/code><br \/>\n<code> service memcached restart<\/code><\/p>\n<p>How Do I See Memory Memcached Slabs?<\/p>\n<p>Type the following command:<br \/>\n<code> memcached-tool IP_ADDRESS:Port<\/code><br \/>\n<code> memcached-tool IP_ADDRESS:Port display<\/code><br \/>\n<code> memcached-tool 127.0.0.1:11211<\/code><br \/>\nSample outputs:<\/p>\n<p><code>Item_Size   Max_age  1MB_pages Count   Full?<br \/>\n  1     104 B     5134 s       1      10      no<br \/>\n  2     136 B     5135 s       1      40      no<br \/>\n  3     176 B        0 s       1       0      no<br \/>\n  4     224 B     2648 s       1       7      no<br \/>\n  8     552 B     1810 s       1      12      no<br \/>\n  9     696 B     1810 s       1       6      no<br \/>\n 10     872 B     2935 s       1       8      no<br \/>\n 11     1.1 kB    4262 s       1      18      no<br \/>\n 12     1.3 kB    2990 s       1      23      no<br \/>\n 13     1.7 kB    2434 s       1      22      no<br \/>\n 14     2.1 kB    3489 s       1      11      no<br \/>\n 15     2.6 kB    2964 s       1      16      no<br \/>\n 16     3.3 kB    2861 s       1      14      no<br \/>\n 17     4.1 kB    2076 s       1       5      no<br \/>\n 18     5.2 kB    2981 s       1       5      no<br \/>\n 20     8.1 kB      64 s       1       1      no<br \/>\n 21    10.1 kB    1865 s       1       3      no<br \/>\n 29    60.2 kB    1550 s       1       2      no<br \/>\n<\/code><br \/>\nHow Do I See Memory Memcached Stats?<\/p>\n<p>Type the following command:<br \/>\n<code> memcached-tool IP_Address:Port stats<\/code><br \/>\n<code> memcached-tool 127.0.0.1:11211 stats<\/code><br \/>\nSample outputs:<br \/>\n<code><br \/>\n127.0.0.1:11211   Field       Value<br \/>\n         accepting_conns           1<br \/>\n                   bytes      399395<br \/>\n              bytes_read      504797<br \/>\n           bytes_written    17313658<br \/>\n               cmd_flush           0<br \/>\n                 cmd_get        1141<br \/>\n                 cmd_set         248<br \/>\n   connection_structures           9<br \/>\n        curr_connections           5<br \/>\n              curr_items         205<br \/>\n               evictions           0<br \/>\n                get_hits         898<br \/>\n              get_misses         243<br \/>\n          limit_maxbytes  1073741824<br \/>\n     listen_disabled_num           0<br \/>\n                     pid       40159<br \/>\n            pointer_size          64<br \/>\n           rusage_system    0.227965<br \/>\n             rusage_user    0.034994<br \/>\n                 threads           5<br \/>\n                    time  1255803547<br \/>\n       total_connections         344<br \/>\n             total_items         259<br \/>\n                  uptime        5829<br \/>\n                 version       1.2.8<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Memcached is very fast caching system for MySQL. It uses libevent or epoll (Linux runtime) to scale to any number of open connections and uses non-blocking network I\/O. Required Packages 1. memcached : High Performance, Distributed Memory Object Cache. 2. memcached-selinux : SELinux policy module supporting memcached. 3. perl-Cache-Memcached : Perl client for memcached. 4&#8230;. <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1102","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Install Memcached on Redhat \/ CentOS - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Memcached on Redhat \/ CentOS - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"Memcached is very fast caching system for MySQL. It uses libevent or epoll (Linux runtime) to scale to any number of open connections and uses non-blocking network I\/O. Required Packages 1. memcached : High Performance, Distributed Memory Object Cache. 2. memcached-selinux : SELinux policy module supporting memcached. 3. perl-Cache-Memcached : Perl client for memcached. 4.... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-12-14T06:10:07+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Install Memcached on Redhat \\\/ CentOS\",\"datePublished\":\"2009-12-14T06:10:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/\"},\"wordCount\":195,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/\",\"name\":\"Install Memcached on Redhat \\\/ CentOS - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-12-14T06:10:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/install-memcached-on-redhat-centos\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install Memcached on Redhat \\\/ CentOS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install Memcached on Redhat \/ CentOS - Linux Shtuff","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:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/","og_locale":"en_US","og_type":"article","og_title":"Install Memcached on Redhat \/ CentOS - Linux Shtuff","og_description":"Memcached is very fast caching system for MySQL. It uses libevent or epoll (Linux runtime) to scale to any number of open connections and uses non-blocking network I\/O. Required Packages 1. memcached : High Performance, Distributed Memory Object Cache. 2. memcached-selinux : SELinux policy module supporting memcached. 3. perl-Cache-Memcached : Perl client for memcached. 4.... Read More","og_url":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-12-14T06:10:07+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Install Memcached on Redhat \/ CentOS","datePublished":"2009-12-14T06:10:07+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/"},"wordCount":195,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/","url":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/","name":"Install Memcached on Redhat \/ CentOS - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-12-14T06:10:07+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/install-memcached-on-redhat-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Install Memcached on Redhat \/ CentOS"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=1102"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1102\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=1102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=1102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=1102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}