<?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>ByteChemist &#187; System Administration</title>
	<atom:link href="http://www.bytechemist.com/category/system-administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bytechemist.com</link>
	<description></description>
	<lastBuildDate>Sun, 18 Oct 2009 22:50:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using SCP to transfer files</title>
		<link>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/</link>
		<comments>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 08:17:11 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scp]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=16</guid>
		<description><![CDATA[Using SCP is a great way to transfer files from one machine to another. SCP uses SSH and can move files to/from localhost remotehost or remotehost remotehost. SCP Syntax: localhost -> remotehost scp /path/to/source-file user@host:/path/to/destination-file SCP Syntax: remotehost -> remotehost scp user@src-host:/path/to/src-file user@dest-host:/path/to/dest-file SCP Examples scp file.txt mydomain.com:~/mydir/file.txt &#160; scp local_dir/filename myname@host1:remote_dir &#160; scp local_dir/* [...]]]></description>
			<content:encoded><![CDATA[<p>Using SCP is a great way to transfer files from one machine to another.  SCP uses SSH and can move files to/from localhost <-> remotehost or remotehost <-> remotehost.</p>
<p><strong>SCP Syntax: localhost -> remotehost</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>source-file user<span style="color: #000000; font-weight: bold;">@</span>host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>destination-file</pre></div></div>

<p><strong>SCP Syntax: remotehost -> remotehost</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> user<span style="color: #000000; font-weight: bold;">@</span>src-host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>src-file user<span style="color: #000000; font-weight: bold;">@</span>dest-host:<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>dest-file</pre></div></div>

<p><strong>SCP Examples</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> file.txt mydomain.com:~<span style="color: #000000; font-weight: bold;">/</span>mydir<span style="color: #000000; font-weight: bold;">/</span>file.txt
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> local_dir<span style="color: #000000; font-weight: bold;">/</span>filename myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> local_dir<span style="color: #000000; font-weight: bold;">/*</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir<span style="color: #000000; font-weight: bold;">/</span>filename .
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">scp</span> myname<span style="color: #000000; font-weight: bold;">@</span>host1:remote_dir<span style="color: #000000; font-weight: bold;">/</span>filename  myname<span style="color: #000000; font-weight: bold;">@</span>host2:another_dir</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/08/13/using-scp-to-transfer-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use cron and ntpdate to keep your linux server&#8217;s time updated</title>
		<link>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/</link>
		<comments>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 03:02:59 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=27</guid>
		<description><![CDATA[To sync your linux server&#8217;s time with the NTP Pool Time Servers, use the following command. ntpdate pool.ntp.org If you&#8217;d like to sync with a time server weekly, add a new file named ntpdate-sync to /etc/cron.weekly. Then set the file permissions to 755 and set owner:group to root:root. Finally, exit set the file contents to [...]]]></description>
			<content:encoded><![CDATA[<p>To sync your linux server&#8217;s time with the <a href="http://support.ntp.org/bin/view/Servers/NTPPoolServers">NTP Pool Time Servers</a>, use the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ntpdate pool.ntp.org</pre></div></div>

<p>If you&#8217;d like to sync with a time server weekly, add a new file named ntpdate-sync to /etc/cron.weekly.  Then set the file permissions to 755 and set owner:group to root:root.  Finally, exit set the file contents to the following.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate pool.ntp.org</pre></div></div>

<p>To sync on a custom schedule, add a new file named ntpdate-sync to /etc/cron.d.  Then set the file permissions to 644 and set owner:group to root:root.  Finally set the file contents as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># /etc/cron.d/ntpdate-sync: crontab fragment for ntpdate</span>
<span style="color: #666666; font-style: italic;"># Run ntpdate at 2:30AM on the first of every month</span>
<span style="color: #000000;">30</span> <span style="color: #000000;">2</span> <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> root <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ntpdate <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">tee</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>cron<span style="color: #000000; font-weight: bold;">/</span>ntpdate-sync.log</pre></div></div>

<p><strong>Update &#8211; 10/18/09</strong><br />
Changed custom schedule cron example from once every 15 minutes to once per month.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/06/25/use-cron-and-ntpdate-to-keep-your-linux-servers-time-updated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using SVN copy to branch or tag within a repository</title>
		<link>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/</link>
		<comments>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 19:45:44 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/?p=23</guid>
		<description><![CDATA[To &#8220;branch&#8221; or &#8220;tag&#8221; within a repository, use svn copy. The syntax is simple. svn copy &#123;SRC&#125; &#123;DST&#125; The source and destination can be either a working copy path or full URL in any combination. So to tag a revision from trunk the following command could be used. svn copy --username myusername --password mypassword http://domain.com/svn/trunk [...]]]></description>
			<content:encoded><![CDATA[<p>To &#8220;branch&#8221; or &#8220;tag&#8221; within a repository, use svn copy.  The syntax is simple.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> copy <span style="color: #7a0874; font-weight: bold;">&#123;</span>SRC<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>DST<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>The source and destination can be either a working copy path or full URL in any combination.  So to tag a revision from trunk the following command could be used.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> copy <span style="color: #660033;">--username</span> myusername <span style="color: #660033;">--password</span> mypassword http:<span style="color: #000000; font-weight: bold;">//</span>domain.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>trunk http:<span style="color: #000000; font-weight: bold;">//</span>domain.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>tag<span style="color: #000000; font-weight: bold;">/</span>0.1.1332 <span style="color: #660033;">-m</span> <span style="color: #ff0000;">&quot;commit message&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2009/03/22/using-svn-copy-to-branch-or-tag-within-a-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recover the MySQL Root Password in Linux</title>
		<link>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/</link>
		<comments>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 23:06:05 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/</guid>
		<description><![CDATA[Step 1 &#8211; At the linux shell, stop the current mysqld process, start the mysqld_safe process with &#8211;skip-grant-tables switch and login as root (no password). /etc/init.d/mysql stop mysqld_safe --skip-grant-tables &#38; mysql -u root Step 2 &#8211; At the mysql shell set the root password and flush privileges. USE mysql; UPDATE user SET password=PASSWORD&#40;&#34;new-password-here&#34;&#41; WHERE User='root'; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Step 1</strong> &#8211; At the linux shell, stop the current mysqld process, start the mysqld_safe process with &#8211;skip-grant-tables switch and login as root (no password).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop
mysqld_safe <span style="color: #660033;">--skip-grant-tables</span> <span style="color: #000000; font-weight: bold;">&amp;</span>
mysql <span style="color: #660033;">-u</span> root</pre></div></div>

<p><strong>Step 2</strong> &#8211; At the mysql shell set the root password and flush privileges.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">USE</span> mysql<span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #000099;">user</span> <span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #000099;">password</span><span style="color: #CC0099;">=</span><span style="color: #000099;">PASSWORD</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">&quot;new-password-here&quot;</span><span style="color: #FF00FF;">&#41;</span> <span style="color: #990099; font-weight: bold;">WHERE</span> <span style="color: #000099;">User</span><span style="color: #CC0099;">=</span><span style="color: #008000;">'root'</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span>
QUIT<span style="color: #000033;">;</span></pre></div></div>

<p><strong>Step 3</strong> &#8211; Back at the linux shell stop the mysqld_safe process and start the normal mysqld process.  At this point you should be able to successfully login as root using the password from Step 2.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql stop
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql start
mysql <span style="color: #660033;">-u</span> root <span style="color: #660033;">-p</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/recover-the-mysql-root-password-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set MySQL Root Password</title>
		<link>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/</link>
		<comments>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 22:45:11 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/set-mysql-root-password/</guid>
		<description><![CDATA[To reset the MySQL root password, login to the mysql shell and run the following commands. SET PASSWORD FOR root@localhost=PASSWORD&#40;'RootPasswordHere'&#41;; FLUSH PRIVILEGES;]]></description>
			<content:encoded><![CDATA[<p>To reset the MySQL root password, login to the mysql shell and run the following commands.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #000099;">PASSWORD</span> FOR root@localhost<span style="color: #CC0099;">=</span><span style="color: #000099;">PASSWORD</span><span style="color: #FF00FF;">&#40;</span><span style="color: #008000;">'RootPasswordHere'</span><span style="color: #FF00FF;">&#41;</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/set-mysql-root-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grant MySQL Privileges</title>
		<link>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/</link>
		<comments>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 22:41:32 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/</guid>
		<description><![CDATA[To grant all privileges to a user from any location login to the mysql shell and run the following queries. GRANT ALL PRIVILEGES ON *.* TO username@localhost IDENTIFIED BY 'PasswordHere' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO username@&#34;%&#34; IDENTIFIED BY 'PasswordHere' WITH GRANT OPTION; FLUSH PRIVILEGES;]]></description>
			<content:encoded><![CDATA[<p>To grant all privileges to a user from any location login to the mysql shell and run the following queries.</p>

<div class="wp_syntax"><div class="code"><pre class="mysql" style="font-family:monospace;"><span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">ALL</span> <span style="color: #990099; font-weight: bold;">PRIVILEGES</span> <span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #CC0099;">*</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span> username@localhost IDENTIFIED BY <span style="color: #008000;">'PasswordHere'</span> <span style="color: #990099; font-weight: bold;">WITH</span> <span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">OPTION</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">ALL</span> <span style="color: #990099; font-weight: bold;">PRIVILEGES</span> <span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #CC0099;">*</span>.<span style="color: #CC0099;">*</span> <span style="color: #990099; font-weight: bold;">TO</span> username@<span style="color: #008000;">&quot;<span style="color: #008080; font-weight: bold;">%</span>&quot;</span> IDENTIFIED BY <span style="color: #008000;">'PasswordHere'</span> <span style="color: #990099; font-weight: bold;">WITH</span> <span style="color: #990099; font-weight: bold;">GRANT</span> <span style="color: #990099; font-weight: bold;">OPTION</span><span style="color: #000033;">;</span>
FLUSH <span style="color: #990099; font-weight: bold;">PRIVILEGES</span><span style="color: #000033;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/30/grant-mysql-privileges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Cache Control using mod_expires with Expires By Type</title>
		<link>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/</link>
		<comments>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:14:54 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/</guid>
		<description><![CDATA[Use Apache&#8217;s mod_expires to explicitly set the expiration of a file by it&#8217;s type. This will enable to browser to cache these static assets and greatly increase performance. &#60;IfModule mod_expires.c&#62; ExpiresActive on ExpiresDefault &#34;now&#34; ExpiresByType text/html &#34;now&#34; ExpiresByType text/xml &#34;now&#34; ExpiresByType text/css &#34;access plus 8 hours&#34; ExpiresByType text/plain &#34;access plus 8 hours&#34; ExpiresByType application/x-javascript &#34;access [...]]]></description>
			<content:encoded><![CDATA[<p>Use Apache&#8217;s mod_expires to explicitly set the expiration of a file by it&#8217;s type.  This will enable to browser to cache these static assets and greatly increase performance.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>IfModule mod_expires.c<span style="color: #000000; font-weight: bold;">&gt;</span>
    ExpiresActive on
    ExpiresDefault <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>html <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>xml <span style="color: #ff0000;">&quot;now&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>css <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType text<span style="color: #000000; font-weight: bold;">/</span>plain <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>x-javascript <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>x-shockwave-flash <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType application<span style="color: #000000; font-weight: bold;">/</span>pdf <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>gif <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>png <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>jpeg <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType image<span style="color: #000000; font-weight: bold;">/</span>x-icon <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType video<span style="color: #000000; font-weight: bold;">/</span>x-flv <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
    ExpiresByType video<span style="color: #000000; font-weight: bold;">/</span>quicktime <span style="color: #ff0000;">&quot;access plus 8 hours&quot;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/06/27/apache-cache-control-using-mod_expires-with-expires-by-type/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Rsync over SSH</title>
		<link>http://www.bytechemist.com/2008/01/10/using-rsync-over-ssh/</link>
		<comments>http://www.bytechemist.com/2008/01/10/using-rsync-over-ssh/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 04:42:02 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/01/10/using-rsync-over-ssh/</guid>
		<description><![CDATA[Prerequisites First make sure that you are able to login to the remote host using ssh key authentication. Basic Syntax To sync files from a local directory to a remote directory use the following syntax: rsync &#123;options&#125; -e ssh &#123;source&#125; &#123;dest&#125; Example Here is an example that exclude all .psd and .fla files: rsync --exclude [...]]]></description>
			<content:encoded><![CDATA[<h4>Prerequisites</h4>
<p>
First make sure that you are able to login to the remote host using <a href="/2008/01/08/ssh-login-using-public-key-authentication/" title="SSH Login Using Public Key Authentication">ssh key authentication</a>.
</p>
<h4>Basic Syntax</h4>
<p>
To sync files from a local directory to a remote directory use the following syntax:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #7a0874; font-weight: bold;">&#123;</span>options<span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #660033;">-e</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">source</span><span style="color: #7a0874; font-weight: bold;">&#125;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>dest<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

</p>
<h4>Example</h4>
<p>
Here is an example that exclude all .psd and .fla files:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rsync <span style="color: #660033;">--exclude</span> <span style="color: #000000; font-weight: bold;">*</span>.psd \
        <span style="color: #660033;">--exclude</span> <span style="color: #000000; font-weight: bold;">*</span>.fla \
        <span style="color: #660033;">-avz</span> <span style="color: #660033;">-e</span> <span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>dir<span style="color: #000000; font-weight: bold;">/</span> user<span style="color: #000000; font-weight: bold;">@</span>remotehost:<span style="color: #000000; font-weight: bold;">/</span>remote<span style="color: #000000; font-weight: bold;">/</span>dir<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/01/10/using-rsync-over-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using tar and gzip to Compress Files and Directories</title>
		<link>http://www.bytechemist.com/2008/01/09/using-tar-and-gzip-to-compress-files-and-directories/</link>
		<comments>http://www.bytechemist.com/2008/01/09/using-tar-and-gzip-to-compress-files-and-directories/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 22:04:00 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://www.bytechemist.com/2008/01/09/using-tar-and-gzip-to-compress-files-and-directories/</guid>
		<description><![CDATA[Create and Compress and Archive Archive a group of files: tar -czvf archive.tar.gz file1 file2 file3 Archive an entire directory: tar -czvf archive.tar.gz directory/ Extract a Compressed Archive tar -xzvf archive.tar.gz List the Contents of a Compressed Archive tar -tzvf archive.tar.gz Common tar Switches -c create a new archive -x extract files from an archive [...]]]></description>
			<content:encoded><![CDATA[<h4>Create and Compress and Archive</h4>
<h5>Archive a group of files:</h5>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-czvf</span> archive.tar.gz file1 file2 file3</pre></div></div>

<h5>Archive an entire directory:</h5>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-czvf</span> archive.tar.gz directory<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<h4>Extract a Compressed Archive</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-xzvf</span> archive.tar.gz</pre></div></div>

<h4>List the Contents of a Compressed Archive</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-tzvf</span> archive.tar.gz</pre></div></div>

<h4>Common tar Switches</h4>
<ul>
<li><code>-c</code> create a new archive</li>
<li><code>-x</code> extract files from an archive</li>
<li><code>-t</code> list the contents of an archive</li>
<li><code>-z</code> filter the archive through gzip</li>
<li><code>-v</code> verbosely list files processed</li>
<li><code>-f</code> filename of the archive (filename must always immediately follow)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/01/09/using-tar-and-gzip-to-compress-files-and-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Login Using Public Key Authentication</title>
		<link>http://www.bytechemist.com/2008/01/08/ssh-login-using-public-key-authentication/</link>
		<comments>http://www.bytechemist.com/2008/01/08/ssh-login-using-public-key-authentication/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 05:36:38 +0000</pubDate>
		<dc:creator>CHEMiST</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www-bytechemist-com.hal.pixus.lan/2008/01/08/ssh-login-using-public-key-authentication/</guid>
		<description><![CDATA[Step 1: Generate Keypair on Localmachine ssh-keygen -t dsa When prompted for a passphrase you can leave it empty to enable logging in without a password (please note that there are potential security issues with doing this). After confirming your passphrase at the second prompt you&#8217;ll find two new files (the keypair) in your ~/.ssh [...]]]></description>
			<content:encoded><![CDATA[<h4>Step 1: Generate Keypair on Localmachine</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> dsa</pre></div></div>

<p>
When prompted for a passphrase you can leave it empty to enable logging in without a password (please note that there are potential security issues with doing this).
</p>
<p>
After confirming your passphrase at the second prompt you&#8217;ll find two new files (the keypair) in your <code>~/.ssh</code> directory.  The first file <code>id_dsa</code> is your private key, the second file <code>id_dsa.pub</code> your public key.
</p>
<h4>Step 2: Set Local ~/.ssh Permissions</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh</pre></div></div>

<h4>Step 3: Copy Public Key to Remote Server</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_dsa.pub username<span style="color: #000000; font-weight: bold;">@</span>remoteserver:~<span style="color: #000000; font-weight: bold;">/</span>id_dsa.pub</pre></div></div>

<h4>Step 4: Login to Remote Server:</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> username<span style="color: #000000; font-weight: bold;">@</span>remoteserver</pre></div></div>

<h4>Step 5: Update Authorized Keys on Remote Server</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> id_dsa.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></div></div>

<h4>Step 6: Set Remote ~/.ssh Permissions</h4>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</pre></div></div>

<h4>Done!</h4>
<p>
At this point you should be able to login to the remote server without using a password.
</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> username<span style="color: #000000; font-weight: bold;">@</span>remoteserver
 - or - 
<span style="color: #c20cb9; font-weight: bold;">ssh</span> <span style="color: #660033;">-i</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_dsa username<span style="color: #000000; font-weight: bold;">@</span>remoteserver</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bytechemist.com/2008/01/08/ssh-login-using-public-key-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
