<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>memcache Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/memcache/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 27 Nov 2018 19:25:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install and Configure memcached on Ubuntu</title>
		<link>https://www.osradar.com/install-and-configure-memcached-on-ubuntu/</link>
					<comments>https://www.osradar.com/install-and-configure-memcached-on-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Tue, 27 Nov 2018 19:25:36 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[memcached]]></category>
		<category><![CDATA[memcached on ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7712</guid>

					<description><![CDATA[<p>You probably have heard about “memcached”, right? It’s a high-performance, distributed memory object caching server that can dramatically improve the performance of a database and web applications. Memcached is an open-source software that reduces the load on the database and thus, speeds things up. Today, let’s get memcached ready on our Ubuntu machine. Installing memcached [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-memcached-on-ubuntu/">Install and Configure memcached on Ubuntu</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>You probably have heard about “memcached”, right? It’s a high-performance, distributed memory object caching server that can dramatically improve the performance of a database and web applications. Memcached is an open-source software that reduces the load on the database and thus, speeds things up.</p>
<p>Today, let’s get memcached ready on our Ubuntu machine.</p>
<h1>Installing memcached</h1>
<p>At first, make sure that your system is ready with all the latest updates.</p>
<pre class="">sudo apt update &amp;&amp; sudo apt upgrade -y</pre>
<p><img loading="lazy" class="size-full wp-image-7717 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-1.png" alt="" width="1075" height="466" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-1.png 1075w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-300x130.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-768x333.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-1024x444.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-696x302.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-1068x463.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/mem-1-969x420.png 969w" sizes="(max-width: 1075px) 100vw, 1075px" /></p>
<p>Now, run the following command for installing memcached server –</p>
<pre class="">sudo apt install memcached</pre>
<h1><img loading="lazy" class="size-full wp-image-7718 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-2.png" alt="" width="1078" height="505" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-2.png 1078w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-300x141.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-768x360.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-1024x480.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-696x326.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-1068x500.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/mem-2-897x420.png 897w" sizes="(max-width: 1078px) 100vw, 1078px" /></h1>
<h1>Configuring memcached server</h1>
<p>For configuring the memcached server, you have to edit “memcached.conf” file. Run the following command –</p>
<pre class="">sudo gedit /etc/memcached.conf</pre>
<p><img loading="lazy" class="size-full wp-image-7719 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-3.png" alt="" width="1366" height="735" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-3.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-300x161.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-768x413.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-1024x551.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-696x374.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-1068x575.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/mem-3-781x420.png 781w" sizes="(max-width: 1366px) 100vw, 1366px" /></p>
<p>At first, start up with a memory cap of 512MB –</p>
<pre class="">-m 512</pre>
<p>For connection, the default port of memcached is 11211.</p>
<pre class="">-p 11211</pre>
<p>Now, it’s time to tell which IP address to listen on. By default, the memcached server will listen to all IP addresses. This is the only parameter you can configure for security. Make sure that the server is listening to a firewalled interface.</p>
<pre class="">-l 127.0.0.1,127.0.0.2</pre>
<p>You can also cap the incoming simultaneous connections. The default daemon value is 1024. Let’s increase it to 2048.</p>
<pre class="">-c 2048</pre>
<p><img loading="lazy" class="size-full wp-image-7720 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-4.png" alt="" width="1366" height="735" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-4.png 1366w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-300x161.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-768x413.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-1024x551.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-696x374.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-1068x575.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/mem-4-781x420.png 781w" sizes="(max-width: 1366px) 100vw, 1366px" /></p>
<p>Now, save the file and restart the memcached server.</p>
<p>Need to verify that memcached is running? We need the “libmemcached-tools” for testing purpose.</p>
<pre class="">sudo apt install libmemcached-tools</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-7721" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-5.png" alt="" width="1076" height="634" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-5.png 1076w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-300x177.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-768x453.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-1024x603.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-696x410.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-1068x629.png 1068w, https://www.osradar.com/wp-content/uploads/2018/11/mem-5-713x420.png 713w" sizes="(max-width: 1076px) 100vw, 1076px" /></p>
<p>Check if memcached connectivity is working –</p>
<pre>memcstat --servers=127.0.0.1</pre>
<h1>Restart, stop and reload memcached</h1>
<p>If you’re going to use memcached, you may need to perform the above actions.</p>
<ul>
<li>Start memcached</li>
</ul>
<pre>sudo systemctl start memcached</pre>
<ul>
<li>Stop memcached</li>
</ul>
<pre class="">sudo systemctl stop memcached</pre>
<ul>
<li>Restart memcached</li>
</ul>
<pre class="">sudo sytemctl restart memcached</pre>
<ul>
<li>Memcached status</li>
</ul>
<pre class="">sudo systemctl status memcached</pre>
<p><img loading="lazy" class="size-full wp-image-7722 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/mem-6.png" alt="" width="1073" height="337" srcset="https://www.osradar.com/wp-content/uploads/2018/11/mem-6.png 1073w, https://www.osradar.com/wp-content/uploads/2018/11/mem-6-300x94.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/mem-6-768x241.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/mem-6-1024x322.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/mem-6-696x219.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/mem-6-1068x335.png 1068w" sizes="(max-width: 1073px) 100vw, 1073px" /></p>
<p>For enjoying memcached features in other languages, you need to get additional packages –</p>
<ul>
<li>ruby-dalli (Ruby client)</li>
<li>php-memcached (PHP module)</li>
<li>python3-pymemcache (Python 3.x implementation)</li>
<li>python-memcache (Python client)</li>
<li>libcache-memcached-libmemcached-perl – (Perl for Memcached::libmemcached)</li>
</ul>
<p>Enjoy!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-memcached-on-ubuntu/">Install and Configure memcached on Ubuntu</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-and-configure-memcached-on-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
