<?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>SupportSages &#187; Linux</title>
	<atom:link href="http://www.supportsages.com/blog/category/linux-operating-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supportsages.com/blog</link>
	<description>Technical Support and Server Management : Musings in the fox hole.</description>
	<lastBuildDate>Thu, 05 Jan 2012 03:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Chapter 12 All about a process running in linux</title>
		<link>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/</link>
		<comments>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 06:00:40 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1954</guid>
		<description><![CDATA[<!-- p { margin-bottom: 0.08in; }h3 { margin-bottom: 0.08in; }pre.cjk { font-family: "DejaVu LGC Sans Mono",monospace; } -->
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Program 	Vs Process</strong></span></span>&#160;
	<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	program is an executable file, while a process is a program in 	execution. A<span style="color: #000000;"> program is a set of instructions written down to do something, while </span><span style="color: #000000;">a 	process is the result of executing a program.</span></span></span></li>
</ul>
<ul>
	<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Process 	Vs Thread</strong></span></span></span></li>
</ul>
<a href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_.png"><img class="aligncenter size-medium wp-image-1955" title="pic.jepg" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_-291x300.png" alt="" width="291" height="300" /></a>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="color: ...]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; }h3 { margin-bottom: 0.08in; }pre.cjk { font-family: "DejaVu LGC Sans Mono",monospace; } --></p>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Program 	Vs Process</strong></span></span>&nbsp;</p>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	program is an executable file, while a process is a program in 	execution. A<span style="color: #000000;"> program is a set of instructions written down to do something, while </span><span style="color: #000000;">a 	process is the result of executing a program.</span></span></span></li>
</ul>
<ul>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Process 	Vs Thread</strong></span></span></span></li>
</ul>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_.png" class="thickbox no_icon" rel="gallery-1954" title="pic.jepg"><img class="aligncenter size-medium wp-image-1955" title="pic.jepg" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pic.jepg_-291x300.png" alt="" width="291" height="300" /></a></p>
<ul><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="color: #000000;"><span style="font-size: small;">A 	process and a thread is almost the same, and the only worthwhile 	difference between a thread and a process is that threads share the 	same address space completely and hence require less creation time. 	P</span></span><span style="color: #000000;">rocesses 	are independent execution units that contain their own state 	information, use their own address spaces, and only interact with 	each other via inter-process communication mechanisms. A</span><span style="color: #000000;"><span style="font-size: small;"> thread is a coding construct that doesn&#8217;t affect the architecture of 	an application. A single process might contains multiple threads; 	all threads within a process share the same state and same memory 	space, and can communicate with each other directly, because they 	share the same variables.<br />
</span></span></span>&nbsp;</p>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">User 	process is a process run by a human user</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A 	service or a daemon process which can be time based or event based 	usually triggered by root or the system itself while on bootup and 	infact a never ending process which triggers other processes.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>PID</strong> &#8211; Process ID &#8211; The id of a process, each process running on a system 	is assigned itś own process ID.</span></span></span></li>
</ul>
<ul>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>PPID</strong> &#8211; Parent Process ID &#8211; PID of the process that created the child 	process. pstree shows the relation b/w parent process and other 	process, starting from  init.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Job 	ID</strong> &#8211; Job ID is unique to a shell instance. Can be displayed using 	the command &#8220;jobs&#8221;. A process when hit a &#8220;Ctrl+Z&#8221; 	shows the job id, when it says Stopped .The command jobs shows 	background processes, both stopped and running. The process having a 	+ symbol toward the right of job id means that process will be 	responding to fg without options (without job id being passed as 	argument) and the &#8211; sign to any process, if any indicates that it is 	that process which inherits the + sign after the process having + 	sign is done with.</span></span></span></li>
<li><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">bg 	%job_id or bg PID will let the process with job_id to run again.<br />
</span></span></span></li>
</ul>
<p><span style="color: #000000;"> <span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">A few process related commands with options:</span></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"> </span></span></span></p>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">ps command (process status) will display snapshot information of all active processes.</span></span></span></p>
<h3><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">To display all the processes running in the system</span></span></span></h3>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">Use “ps aux”, as shown below.</span></span></span></p>
<pre><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pasaux1.jpg" class="thickbox no_icon" rel="gallery-1954" title="pasaux"><img class="aligncenter size-full wp-image-1967" title="pasaux" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pasaux1.jpg" alt="" width="625" height="423" /></a>
</span></span></span><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">You can also use “ps -ef | more”, to get a similar output</span></span></span></pre>
<p><a name="more-283"></a> <span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">Use ¨pstree¨ to get output like this:</span></span></span></p>
<p><a href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pstree.jpg"><img class="aligncenter size-full wp-image-1970" title="pstree" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pstree.jpg" alt="" width="616" height="416" /></a></p>
<ul>
<li><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Nice 	Value:</strong></span></span></span><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">It 	is used to run a program with modified scheduling priority . 	Nicenesses  range  from  -20 (most favorable scheduling) to 19 	(least favorable). Nice is to start a process with a priority like 	nice -n 10 mp3blaster</span></span></span></li>
<li><span style="color: #111111;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;"><strong>Renice</strong> &#8211; renice is to change the priority of an existing process like : 	renice 10 PID</span></span></span></li>
</ul>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>kill</strong> &#8211; terminate a process<br />
The  command  kill  sends  the specified 	signal to the specified process or  process group.  If no signal is 	specified, the TERM signal  is  sent. </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	- kill %job_id or kill PID / man 7 signal </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-15 PID &#8211; cleaner or soft killing of process &#8211; 			  SIGTERM </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-9 PID &#8211; hard kill  &#8211; SIGKILL </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-19 PID &#8211; Stop the process &#8211; STOP </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-18 PID &#8211; resume the stopped process &#8211; SIGCONT </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-2 PID &#8211; equivalent to Ctrl + C &#8211; SIGINT </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-1 PID &#8211; Hangup  &#8211; SIGHUP </span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">kill 	-3 PID &#8211; end process &amp; core dump</span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">killall</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">More information regarding &#8216;kill&#8217; can be found at the man page</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">[root@localhost ~]# man kill </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><br />
</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>Top</strong> &#8211; Display Linux tasks</span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/top.jpg" class="thickbox no_icon" rel="gallery-1954" title="top"><img class="aligncenter size-full wp-image-1972" title="top" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/top.jpg" alt="" width="613" height="411" /></a></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The  top program provides a dynamic real-time view of a running system.  It can display system summary information as well as a list of tasks currently  being managed by the Linux kernel.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">top &#8211; Sort by CPU -&gt; P </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Sort by MEM -&gt; M </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Sort by PID -&gt; N </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Kill by PID -&gt; k </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Renice by PID -&gt; r </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">List by user -&gt; u </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Active processes or non idle process -&gt; i</span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>nohup</strong> &#8211; will stop a process from being killed even if you logs off the 	system before it completes. It ignores the hangup and quit signals.</span></li>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>pgrep</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211; process grep.</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> pgrep looks through the currently running processes and lists  the  process IDs  which matches the selection criteria to stdout.  All the criteria have  to match. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">For example, pgrep -u root sshd </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>pidof</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211;  find the process ID of a running program.  finds the process id’s 	(pids) of the named programs. It prints those  id’s on the 	standard output. An example is given below</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pidof.jpg" class="thickbox no_icon" rel="gallery-1954" title="pidof"><img class="aligncenter size-full wp-image-1974" title="pidof" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/pidof.jpg" alt="" width="626" height="423" /></a><br />
</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>PPID</strong></span><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"> &#8211; Parent Process ID </span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The process parent PID, the creator of the process.</span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>STAT</strong> &#8211; Process Status</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">These functions return information about the specified file. You do not need any access right to the file to get this information but you need search rights to all directories named in the path to the file.</span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/stat.jpg" class="thickbox no_icon" rel="gallery-1954" title="stat"><img class="aligncenter size-full wp-image-1975" title="stat" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/stat.jpg" alt="" width="622" height="420" /></a></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">TTY &#8211; Controlling Terminal</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">It  print the file name of the terminal connected to standard input .</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">[root@localhost ~]# tty </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">/dev/pts/5 </span></p>
<ul>
<li><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><strong>PRI</strong> &#8211; Priority number.</span></li>
</ul>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Lower the number, higher the priority, from +19 to -20. The priority numbers available for the system is from +39 to -60, while -20 to -60 is reserved for kernel threads. A normal user can have priorities from 0 to +20, and negative values as well as reducing the values are allowed only to root.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">NI &#8211; Dynamic priority value , ranges from +19 to -20</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">TIME &#8211; total CPU time used</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Process Status (STAT) Codes can be of any of these. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">D   uninterruptible sleep (usually IO) &#8211; cannot be terminated at          		the moment. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">R   runnable (on run queue) &#8211; can be run </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">S   sleeping &#8211; waiting for an external event </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">T   traced or stopped &#8211; is suspended. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Z   a defunct (&#8220;zombie&#8221;) process &#8211; has terminated itself. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">X   Extinct &#8211; is dead </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">Setting limits on the number of processes that can run.</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">The command &#8220;ulimit&#8221; is used to limit the number of processes users can run along with available system resources. All processes which will be started from the shell (bash in many cases), will have the same resource limits. To set the limits for daemons which are running at boot time add ulimit </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">command to boot scripts. See apache startup script. </span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">/etc/security/limits.conf</span></p>
<p><span style="font-family: Bitstream Vera Sans Mono,sans-serif;">For example:</span></p>
<pre><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">[root@localhost ~]#ulimit -S -m 1000000</span></span></span>
<span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">[root@localhost ~]# ulimit -S -v 500000</span></span></span></pre>
<p><span style="color: #000000;"><span style="font-family: Bitstream Vera Sans Mono,sans-serif;"><span style="font-size: small;">With this value set, the system will kill any process that tries to take up more resources than you have set as a limit.</span></span></span></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2012/01/ulimit-a.jpg" class="thickbox no_icon" rel="gallery-1954" title="ulimit-a"><img class="aligncenter size-full wp-image-1976" title="ulimit-a" src="http://www.supportsages.com/blog/wp-content/uploads/2012/01/ulimit-a.jpg" alt="" width="621" height="422" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Chapter+12+All+about+a+process+running+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1954" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Chapter+12+All+about+a+process+running+in+linux+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1954" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2012/01/all-about-a-process-running-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel Website Transfer &#8211; Part 2 &#8211; cPanel to cPanel Migration</title>
		<link>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/</link>
		<comments>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 11:48:54 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1870</guid>
		<description><![CDATA[<h3><strong><em><span style="color: #ff0000;">Transferring a Website from One cPanel server to another</span></em></strong></h3>
<strong>Skill Level : Beginner</strong>

In this post, I will explain how to transfer a website from one cPanel server to other.

<strong>Pre Requisites</strong>

Server Platform : Linux

User requires     : cPanel and SSH access (root) to at-least the Destination server (where the account is restoring)

<strong>The Process</strong>

From the Target server, Generate a Full cPanel backup of the account using either cPanel or through root shell access.

(i) By cPanel

Login to cPanel. Go to Files -&#62; Backups

<a href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png"><img class="alignleft size-full wp-image-1875" title="Files" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" alt="" width="329" height="115" /></a>

Click "Download or Generate a Full Website Backup". Choose Backup Destination ...]]></description>
			<content:encoded><![CDATA[<h3><strong><em><span style="color: #ff0000;">Transferring a Website from One cPanel server to another</span></em></strong></h3>
<p><strong>Skill Level : Beginner</strong></p>
<p>In this post, I will explain how to transfer a website from one cPanel server to other.</p>
<p><strong>Pre Requisites</strong></p>
<p>Server Platform : Linux</p>
<p>User requires     : cPanel and SSH access (root) to at-least the Destination server (where the account is restoring)</p>
<p><strong>The Process</strong></p>
<p>From the Target server, Generate a Full cPanel backup of the account using either cPanel or through root shell access.</p>
<p>(i) By cPanel</p>
<p>Login to cPanel. Go to Files -&gt; Backups</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" class="thickbox no_icon" rel="gallery-1870" title="Files"><img class="alignleft size-full wp-image-1875" title="Files" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Files.png" alt="" width="329" height="115" /></a></p>
<p>Click &#8220;Download or Generate a Full Website Backup&#8221;. Choose Backup Destination as &#8220;Home Directory&#8221; (Make sure you&#8217;ve enough Disk Space before you proceed) and a valid E-mail address to notify you once the Backup is generated.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Full_Backup.png" class="thickbox no_icon" rel="gallery-1870" title="Full_Backup"><img class="alignleft size-full wp-image-1878" title="Full_Backup" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Full_Backup.png" alt="" width="580" height="262" /></a></p>
<p>Once the Backup is completed, a mail will arrive on the E-mail you&#8217;ve mentioned above (if specified) and the &#8216;Backups Available for Download&#8217; will be populated with the name of the backup file generated like :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Backup_Complete.png" class="thickbox no_icon" rel="gallery-1870" title="Backup_Complete"><img class="alignleft size-full wp-image-1879" title="Backup_Complete" src="http://www.supportsages.com/blog/wp-content/uploads/2011/06/Backup_Complete.png" alt="" width="580" height="49" /></a></p>
<p>Do you know why the backup generated is the form tar.gz ? Its because, in the tar format all files are preserved with their appropriate permissions and then its compressed to gz (gzip) for obtaining the least possible file size.</p>
<p>The process in the Target server is finished. Now login as Root in the server which requires the account to be restored. We&#8217;ve to download the backup file generated there to this server. There are number of ways to do this. Some are weird <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Method 1</strong></p>
<p>If you have the cPanel details of that server, you can use it for FTP access. And since the Backup is generated on the Home directory there, its all about downloading the backup.</p>
<p># root@server [/home]# ftp <span style="color: #ff0000;"><strong>oldserver.com</strong></span> or <strong><span style="color: #ff0000;">IP</span></strong></p>
<p>Connected to oldserver.com.<br />
220&#8212;&#8212;&#8212;- Welcome to Pure-FTPd [privsep] [TLS] &#8212;&#8212;&#8212;-<br />
220-You are user number 3 of 50 allowed.<br />
220-Local time is now 17:28. Server port: 21.<br />
220-IPv6 connections are also welcome on this server.<br />
220 You will be disconnected after 15 minutes of inactivity.<br />
Name (oldserver.com:root): <strong><span style="color: #ff0000;">user</span></strong><br />
331 User user OK. Password required<br />
Password:<br />
230 OK. Current restricted directory is /<br />
Remote system type is UNIX.<br />
Using binary mode to transfer files.<br />
ftp&gt; get <span style="color: #ff0000;"><strong>backup-6.2.2011_06-23-57_account.tar.gz</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">This will download the backup. You need root access to restore it. Before you restore you need to check whether there is an account or domain which already exists by the name which you intend to restore.</span></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">cPanel script to check whether the domain/account name exists </span></span></p>
<p><strong># grep account /etc/userdomains</strong></p>
<p><strong>Method 2</strong></p>
<p><strong>Generating a cPanel backup through Remote FTP (Passive Mode transfer)</strong></p>
<p>It is possible to generate a Remote backup of the account in a server, where the backup has to be restored. Go to cPanel -&gt; Backups -&gt; Download or Generate a Full website backup. Select the Backup Destination as Remote FTP Server (passive mode transfer). Follow the screenshot :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/07/remote_ftp.png" class="thickbox no_icon" rel="gallery-1870" title="remote_ftp"><img class="alignleft size-full wp-image-1900" title="remote_ftp" src="http://www.supportsages.com/blog/wp-content/uploads/2011/07/remote_ftp.png" alt="" width="759" height="544" /></a></p>
<p>cPanel script to restore the account</p>
<p># nice -n 19 /scripts/restorepkg &#8211;skipres &lt;username&gt;</p>
<p>For the script to run, the backup should be in any of the following locations in the server :  /, /home, /home2, /home3, /misc, /net, /root, /usr, /usr/home, /var/lib/nfs/rpc_pipefs, /var/tmp, /web</p>
<p>This feature will restore full backups, cPanel backups and cPanel move files in one of the following formats:</p>
<p>cpmove-{USER}<br />
cpmove-{USER}.tar<br />
cpmove-{USER}.tar.gz<br />
USER.tar<br />
USER.tar.gz<br />
backup-{BACKUP-DATE_TIME}_{USER}.tar<br />
backup-{BACKUP-DATE_TIME}_{USER}.tar.gz</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+2+-+cPanel+to+cPanel+Migration+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1870" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+2+-+cPanel+to+cPanel+Migration+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1870" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/08/cpanel-website-transfer-part-2-cpanel-to-cpanel-migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSL Installation in a cPanel based server</title>
		<link>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/</link>
		<comments>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 10:14:00 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1782</guid>
		<description><![CDATA[<span style="color: #ff0000;"><strong>What is SSL</strong></span>

SSL (Secure Sockets Layer) is a cryptographic protocol which ensure the security of communication over the Internet. SSL encrypt the segments of network connections above the Transport Layer, using symmetric cryptography for privacy and a keyed message authentication code for message reliability.

<span style="color: #ff0000;"><strong>How SSL works</strong></span>

Web servers and Web browsers rely on the SSL protocol to create a unique encrypted channel for private communications over the Internet. The SSL Certificate consists of a public key and a private key. The public key is used to encrypt information and the private key is used to decrypt it. ...]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;"><strong>What is SSL</strong></span></p>
<p>SSL (Secure Sockets Layer) is a cryptographic protocol which ensure the security of communication over the Internet. SSL encrypt the segments of network connections above the Transport Layer, using symmetric cryptography for privacy and a keyed message authentication code for message reliability.</p>
<p><span style="color: #ff0000;"><strong>How SSL works</strong></span></p>
<p>Web servers and Web browsers rely on the SSL protocol to create a unique encrypted channel for private communications over the Internet. The SSL Certificate consists of a public key and a private key. The public key is used to encrypt information and the private key is used to decrypt it. When a Web browser points to a domain which is secured by SSL, a level of encryption is established based on the type of SSL Certificate as well as the client Web browser, operating system and host server’s capabilities. This is why SSL certificates feature a different range of encryption levels.</p>
<p><span style="color: #ff0000;"><strong>Obtaining an SSL Certificate</strong></span></p>
<p>Domain example.com needs an SSL Certificate. The following steps are involved in it :</p>
<p>a) Example.com generates a CSR (Certificate Signing Request) and during this process, a private key is generated.<br />
b) With this CSR, Example.com goes to a trusted, third party Certificate Authority like Verisign. They take the Certificate Signing Request and validates example.com. The Certificate Authority validates example.com.<br />
c) When the validation process is complete, the third party Certificate Authority gives a new public key (certificate) encrypted with their private key.<br />
d) Example.com installs the new certificate and gets secured.</p>
<p><span style="color: #ff0000;"><strong>Installing SSL</strong></span></p>
<p>(i) Through cPanel/WHM<br />
Its quite easy to install SSL through cPanel/WHM interface.</p>
<p><strong>Generating CSR</strong></p>
<p>Under Security tab, click SSL/TLS Manager.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/security_cpanel.png" class="thickbox no_icon" rel="gallery-1782" title="security_cpanel"><img class="alignnone size-full wp-image-1786" title="security_cpanel" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/security_cpanel.png" alt="" width="519" height="117" /></a></p>
<p>Generate the Private Keys first by accessing the option <strong>Generate, view, upload or delete your private keys</strong></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/03/ssltls1.png" class="thickbox no_icon" rel="gallery-1782" title="ssltls"><img class="alignnone size-full wp-image-1789" title="ssltls" src="http://www.supportsages.com/blog/wp-content/uploads/2011/03/ssltls1.png" alt="" width="320" height="206" /></a></p>
<p>Access the option <strong>Generate, view, or delete SSL certificate signing requests</strong>. Fill in the forms like Domain Name, E-mail Address, Country etc.</p>
<p>You will obtain the CSR. Contact the Certificate provider with this information. The Certificate Authority will then provide the Certificate (CRT). Finally you will have the following files associated with SSL :</p>
<p><em><strong>CSR in the format domain.com.csr or domain_com.csr</strong></em></p>
<p><em><strong>CA bundle, which have the Public key of the Certificate Authority in the format domain.com.cabundle or domain_com.ca-bundle</strong></em></p>
<p><em><strong>CRT, the certificate in the format domain.com.crt or domain_com.crt</strong></em></p>
<p><em><strong>Private key in the format domain.com.key or domain_com.key </strong></em></p>
<p><span style="color: #ff0000;"><strong>Method 1 : Installing from cPanel</strong></span></p>
<p><span style="color: #ff0000;"><span style="color: #000000;">1. Go to </span></span><strong>SSL/TLS Manager</strong>.<br />
2. Click <strong>Generate, view, upload, or delete your private keys</strong>.<br />
3. Under the <strong>Upload a New Certificate section</strong>, click on the <strong>Browse </strong>button (next to Choose a .crt file option) and find the Domain Certificate file  (example.crt) that you obtained from the SSL vendor. Alternatively you can paste the Certificate contents on the section <strong>Paste the crt  below</strong>. Make sure to include the BEGIN and  END tags, while copying your certificate. Click the Upload button.<br />
4. Go Back and click Return to <strong>SSL Manager</strong> at the bottom of the page.<br />
5. Click on <strong>Setup a SSL certificate to work with your site</strong>. If this option is not available, your web host may have disabled it. You will need to contact them for further support.<br />
6. Now, select the domain you are using from the Domain drop down menu. It will attempt to fetch the SSL Certificate and the private key. If this doesn&#8217;t work, you may need to contact your web host.<br />
7. In the box labeled CA Bundle paste the contents of the Intermediate certificate (DigiCertCA.crt).<br />
8. Click Install Certificate. Your SSL certificate should now be installed, and the website configured to accept secure connections. You or your web host may need to restart Apache before it will work.</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-1.png" class="thickbox no_icon" rel="gallery-1782" title="ssl-cpanel-install-1"><img class="alignleft size-full wp-image-1917" title="ssl-cpanel-install-1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-1.png" alt="" width="523" height="420" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-2.png" class="thickbox no_icon" rel="gallery-1782" title="ssl-cpanel-install-2"><img class="alignleft size-full wp-image-1918" title="ssl-cpanel-install-2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/ssl-cpanel-install-2.png" alt="" width="497" height="667" /></a></p>
<p><span style="color: #ff0000;"><strong>Method 2 : Installing from WHM</strong></span></p>
<p><strong> </strong><span style="color: #000000;">You can install SSL certificate from WHM also. Its quite simple when compared to the installation through cPanel. All you need is the root access to WHM. Once you login to the WHM, search for the option </span><strong>Install a SSL Certificate and Setup the Domain. </strong></p>
<p>You&#8217;ll find three boxes. Paste the CRT file contents in the first box. It will automatically fetch the Key and CA Bundle (In most cases, CA bundle needs to be fetched manually). Finally click Submit once all the fields are populated. You&#8217;ll see a message that indicates the installation is successful</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm1.png" class="thickbox no_icon" rel="gallery-1782" title="whm1"><img class="alignleft size-full wp-image-1923" title="whm1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm1.png" alt="" width="195" height="280" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm2.png" class="thickbox no_icon" rel="gallery-1782" title="whm2"><img class="alignleft size-full wp-image-1924" title="whm2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm2.png" alt="" width="573" height="471" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm3.png" class="thickbox no_icon" rel="gallery-1782" title="whm3"><img class="alignleft size-full wp-image-1925" title="whm3" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm3.png" alt="" width="584" height="387" /></a><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm4.png" class="thickbox no_icon" rel="gallery-1782" title="whm4"><img class="size-full wp-image-1926 alignleft" title="whm4" src="http://www.supportsages.com/blog/wp-content/uploads/2011/08/whm4.png" alt="" width="554" height="356" /></a></p>
<p><span style="color: #ff0000;"><strong>Method 3 : Manual Installation</strong></span></p>
<p>You need the Server Root shell access for this. Go to the Apache configuration file in the server, in the cPanel case its /usr/local/apache/conf/httpd.conf. Locate the VirtualHost entry configured for SSL. Configure it like :</p>
<pre class="brush: bash; title: ; notranslate">
&lt;VirtualHost xxx.xxx.x.xx:443&gt;
 ServerName example.com
 ServerAlias www.example.com
 DocumentRoot /home/example/public_html
 SSLEngine on
 SSLCertificateFile /usr/share/ssl/certs/example.com.crt
 SSLCertificateKeyFile /usr/share/ssl/private/example.com.key
 SSLCACertificateFile /usr/share/ssl/certs/example.com.cabundle
&lt;/VirtualHost&gt;
</pre>
<p>where <strong>SSLCertificateFile </strong>is the SSL certificate file path, <strong>SSLCertificateKeyFile </strong>is the Key file path, <strong>SSLCACertificateFile </strong>is the path to the Intermediate file. Make sure you&#8217;ve the files in the specified path (It may vary on different scenarios). Restart the Web server and you&#8217;re done.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=SSL+Installation+in+a+cPanel+based+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1782" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=SSL+Installation+in+a+cPanel+based+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1782" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/08/ssl-installation-in-a-cpanel-based-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>cPanel Website Transfer &#8211; Part 1 &#8211; Changing an Add-on Domain to a Primary Domain</title>
		<link>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/</link>
		<comments>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/#comments</comments>
		<pubDate>Wed, 06 Jul 2011 12:52:52 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[migration]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[transfer]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=728</guid>
		<description><![CDATA[For Beginners, Learn how to transfer and restore a website in a Linux cPanel envrioment]]></description>
			<content:encoded><![CDATA[<h3><span style="color: #ff0000;"><strong><em><strong><em>Converting an Add-on Domain to a Primary Domain</em></strong></em></strong></span></h3>
<p><strong>Skill Level : Beginner</strong></p>
<p>In this post, I will explain how to convert an add-on domain to a primary domain. Considering a complex case, lets consider the primary domain should be a different one from the one that holds the Add-on domain.</p>
<p><strong>Pre Requisites</strong></p>
<p>Server Platform : Linux</p>
<p>User requires     : cPanel and SSH access (root)</p>
<p>This is a Site transfer. Also both the sites I&#8217;ve mentioned here is on same server.</p>
<p><strong>Case</strong></p>
<p>The Add-on Domain under a website has to be converted as its Primary Domain. If you have a Full backup, its another case. I&#8217;ll explain it in another post.</p>
<p><strong>Solution</strong></p>
<p>Lets consider the Add-on Domain is addon.com under the user admin and the document root of the add-on domain is :</p>
<p>/home/admin/public_html/addon</p>
<p>Now it should be transferred as the Primary Domain</p>
<p>* Using WHM Create a New account primary.com, the document root is then say /home/primary<br />
We&#8217;ve to transfer the whole data from /home/admin/public_html/addon.com to /home/primary/public_html first.</p>
<p>* The Steps will be :</p>
<p>root@server [/home/admin/public_html/addon]# cp -r ./* /home/primary/public_html</p>
<p>This will recursively copy everything inside the PWD to the specified location<br />
<span id="more-728"></span></p>
<p>Don&#8217;t forget to copy .htaccess too</p>
<p>root@server [/home/admin/public_html/addon]# cp .htaccess /home/primary/public_html</p>
<p>* Thats it, the contents are moved, but there is a database too which has to be moved eventually.<br />
* I&#8217;ll site some type of websites like CMS and Blog :</p>
<p>For a Magento website, the database configuration is specified inside the local.xml file which is placed inside the /app/etc directory inside a domain. For example</p>
<p>root@server [/home/admin/public_html/addon]# cd /app/etc<br />
root@server [/home/admin/public_html/addon/app/etc]# cat local.xml</p>
<p>* Watch for these lines in the local.xml file</p>
<p>&lt;username&gt;&lt;![CDATA[admin_user]]&gt;&lt;/username&gt;<br />
&lt;password&gt;&lt;![CDATA[password]]&gt;&lt;/password&gt;<br />
&lt;dbname&gt;&lt;![CDATA[admin_db]]&gt;&lt;/dbname&gt;</p>
<p><![CDATA[admin_user]]&gt;</username></p>
<password><! [CDATA[password]]-->                     <!--[CDATA[admin_user]]&gt;</p>
<p>* From this the DB Name, DB Username and Password can be fetched.</p>
<p>DB Name            :    admin_db<br />
DB Username    :    admin_user<br />
Password       :    password</p>
<p><strong>Other DB Configuration Files</strong></p>
<p>For a WordPress website, the configuration file will be the wp-config.php. Check these lines for the Database configuration details :</p>
<p>// ** MySQL settings &#8211; You can get this info from your web host ** //<br />
/** The name of the database for WordPress */<br />
define(&#8216;DB_NAME&#8217;, &#8216;admin_db&#8217;);</p>
<p>/** MySQL database username */<br />
define(&#8216;DB_USER&#8217;, &#8216;admin_user&#8217;);</p>
<p>/** MySQL database password */<br />
define(&#8216;DB_PASSWORD&#8217;, &#8216;password&#8217;);</p>
<p>/** MySQL hostname */<br />
define(&#8216;DB_HOST&#8217;, &#8216;localhost&#8217;);</p>
<p>For a Joomla website it is the configuration.php where the database details would be defined.</p>
<p>* Access the cPanel of the new primary domain primary.com. Create a new MySQL Database from Databases -&gt; MySQL option, along with a new MySQL user. Make sure you are providing    exact names as in the local.xml file of the addon.com. Next add the user to the database. So the corresponding database credentials at primary.com will be :</p>
<p>DB Name           :    primary_db<br />
DB Username    :    primary_user<br />
Password                 :     password</p>
<p>Screen-shots of Creating a new database and database user :</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/1.png" class="thickbox no_icon" rel="gallery-728" title="1"><img class="alignnone size-medium wp-image-1860" title="1" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/1-300x68.png" alt="" width="300" height="68" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/2.png" class="thickbox no_icon" rel="gallery-728" title="2"><img class="alignnone size-medium wp-image-1861" title="2" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/2-300x79.png" alt="" width="300" height="79" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/3.png" class="thickbox no_icon" rel="gallery-728" title="3"><img class="alignnone size-medium wp-image-1862" title="3" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/3-300x140.png" alt="" width="300" height="140" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/5.png" class="thickbox no_icon" rel="gallery-728" title="5"><img class="alignnone size-full wp-image-1863" title="5" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/5.png" alt="" width="276" height="118" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/05/6.png" class="thickbox no_icon" rel="gallery-728" title="6"><img class="alignnone size-medium wp-image-1864" title="6" src="http://www.supportsages.com/blog/wp-content/uploads/2011/05/6-300x201.png" alt="" width="300" height="201" /></a></p>
<p><strong>Creating DB through Shell</strong></p>
<p>Access MySQL prompt :</p>
<p>$ mysql //Login as Root</p>
<p>mysql&gt; use mysql; //Use MySQL</p>
<p>﻿﻿﻿﻿﻿﻿mysql&gt; create database [﻿primary_db]; //Create a Database</p>
<p>mysql&gt; INSERT INTO primary_user (Host,User,Password) VALUES(&#8216;host&#8217;,'primary_user&#8217;,PASSWORD(&#8216;password&#8217;)); //Insert User</p>
<p>mysql&gt; grant all privileges on primary_db.sql to primary_user@localhost; //Granting all Privileges to user primary_user on the database</p>
<p>Perform Dump :</p>
<p>root@server [/home/primary]# mysqldump dbname &gt; dbname.sql   (Here mysqldump admin_db &gt; admin_db.sql)</p>
<p>* Enter the mysql terminal through the command mysql</p>
<p>mysql &gt; use newdatabasename;          (Here mysql &gt; use primary_db;)<br />
mysql &gt; source olddatabasename.sql;      (Here mysql &gt; source admin_db.sql;)</p>
<p>* For a normal website, you may backup the database by checking the config files and restore it. Use cPanel for that.</p>
<p>* Guess what, You&#8217;re done, the restoration is complete now. Now the primary.com should be working like addon.com.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+1+-+Changing+an+Add-on+Domain+to+a+Primary+Domain+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F728" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=cPanel+Website+Transfer+-+Part+1+-+Changing+an+Add-on+Domain+to+a+Primary+Domain+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F728" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/07/cpanel-website-transfer-part-1-changing-an-add-on-domain-to-a-primary-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Worried about email migrations and mail syncing &#8211; get getmail for the rescue</title>
		<link>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/</link>
		<comments>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 15:14:39 +0000</pubDate>
		<dc:creator>arnold</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[DirectAdmin]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[email migrations]]></category>
		<category><![CDATA[email transfer]]></category>
		<category><![CDATA[imapsync]]></category>
		<category><![CDATA[mail syncing]]></category>
		<category><![CDATA[mail transfer]]></category>
		<category><![CDATA[migrate my email]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1887</guid>
		<description><![CDATA[Most of the hosting providers offer free server migration. The free website migration started as early as 2005, in the industry. But only a few providers offer the email migration for a website transfer involving different control panels. So using getmail is the easiest way to transfer emails. All we need is to create the email account in the new server and configure the getmail to transfer the emails.

Download getmail at http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz

[bash]

wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
tar xzf getmail-4.20.3.tar.gz
cd getmail*
python setup.py install

[/bash]

Now you have to create a getmailrc , the getmail configuration file inside the home folder of the user. getmailrc need not be ...]]></description>
			<content:encoded><![CDATA[<p>Most of the hosting providers offer free server migration. The free website migration started as early as 2005, in the industry. But only a few providers offer the email migration for a website transfer involving different control panels. So using getmail is the easiest way to transfer emails. All we need is to create the email account in the new server and configure the getmail to transfer the emails.</p>
<p>Download getmail at http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz</p>
<pre class="brush: bash; title: ; notranslate">

wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.3.tar.gz
tar xzf getmail-4.20.3.tar.gz
cd getmail*
python setup.py install
</pre>
<p>Now you have to create a getmailrc , the getmail configuration file inside the home folder of the user. getmailrc need not be inside the home directory. You have to create the folder .getmail where getmail keeps a log of the emails retrieved based on each configuration file you may have.You can have multiple destination and retriever sections in one single getmailrc as well.</p>
<p>I must say getmail is so much flexible and rightly coded when the mailsync or imapsync didn&#8217;t do their job right or up to the mark. And is an excellent replacement for fetchmail. It supports POP, POP3S, IMAP4 and IMAPS, and also can store the mails retrieved in mbox or maildir format at the destination.</p>
<p>An extremely simple getmailrc file will look like this</p>
<pre class="brush: bash; title: ; notranslate">
[retriever]
type = SimpleIMAPRetriever
server = mail.domain.com
username = direct@domain.com
password = direct

[destination]
type = Maildir
path = /home/cpusername/mail/.direct@domain_com/
</pre>
<p>The file format should be pretty self-explanatory. You’re telling getmail to fetch your email from server, mail.domain.com by logging to it using the mentioned username and password. The destination section mentions where to store the retrieved email and in which format (Maildir or mbox or mboxrd). Make sure that the cur, new and tmp are there inside those folder though. However getmail may create those folders automatically though.</p>
<p>Finally to get this going, just run &#8220;getmail &#8211;rcfile getmailrc&#8221;</p>
<p>Once you run it, assuming that the getmailrc is properly configured, you will be welcomed by a below output.</p>
<pre class="brush: bash; title: ; notranslate">
getmail version 4.20.3
Copyright (C) 1998-2009 Charles Cazabon.  Licensed under the GNU GPL version 2.
SimpleIMAPRetriever:direct@domain.com@mail.domain.com:143:
 msg    1/3983 (299328 bytes) delivered
 msg    2/3983 (2815 bytes) delivered
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Worried+about+email+migrations+and+mail+syncing+-+get+getmail+for+the+rescue+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1887" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Worried+about+email+migrations+and+mail+syncing+-+get+getmail+for+the+rescue+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1887" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/06/worried-about-email-migrations-and-mail-syncing-get-getmail-for-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to install 32 bit and 64 bit applications on 64 bit Ubuntu OS</title>
		<link>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/</link>
		<comments>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/#comments</comments>
		<pubDate>Thu, 26 May 2011 17:24:30 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[getlibs]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1853</guid>
		<description><![CDATA[Earlier, with Drapper Drake , you only had to install ia32libs. But after that, may be they decided not to release for future versions, no more release. Hackers always find a way round to get their thing done and that exactly what happened with this as well. A bash file was written and released to the public available at http://frozenfox.freehostia.com/cappy/

I recently had to use this frequently and thought about mentioning it. In last two days, I had two such requirements as well. Here in India, Tata Docomo's USB installation binary, will work only on i386 linux boxes. I would admit ...]]></description>
			<content:encoded><![CDATA[<p>Earlier, with Drapper Drake , you only had to install ia32libs. But after that, may be they decided not to release for future versions, no more release. Hackers always find a way round to get their thing done and that exactly what happened with this as well. A bash file was written and released to the public available at http://frozenfox.freehostia.com/cappy/</p>
<p>I recently had to use this frequently and thought about mentioning it. In last two days, I had two such requirements as well. Here in India, Tata Docomo&#8217;s USB installation binary, will work only on i386 linux boxes. I would admit that that itself is an achievement <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But I had to get it working on a x64 architecture as well. And it was complaining about libqt and a few other 32 bit packages. dkpg&#8217;s &#8211;force-architecture option was also not working because of dependency issue.</p>
<p>This also helped me install a Task Management Software as well, http://codea-dev.com/gtd/download/linux/</p>
<p>Below text is copied from Ubuntu Forum&#8217;s. Author&#8217;s original post can be found at http://ubuntuforums.org/showthread.php?t=474790</p>
<p><span style="font-size: small;"><strong>getlibs works on:</strong></span></p>
<ul>
<li>All Ubuntu and Debian systems</li>
<li>Debian or Ubuntu based distributions (best to use the package name)</li>
</ul>
<p>Tip: To install a 32-bit debian package for a program (not a library!) use</p>
<div>
<div>Code:</div>
<pre dir="ltr">sudo dpkg -i --force-all package_name.deb</pre>
</div>
<p><span style="font-size: small;"><strong>Usage Examples:</strong></span></p>
<p>getlibs on a program to download all missing libraries:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs /usr/bin/skype</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Use getlibs to install a 32-bit library using the library name:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -l libogg.so.0 libSDL-1.2.so.0</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Use getlibs to install a 32-bit library using the package name:</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -p libqt4-core libqt4-gui</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Install a 32-bit library file (.deb):</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -i ~/i386_library_1.deb</pre>
</div>
<p>&#8212;&#8211;</p>
<p>Download and install a 32-bit library file (.deb):</p>
<div>
<div>Code:</div>
<pre dir="ltr">getlibs -w http://mirrors.kernel.org/ubuntu/pool/main/s/sdl-image1.2/libsdl-image1.2_1.2.5-3_i386.deb</pre>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=How+to+install+32+bit+and+64+bit+applications+on+64+bit+Ubuntu+OS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1853" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=How+to+install+32+bit+and+64+bit+applications+on+64+bit+Ubuntu+OS+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1853" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/how-to-install-32-bit-and-64-bit-applications-on-64-bit-ubuntu-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple backup script for remotely backing up databases</title>
		<link>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/</link>
		<comments>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/#comments</comments>
		<pubDate>Wed, 25 May 2011 18:23:38 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[cpanel mysql backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[remote mysql backup]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1847</guid>
		<description><![CDATA[This backup script is actually a small modification of another backup script available in Google. I am not able to get that URL to mark/link reference. Only modification I added is a four liner to remove a week old backup automatically. You may also see http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/ as well. Indenting in python is lost, will fix tomorrow :)

[code lang="python"]

#!/usr/bin/env python
import ConfigParser
import os
import time

# Variable Definition
username = 'cpdbbackups'
password = 'p@ssw0Rd'
hostname = 're.mo.te.ip
backupfolder = '/home/dbbackups/servername'

filestamp = time.strftime('%Y-%m-%d-%H')
deletetime = time.time() - 7 * 86400

# Delete old files

for backup_file in os.listdir (backupfolder):
 full_file_path = os.path.join(backupfolder, backup_file)
 if os.path.getmtime(full_file_path) &#60; deletetime:
 os.unlink(full_file_path)

# Get a list of ...]]></description>
			<content:encoded><![CDATA[<p>This backup script is actually a small modification of another backup script available in Google. I am not able to get that URL to mark/link reference. Only modification I added is a four liner to remove a week old backup automatically. You may also see http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/ as well. Indenting in python is lost, will fix tomorrow <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: python; title: ; notranslate">

#!/usr/bin/env python
import ConfigParser
import os
import time

# Variable Definition
username = 'cpdbbackups'
password = 'p@ssw0Rd'
hostname = 're.mo.te.ip
backupfolder = '/home/dbbackups/servername'

filestamp = time.strftime('%Y-%m-%d-%H')
deletetime = time.time() - 7 * 86400

# Delete old files

for backup_file in os.listdir (backupfolder):
 full_file_path = os.path.join(backupfolder, backup_file)
 if os.path.getmtime(full_file_path) &lt; deletetime:
 os.unlink(full_file_path)

# Get a list of databases with :
database_list_command=&quot;mysql -u%s -p%s -h %s --silent -N -e 'show databases'&quot; % (username, password, hostname)
for database in os.popen(database_list_command).readlines():
 database = database.strip()

 if database == 'information_schema':
 continue
 filename = &quot;%s/%s-%s.sql&quot; % (backupfolder, database, filestamp)
 os.popen(&quot;mysqldump -u%s -p%s -h %s -e --opt -c %s | gzip -c &gt; %s.gz&quot; % (username, password, hostname, database, filename))
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Simple+backup+script+for+remotely+backing+up+databases+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1847" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Simple+backup+script+for+remotely+backing+up+databases+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1847" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/simple-backup-script-for-remotely-backing-up-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying wildcards in GRANT option of MySQL</title>
		<link>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/</link>
		<comments>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/#comments</comments>
		<pubDate>Wed, 25 May 2011 10:27:19 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[cPanel]]></category>
		<category><![CDATA[Howtos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[cPanel server backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1841</guid>
		<description><![CDATA[We had this particular requirement of creating a database user to be used to backup only the cPanel databases. Only recently the database mapping has been introduced by cPanel which allows the clients to create databases without the _ . However on all our client servers, we insist to have the old style with every database has Prefixing On.

Creating the database user to backup only the cPanel databases, means matching the databases with an underscore (_) in its name and that resulted in this particular SQL command to be executed as root user.

[bash]GRANT ALL PRIVILEGES ON `%\_%`.* TO `cpdbbackups`@`re.mo.te.ip` IDENTIFIED ...]]></description>
			<content:encoded><![CDATA[<p>We had this particular requirement of creating a database user to be used to backup only the cPanel databases. Only recently the database mapping has been introduced by cPanel which allows the clients to create databases without the _ . However on all our client servers, we insist to have the old style with every database has Prefixing On.</p>
<p>Creating the database user to backup only the cPanel databases, means matching the databases with an underscore (_) in its name and that resulted in this particular SQL command to be executed as root user.</p>
<pre class="brush: bash; title: ; notranslate">GRANT ALL PRIVILEGES ON `%\_%`.* TO `cpdbbackups`@`re.mo.te.ip` IDENTIFIED BY 'p@ssw0Rd' WITH GRANT OPTION;</pre>
<p>Read more about the cPanel&#8217;s DB mapping at http://www.cpanel.net/blog/integration/2010/05/more-details-about-db-mapping.html</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Applying+wildcards+in+GRANT+option+of+MySQL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1841" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Applying+wildcards+in+GRANT+option+of+MySQL+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1841" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/05/applying-wildcards-in-grant-option-of-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL for Beginners</title>
		<link>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/</link>
		<comments>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 16:12:40 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[cPanel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[WHM]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1753</guid>
		<description><![CDATA[In this post, I'll explain some basic MySQL tips that would be very useful for beginners

<strong>Reset MySQL root password</strong>

Log in as Root and Stop the MySQL daemon. Then Start the MySQL daemon and skip the grant tables which store the passwords.

[bash]# /etc/init.d/mysql stop[/bash]

[bash]# mysqld_safe --skip-grant-tables[/bash]

[bash]# mysql -u root[/bash]

[bash]mysql&#62; use mysql;[/bash]

Now you should be able to connect to mysql without a password. If not, it might be some other issues. Execute the command to reset the password

[bash]mysql&#62; update user set Password=PASSWORD('new-password') where user='root';
mysql&#62; flush privileges;
mysql&#62; exit[/bash]

After this you need to kill the running mysqld and restart it normally.

<strong>Creation of MySQL database, ...]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll explain some basic MySQL tips that would be very useful for beginners</p>
<p><strong>Reset MySQL root password</strong></p>
<p>Log in as Root and Stop the MySQL daemon. Then Start the MySQL daemon and skip the grant tables which store the passwords.</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql stop</pre>
<pre class="brush: bash; title: ; notranslate"># mysqld_safe --skip-grant-tables</pre>
<pre class="brush: bash; title: ; notranslate"># mysql -u root</pre>
<pre class="brush: bash; title: ; notranslate">mysql&gt; use mysql;</pre>
<p>Now you should be able to connect to mysql without a password. If not, it might be some other issues. Execute the command to reset the password</p>
<pre class="brush: bash; title: ; notranslate">mysql&gt; update user set Password=PASSWORD('new-password') where user='root';
mysql&gt; flush privileges;
mysql&gt; exit</pre>
<p>After this you need to kill the running mysqld and restart it normally.</p>
<p><strong>Creation of MySQL database, user and access rights</strong></p>
<p>It should be very easy to create a database through cpanel or some other panel. But if you are on your own with only Shell access, try this :</p>
<pre class="brush: bash; title: ; notranslate"># mysql -u root -p
 mysql&gt; use mysql;
 mysql&gt; INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES  ('%','databasename','username','Y','Y','Y','Y','Y','N');
 mysql&gt; flush privileges;
</pre>
<p>Or you can use</p>
<pre class="brush: bash; title: ; notranslate">
mysql&gt; grant all privileges on databasename.* to username@localhost;
mysql&gt; flush privileges;
</pre>
<p><strong>MySQLdump and Restore</strong></p>
<p>The <strong>mysqldump</strong> client is a database backup.  It can be used to dump a         database or a collection of databases for backup or transfer to         another SQL server (not necessarily a MySQL server). The dump         typically contains SQL statements to create the table, populate         it, or both.</p>
<p>Creating a Mysqldump is quite easy. If you know the database name, say database :</p>
<pre class="brush: bash; title: ; notranslate"># mysqldump database &gt; database.sql</pre>
<p>When restoring a Database, make sure you login as the user. In other words, do not restore a database with root privileges. It may cause real damage. Assuming that you are logged in as the user</p>
<pre class="brush: bash; title: ; notranslate">&lt;strong&gt; &lt;/strong&gt;
mysql&gt; use dbname; //Which is the database which the backup has to be restored to
mysql &gt; source olddb.sql; //Backup
</pre>
<p><strong>Repair a corrupted Database</strong></p>
<p>Switch to the database directory which is having issues with, Like :</p>
<pre class="brush: bash; title: ; notranslate"># cd /var/lib/mysql/database</pre>
<p>Stop the MySQL server</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql stop</pre>
<p>Check the tables</p>
<pre class="brush: bash; title: ; notranslate"># myisamchk *.MYI</pre>
<p>Repair the tables</p>
<pre class="brush: bash; title: ; notranslate"># myisamchk -r *.MYI</pre>
<p>Start the MySQL server</p>
<pre class="brush: bash; title: ; notranslate"># /etc/init.d/mysql start</pre>
<p><strong>phpMyadmin</strong></p>
<p>phpMyAdmin is an open source tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can perform various tasks such as creating, modifying or deleting databases, tables, fields or rows; executing SQL statements; or managing users and permissions.</p>
<p>If you are having a cPanel or WHM interface, its quite easy to manage a database. In cPanel interface, go to Databases section</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/cpanel_phpmyadmin.png" class="thickbox no_icon" rel="gallery-1753" title="cpanel_phpmyadmin"><img class="alignnone size-full wp-image-1770" title="cpanel_phpmyadmin" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/cpanel_phpmyadmin.png" alt="" width="513" height="114" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/whm_phpmyadmin.png" class="thickbox no_icon" rel="gallery-1753" title="whm_phpmyadmin"><img class="alignnone size-large wp-image-1772" title="whm_phpmyadmin" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/whm_phpmyadmin-1024x191.png" alt="" width="500" height="110" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/phpmyadmin_main.png" class="thickbox no_icon" rel="gallery-1753" title="phpmyadmin_main"><img class="alignnone size-medium wp-image-1775" title="phpmyadmin_main" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/phpmyadmin_main-300x127.png" alt="" width="500" height="250" /></a></p>
<p>This is the main phpMyadmin page.</p>
<p>In WHM, at SQL Services you can perform a variety of options. As mentioned earlier, the database repair option (for corrupted databases) can be performed here also. Access the option &#8216;Repair a Database&#8217;</p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/02/repair_db_pma.png" class="thickbox no_icon" rel="gallery-1753" title="repair_db_pma"><img class="alignnone size-medium wp-image-1774" title="repair_db_pma" src="http://www.supportsages.com/blog/wp-content/uploads/2011/02/repair_db_pma-300x77.png" alt="" width="500" height="120" /></a></p>
<p>Select the Database name and Click Repair Database.</p>
<p>These are quite simple tasks associated with MySQL operations.</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=MySQL+for+Beginners+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1753" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=MySQL+for+Beginners+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1753" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/02/mysql-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mail Protocols &#8211; IMAP and POP</title>
		<link>http://www.supportsages.com/blog/2011/01/mail-protocols-imap-and-pop/</link>
		<comments>http://www.supportsages.com/blog/2011/01/mail-protocols-imap-and-pop/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 14:01:18 +0000</pubDate>
		<dc:creator>vince</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[protcols]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=1720</guid>
		<description><![CDATA[This blog explains about IMAP and POP protocols]]></description>
			<content:encoded><![CDATA[<p>Most of the core Internet users should have heard of the E-mail Protocols &#8211; POP3 and IMAP. In this post, I&#8217;ll explain the concepts.</p>
<p><strong>IMAP</strong></p>
<p>Internet Message Access Protocol (IMAP) is an Application Layer Internet Protocol. It listens to Port 143. IMAP allows a user to access E-mail which is stored on a Remote Server. IMAP is used to retrieve messages from a Mail server. In IMAP mode, Multiple E-mail clients can interact to the same account on the server, from anywhere. Also, E-mail clients can talk to multiple servers. Its upto the E-mail client who decides about the storage of messages &#8211; either locally or leave them on the server.</p>
<p>IMAP is currently the most desired Mail protocol used since it has many advantages over POP3. They are :</p>
<p>1) Continuous mode of Connection : Using IMAP a client can interact with the Mail server throughout, whereas using POP, this would be impossible. POP connects to the server for the retrieval of new messages. With an IMAP connection, as long as the User interface is active, it connects to the server and download content.</p>
<p>2) Multiple mailboxes : IMAP clients can create, remove, rename mailboxes in the server and allowed to move messages between the folders.</p>
<p>3) Simultaneous Connection : POP allows only one client (currently connected one) to the mail server, whereas IMAP allows multiple clients simultaneously connected to the server and manage it. Changes made by the clients will be updated concurrently.</p>
<p><strong>IMAP Telnet Commands</strong></p>
<p>In this section, I would like to explain how an E-mail account can be managed through Telnet. The real domain name and IP has been masked <img src='http://www.supportsages.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>Before we go, there is one more thing to explain. Since IMAP allows multiple connections, we need to type a command tag before we enter the actual command. This could be anything &#8211; like a period (.) or numbers or alphabets. The server will respond with the command tag we entered, indicating the connection we use. For example &#8211; I have used a period (.)  and the server will respond with the . tag along with the output of commands. If another user inputs the command tag as 1 or a then the server will bind its response with the command tag 1 or a.</p>
<pre class="brush: bash; title: ; notranslate">

a list &quot;&quot; &quot;*&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Trash&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.test44&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Junk&quot;
* LIST (\Unmarked \HasChildren) &quot;.&quot; &quot;INBOX&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Sent&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Drafts&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.test_imap&quot;
a OK LIST completed
</pre>
<p>Note that the command tag &#8216;a&#8217; is added to the response returned by the server, in the rest of the blog, I&#8217;ll be using .<span id="more-1720"></span></p>
<pre class="brush: bash; title: ; notranslate"># telnet example.com 143
Trying xx.xxx.xxx.xxx...
Connected to example.com.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc.  See COPYING for distribution information.

. login test77@example.com qwe123#$    // Login using E-mail and Password</pre>
<p><em><strong>List</strong></em></p>
<p>The List command displays all mailboxes on the server. The argument &#8220;&#8221; &#8220;*&#8221; displays all the mailboxes including sub folders.</p>
<pre class="brush: bash; title: ; notranslate">. list &quot;&quot; &quot;*&quot;                                                      // List all folders,
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Trash&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Junk&quot;
* LIST (\Unmarked \HasChildren) &quot;.&quot; &quot;INBOX&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Sent&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Drafts&quot;
. OK LIST completed</pre>
<p><em><strong>Status</strong></em></p>
<p>The Status command return some basic information on the folder (without accessing it), the following command returns the information about INBOX.</p>
<pre class="brush: bash; title: ; notranslate">. status INBOX (messages)
* STATUS &quot;INBOX&quot; (MESSAGES 0)
. OK STATUS Completed.</pre>
<p><em><strong>Select and Examine</strong></em></p>
<p>The Select command return the information about the folder specified, further allowing to access Mails inside it. Select returns a Read-Write reference of the folder where Examine returns a Read-only reference of the folder.</p>
<pre class="brush: bash; title: ; notranslate">. select INBOX                        // Selecting Inbox
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1294991877] Ok
* OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
. OK [READ-WRITE] Ok

. examine INBOX.Drafts                // Examines Drafts
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ()] No permanent flags permitted
* 2 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1294992205] Ok
* OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
. OK [READ-ONLY] Ok</pre>
<p><strong><em>Fetch</em></strong></p>
<p>Fetch command is used to access E-mails. It has many options based upon what we choose to see. The avaialble options are to see Headers, Message Flags, Body Text.</p>
<pre class="brush: bash; title: ; notranslate">
. fetch 1 all                        // Fetch first draft
* 1 FETCH (FLAGS (\Draft \Seen) INTERNALDATE &quot;14-Jan-2011 13:33:25 +0530&quot; RFC822.SIZE 267 ENVELOPE (&quot;Fri, 14 Jan 2011 13:33:25 +0530&quot; NIL ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;testaccount&quot; &quot;gmail.com&quot;)) NIL NIL NIL NIL))
. OK FETCH completed.

. fetch 2 all
* 2 FETCH (FLAGS (\Draft \Seen) INTERNALDATE &quot;14-Jan-2011 13:38:05 +0530&quot; RFC822.SIZE 354 ENVELOPE (&quot;Fri, 14 Jan 2011 13:38:05 +0530&quot; &quot;TESTING IMAP COMMANDS TELNET&quot; ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;example.com&quot;)) ((NIL NIL &quot;testaccount&quot; &quot;gmail.com&quot;)) ((NIL NIL &quot;supportsages&quot; &quot;gmail.com&quot;)) NIL NIL NIL))
. OK FETCH completed.

. fetch 1 BODY[]                   // Fetch complete message
Return-path:
Envelope-to: test77@example.com
Delivery-date: Sat, 15 Jan 2011 16:49:00 +0530
Received: from mail-iw0-f169.google.com ([209.85.214.169])
by varuna.eglueweb.com with esmtps (TLSv1:RC4-MD5:128)
(Exim 4.69)
(envelope-from )
id 1Pe49s-0002rL-GE
for test77@example.com; Sat, 15 Jan 2011 16:49:00 +0530
Received: by iwn40 with SMTP id 40so3450323iwn.14
for ; Sat, 15 Jan 2011 03:18:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:date:message-id:subject:from:to
:content-type;
bh=B0Luob/bjcCckrFJ65OJ/jYZYzofzMPfMMnoH9qYRks=;
b=pPOO38Xpmst6rAWSXYSHzwyTXkYcormyjX+5+msdml2QZFJ5ezdEkqOYz8CyQTnc0y
Y3Y1NPgixK/qiZFhzYaYZcNznRkAHQmPKWHD+BHqIReqMGeC0VYn0NpIOdXradWF2gNx
Q+SP+FjVVl2uPDRru573Hen2TaJUCOd2jVFws=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:date:message-id:subject:from:to:content-type;
b=Jga7prO4D9cX54WvYYRo2ABvHCepe9QjWCyOz6QrqbjwKhk4pTDGAfKcgD6ztsc7BR
yWpAL3NKASoZ1TzYvP9PmOV7Qik7IRNiV2An3JZJJIRZKrCdnVak9zBp92KdJr2bIjwp
/+kbKg7ViTBYmKfRFPhyw7id4BfLvjY0WmljE=
MIME-Version: 1.0
Received: by 10.231.199.196 with SMTP id et4mr1855641ibb.71.1295090336833;
Sat, 15 Jan 2011 03:18:56 -0800 (PST)
Received: by 10.231.14.4 with HTTP; Sat, 15 Jan 2011 03:18:56 -0800 (PST)
Date: Sat, 15 Jan 2011 16:48:56 +0530
Message-ID:
Subject: Linux Terminal
From: support team
To: test77@example.com
Content-Type: multipart/alternative; boundary=90e6ba53a4f47aa2e40499e0b764
X-Spam-Status: No, score=-1.0
X-Spam-Score: -9
X-Spam-Bar: -
X-Spam-Flag: NO

--90e6ba53a4f47aa2e40499e0b764
Content-Type: text/plain; charset=ISO-8859-1

Terminal

--90e6ba53a4f47aa2e40499e0b764
Content-Type: text/html; charset=ISO-8859-1

Terminal

--90e6ba53a4f47aa2e40499e0b764--
)
. OK FETCH completed.

. create INBOX.test3                    // Create a Folder in INBOX
. OK &quot;INBOX.test3&quot; created.

. list &quot;&quot; &quot;*&quot;                            // Examine Inbox to verify existence of test3
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Trash&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Junk&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.test3&quot;
* LIST (\Unmarked \HasChildren) &quot;.&quot; &quot;INBOX&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Sent&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Drafts&quot;
. OK LIST completed

. examine INBOX.Sent                    // Examine Sent Mails folder
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS ()] No permanent flags permitted
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1294992150] Ok
* OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
. OK [READ-ONLY] Ok

. fetch 2 (body[header.fields (from to subject date)])            // Reading E-mail 1 with specific portions in Sent Folder
* 1 FETCH (BODY[HEADER.FIELDS (&quot;from&quot; &quot;to&quot; &quot;subject&quot; &quot;date&quot;)] {102}
Date: Fri, 14 Jan 2011 13:33:25 +0530
From: test77@example.com
To: testaccount@gmail.com

)
. OK FETCH completed.

. rename INBOX.test3 INBOX.test_imap    // Rename test 3 to test_imap
. OK Folder renamed.

. list &quot;&quot; &quot;*&quot;                            // To verify the rename process
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Trash&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Junk&quot;
* LIST (\Unmarked \HasChildren) &quot;.&quot; &quot;INBOX&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Sent&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.Drafts&quot;
* LIST (\HasNoChildren) &quot;.&quot; &quot;INBOX.test_imap&quot;
. OK LIST completed

. idle                            // Enter Idle mode to listen for new messages
+ entering idle mode
* 1 FETCH (FLAGS (\Seen))
* 2 EXISTS
* 1 RECENT
. done
</pre>
<p><em><strong>Store</strong></em></p>
<p>This command is used to set flags for messages. The flags can be like Answered, Flagged, Draft, Deleted, Seen and Junk. This flags will help us in understanding the message status. These are the ways in storing the message flags :</p>
<p>STORE message +flags [flag list]  &#8211; Adds the [flag list] flags to the chosen messages.<br />
STORE message -flags [flag list]  &#8211; Removes the [flag list] flags from the chosen messages.<br />
STORE message flags [flag list]  &#8211; Resets the flags to [flag list] on the chosen messages (the same as removing all flags and then adding [flag list].</p>
<pre class="brush: bash; title: ; notranslate">
. select INBOX

. store 1:2 flags \Deleted                // Sets the flag as Deleted for first 2 messages
* 1 FETCH (FLAGS (\Deleted))
* 2 FETCH (FLAGS (\Deleted))
. OK STORE completed.

. fetch 1 all                        // Fetch message 1 (See the flag deleted)
* 1 FETCH (FLAGS (\Deleted) INTERNALDATE &quot;15-Jan-2011 10:50:17 +0530&quot; RFC822.SIZE 2127 ENVELOPE (&quot;Sat, 15 Jan 2011 10:50:12 +0530&quot; &quot;Test Message&quot; ((&quot;support team&quot; NIL &quot;examplesupport&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;egluewebdemo.com&quot;)) NIL NIL NIL &quot;&lt;AANLkTim2ssdyyPEqt+fWKQ6zB6scR7jFKJvwzL=gd2r4@mail.gmail.com&gt;&quot;))
. OK FETCH completed.

. store 1 +flags NonJunk
* FLAGS (NonJunk \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (NonJunk \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 1 FETCH (FLAGS (\Deleted NonJunk))
. OK STORE completed.

. fetch 1 all
* 1 FETCH (FLAGS (\Deleted NonJunk) INTERNALDATE &quot;15-Jan-2011 10:50:17 +0530&quot; RFC822.SIZE 2127 ENVELOPE (&quot;Sat, 15 Jan 2011 10:50:12 +0530&quot; &quot;Test Message&quot; ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;egluewebdemo.com&quot;)) NIL NIL NIL &quot;&lt;AANLkTim2ssdyyPEqt+fWKQ6zB6scR7jFKJvwzL=gd2r4@mail.gmail.com&gt;&quot;))
. OK FETCH completed.
</pre>
<p><em><strong>Copy</strong></em></p>
<p>This command is used to copy a message from one folder to another</p>
<pre class="brush: bash; title: ; notranslate">
. select INBOX                    //Select Inbox
* FLAGS (NonJunk \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (NonJunk \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 3 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1294991877] Ok
* OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
. OK [READ-WRITE] Ok

. copy 1 INBOX.test_imap            //Copy First message to INBOX.test_imap
. OK [COPYUID 1295001279 1 1] COPY completed.

. select INBOX.test_imap            //Verify the message is copied to INBOX.test_imap
* FLAGS (NonJunk \Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (NonJunk \* \Draft \Answered \Flagged \Deleted \Seen)] Limited
* 1 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1295001279] Ok
* OK [MYRIGHTS &quot;acdilrsw&quot;] ACL
. OK [READ-WRITE] Ok
</pre>
<p><em><strong>Close and Expunge</strong></em></p>
<p>Both commands will permanently delete a message with the label &#8216;\deleted&#8217; (which is set for deletion). The difference is that Expunge command removes a message, while Close command removes the message as well as deselect the current folder. We&#8217;ll need to select a folder for any further operation.</p>
<pre class="brush: bash; title: ; notranslate">
. select INBOX
. expunge                    // Start Expunge
* 1 EXPUNGE
* 0 EXISTS
* 0 RECENT
* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited
. OK EXPUNGE completed

. fetch 1 all                // Current folder is still INBOX, Not deselected.
* 1 FETCH (FLAGS (\Deleted NonJunk) INTERNALDATE &quot;15-Jan-2011 10:50:17 +0530&quot; RFC822.SIZE 2127 ENVELOPE (&quot;Sat, 15 Jan 2011 10:50:12 +0530&quot; &quot;Test Message&quot; ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((&quot;support team&quot; NIL &quot;
&lt;pre&gt;examplesupport&lt;/pre&gt;
&quot; &quot;gmail.com&quot;)) ((NIL NIL &quot;test77&quot; &quot;egluewebdemo.com&quot;)) NIL NIL NIL &quot;&lt;AANLkTim2ssdyyPEqt+fWKQ6zB6scR7jFKJvwzL=gd2r4@mail.gmail.com&gt;&quot;))
. OK FETCH completed.

. close                //  Close Mailbox
. OK mailbox closed.

. fetch 1 all            // To verify that the current folder has been deselected.
. NO Error in IMAP command received by server.
</pre>
<p><em><strong>Logout</strong></em></p>
<p>This is the Logout command</p>
<pre class="brush: bash; title: ; notranslate">
. logout                // Logout
. OK LOGOUT completed
Connection closed by foreign host.
</pre>
<p><strong>POP</strong></p>
<p>Post Office Protocol (POP) is an Application-layer Internet standard protocol used by E-mail clients to retrieve e-mail from a remote server. POP connects to the mail server for the E-mail client, download all messages to the PC, then delete all messages from the server and then disconnects. POP3 listens to Port 110. Advantages of POP3 are :</p>
<p>1) In Single User mode, you can rely on POP3, since it downloads all E-mails from the server and further erases it.</p>
<p>2) Since the E-mails are stored in your PC, you can access your mails without being connected to the Internet.</p>
<p>3) Handling Mail attachments are quite easy, because they will be downloaded to the PC while downloading E-mails.</p>
<p>4) There is no maximum size of your mailbox, its virtually the storage capacity of your machine !</p>
<p><strong>POP3 Telnet Commands</strong></p>
<pre class="brush: bash; title: ; notranslate"># telnet example.com 110
Trying xx.xxx.xxx.xxx...
Connected to example.com.
Escape character is '^]'.
+OK Hello there.
USER test77@example.com
+OK Password required.
PASS qwe123#$
+OK logged in.</pre>
<p><strong>STAT</strong></p>
<p>It responds with the OK message with the number of messages and the total size of messages in bytes</p>
<pre class="brush: bash; title: ; notranslate">STAT

+OK 2 4994
</pre>
<p><strong>LIST</strong></p>
<p>It responds with the lists a line for each message with its number and size in bytes.</p>
<pre class="brush: bash; title: ; notranslate">LIST
+OK POP3 clients that break here, they violate STD53.
1 2103
2 2891
</pre>
<p><strong>RETR </strong><br />
It can be used to Retrieve messages, please note that not all POP3 servers support this. The syntax is RETR #messageid (RETR 2103)</p>
<p><strong>TOP</strong><br />
It lists the header for #messageid and the first #lines of the message. For example, TOP 1 0 would list the headers (only) for Message 1, where as TOP 1 6 would list the headers and first 6 lines of the message. This is not supported in all POP3 servers</p>
<p><strong>DELE</strong><br />
This marks the #messageid for deletion. The message is removed when the QUIT command is issued. DELE 1 will delete first message</p>
<p><strong>RSET</strong><br />
This unmarks or resets the messages set for removal.</p>
<p><strong>QUIT</strong><br />
This deletes the messages set for deletion and logs out of the server.</p>
<pre class="brush: bash; title: ; notranslate">QUIT
+OK Bye-bye.</pre>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/01/imap.png" class="thickbox no_icon" rel="gallery-1720" title="imap"><img class="alignnone size-full wp-image-1730" title="imap" src="http://www.supportsages.com/blog/wp-content/uploads/2011/01/imap.png" alt="" width="387" height="566" /></a></p>
<p><a  href="http://www.supportsages.com/blog/wp-content/uploads/2011/01/pop.png" class="thickbox no_icon" rel="gallery-1720" title="pop"><img class="alignnone size-full wp-image-1729" title="pop" src="http://www.supportsages.com/blog/wp-content/uploads/2011/01/pop.png" alt="" width="378" height="561" /></a></p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=Mail+Protocols+-+IMAP+and+POP+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1720" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=Mail+Protocols+-+IMAP+and+POP+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F1720" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2011/01/mail-protocols-imap-and-pop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

