<?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>Linux Windows System Administrator Help &#187; ASP.NET, IIS, MS SQL</title>
	<atom:link href="http://linuxwindowsmaster.com/category/aspnet-iis-ms-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxwindowsmaster.com</link>
	<description></description>
	<lastBuildDate>Mon, 30 Jan 2012 19:54:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to install memcache on linux server?</title>
		<link>http://linuxwindowsmaster.com/how-to-install-memcache-on-linux-server/</link>
		<comments>http://linuxwindowsmaster.com/how-to-install-memcache-on-linux-server/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 21:02:03 +0000</pubDate>
		<dc:creator>Alex P</dc:creator>
				<category><![CDATA[ASP.NET, IIS, MS SQL]]></category>
		<category><![CDATA[Cpanel Server]]></category>
		<category><![CDATA[Dedicated Server]]></category>
		<category><![CDATA[PHP, MySQL, Apache]]></category>
		<category><![CDATA[Libevent]]></category>
		<category><![CDATA[memcache.so]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://linuxwindowsmaster.com/?p=224</guid>
		<description><![CDATA[memcached is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. memcached is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: memcached is an object cache, while MySQL provides a query cache. [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:Compatibility> <w:BreakWrappedTables /> <w:SnapToGridInCell /> <w:WrapTextWithPunct /> <w:UseAsianBreakRules /> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <!--[if gte mso 10]><br />
<mce:style><!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman";} --></p>
<p><!--[endif]--></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"><strong>memcached</strong> is a high-performance memory object caching system intended to speed up dynamic web applications by alleviating database load. </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"><strong>memcached</strong> is meant to work in concert with something like the MySQL query cache, not replace it. The two implementations excel at vastly different things: <strong>memcached</strong> is an object cache, while MySQL provides a query cache.</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"><strong>memcached</strong> is extremely fast. It uses <strong>libevent</strong>, which provides a mechanism to execute a callback function when a specific event occurs on a file descriptor, to scale to any number of open connections. On a modern Linux system memcached utilizes epoll, is completely non-blocking for network I/O, ensures memory never gets fragmented, and uses its own slab allocator and hash table to achieve 0(1) virtual memory allocation.</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 10pt; font-family: Georgia;">How it install it on Linux server ?</span></strong></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<ul>
<li><span style="font-size: 10pt; font-family: Georgia;">Install dependency software (Libevent)</span></li>
</ul>
<pre><strong><span style="font-size: 10pt; font-family: Georgia;">#curl -O http://monkey.org/~provos/libevent-1.4.9-stable.tar.gz
#tar -xzvf libevent-1.4.9-stable.tar.gz
#cd libevent*
#./configure
#make
#make install</span></strong></pre>
<p><strong></strong></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<ul>
<li><span style="font-size: 10pt; font-family: Georgia;">Now let’s download the newest Memcached source</span></li>
</ul>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<pre><strong>#curl -O http://www.danga.com/memcached/dist/memcached-1.3.0.tar.gz
#tar zxf memcached-1.3.0.tar.gz
#cd memcached-1.3.0
#./configure
#make
#make install</strong></pre>
<ul>
<li><span style="font-size: 10pt; font-family: Georgia;">Then add /usr/local/lib to LD_LIBRARY_PATH in your .bash_profile</span></li>
</ul>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<pre><strong>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH</strong></pre>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 10pt; font-family: Georgia;">How it Works</span></strong></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">First, you start up the memcached daemon on as many spare machines as you have. The daemon has no configuration file, just a few command line options, only 3 or 4 of which you’ll likely use:</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">Run Memcached as a daemon (d = daemon, m = memory, u = user, l = IP to listen to, p = port)</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<pre><strong><span style="font-size: 10pt; font-family: Georgia;">#memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211 –u nobody</span></strong></pre>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">This starts memcached as a <strong>daemon (-d)</strong> on the<strong> IP addres</strong>s and <strong>port</strong> specified with<strong> -l </strong>and <strong>-p</strong>, respectively, running as the <strong>user nobody (-u),</strong> allocating<strong> 1024  for object storage (-m)</strong>. You should adjust the amount of storage to suit your needs; many memcached installs run with 4 GB. Once you are comfortable with your startup options, add the appropriate command to your startup scripts.</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">Create a <strong>/etc/init.d/memcached</strong> file and add above line to start memcached when the server boots</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">With memcached installed and running, it’s time to get PHP talking to the object cache. While multiple PHP API exists, the one in the PECL repository is recommended. If you are running a newer version of PHP, installation is as simple as:</span></p>
<pre><strong><span style="font-size: 10pt; font-family: Georgia;"># pecl install memcache</span></strong></pre>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">Or you can use following steps to install PECL memcache manually.</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<pre><strong>#cd /usr/local/src
#curl -O http://pecl.php.net/get/memcache
#tar zxvf memcache*
#cd memcache-*
#phpize
#./configure
#make &amp;&amp; make install</strong></pre>
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 10pt; font-family: Georgia;"> </span></strong></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;">Now we have to make sure PHP loads the newly built memcache.so library by adding the following line to php.ini:</span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><strong><span style="font-size: 10pt;">extension=memcache.so</span></strong></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p><span style="font-size: 10pt; font-family: Georgia;">Now restart Apache:</span></p>
<pre><strong><span style="font-size: 10pt; font-family: Georgia;">Service httpd restart</span></strong></pre>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"><span> </span>Once it sucussfully install you can create<span> </span>phpinfo() on your webserver should now confirm that memcache is installed.</span></p>
<p class="MsoNormal" style="text-align: center;"><span style="font-size: 10pt; font-family: Georgia;"><a href="http://linuxwindowsmaster.com/how-to-install-memcache/"><img class="aligncenter size-full wp-image-225" title="memcache" src="http://linuxwindowsmaster.com/wp-content/uploads/2009/04/memcache.jpg" alt="memcache How to install memcache on linux server?" width="733" height="393" /></a><br />
</span></p>
<p>Regards<br />
AlexP</p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 10pt; font-family: Georgia;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://linuxwindowsmaster.com/how-to-install-memcache-on-linux-server/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>301 Redirect</title>
		<link>http://linuxwindowsmaster.com/301-redirect/</link>
		<comments>http://linuxwindowsmaster.com/301-redirect/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 21:10:55 +0000</pubDate>
		<dc:creator>AlexP</dc:creator>
				<category><![CDATA[ASP.NET, IIS, MS SQL]]></category>
		<category><![CDATA[301 Moved Permanently]]></category>
		<category><![CDATA[301 redirect]]></category>

		<guid isPermaLink="false">http://linuxwindowsmaster.com/?p=154</guid>
		<description><![CDATA[301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301? is interpreted as “moved permanently”. [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong>301 redirect</strong> is the most efficient and <strong>Search Engine Friendly</strong> method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301? is interpreted as “moved permanently”.</p>
<h2>IIS Redirect</h2>
<ul type="disc">
<li class="MsoNormal">In internet services manager,      right click on the file or folder you wish to redirect</li>
<li class="MsoNormal">Select the radio titled      “a redirection to a URL”.</li>
<li class="MsoNormal">Enter the redirection page</li>
<li class="MsoNormal">Check “The exact url      entered above” and the “A permanent redirection for this      resource”</li>
<li class="MsoNormal">Click on ‘Apply’</li>
</ul>
<h2>ColdFusion Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;.cfheader statuscode=”301? statustext=”Moved permanently”&gt;<br />
&lt;.cfheader name=”Location” value=”http://www.new-url.com”&gt;</p>
<h2>PHP Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;?<br />
Header( “HTTP/1.1 301 Moved Permanently” );<br />
Header( “Location: http://www.new-url.com” );<br />
?&gt;</p>
<h2>ASP Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;%@ Language=VBScript %&gt;<br />
&lt;%<br />
Response.Status=”301 Moved Permanently”;<br />
Response.AddHeader(”Location”,”http://www.new-url.com/”);<br />
%&gt;</p>
<h2>ASP .NET Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;script runat=”server”&gt;<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Response.Status = “301 Moved Permanently”;<br />
Response.AddHeader(”Location”,”http://www.new-url.com”);<br />
}<br />
&lt;/script&gt;</p>
<h2>JSP (Java) Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">&lt;%<br />
response.setStatus(301);<br />
response.setHeader( “Location”, “http://www.new-url.com/” );<br />
response.setHeader( “Connection”, “close” );<br />
%&gt;</p>
<h2>CGI PERL Redirect</h2>
<p class="MsoNormal" style="margin-bottom: 12pt;">$q = new CGI;<br />
print $q-&gt;redirect(”http://www.new-url.com/”);</p>
<h2>Ruby on Rails Redirect</h2>
<p class="MsoNormal">def old_action<br />
headers["Status"] = “301 Moved Permanently”<br />
redirect_to “http://www.new-url.com/”<br />
end</p>
<p class="MsoNormal">
<h2>Redirect Old domain to New domain</h2>
<p class="defaultfont">Create a .htaccess file with the below code, it will ensure that all your directories and pages of your old domain will get correctly redirected to your new domain.<br />
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)</p>
<p class="defaultfont">Options +FollowSymLinks<br />
RewriteEngine on<br />
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]</p>
<p class="defaultfont">Please REPLACE www.newdomain.com in the above code with your actual domain name.</p>
<p class="defaultfont">In addition to the redirect I would suggest that you contact every backlinking site to modify their backlink to point to your new website.</p>
<p class="MsoNormal">
<h2>Redirect to www</h2>
<p class="defaultfont">Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com<br />
The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)</p>
<p class="defaultfont">Options +FollowSymlinks<br />
RewriteEngine on<br />
rewritecond %{http_host} ^domain.com [nc]<br />
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]</p>
<p>Please REPLACE domain.com and www.newdomain.com with your actual domain name.</p>
]]></content:encoded>
			<wfw:commentRss>http://linuxwindowsmaster.com/301-redirect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

