<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Kojiroh's technical blogs</title>
	<atom:link href="http://kojiroh.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kojiroh.wordpress.com</link>
	<description>Kojiroh's technical weblog</description>
	<lastBuildDate>Thu, 05 Jan 2012 07:24:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kojiroh.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Kojiroh's technical blogs</title>
		<link>http://kojiroh.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kojiroh.wordpress.com/osd.xml" title="Kojiroh&#039;s technical blogs" />
	<atom:link rel='hub' href='http://kojiroh.wordpress.com/?pushpress=hub'/>
		<item>
		<title>How to Enable Audit Trail in CentOS/RHEL</title>
		<link>http://kojiroh.wordpress.com/2011/12/09/how-to-enable-audit-trail-in-centos/</link>
		<comments>http://kojiroh.wordpress.com/2011/12/09/how-to-enable-audit-trail-in-centos/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 09:57:11 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=172</guid>
		<description><![CDATA[Intrusions can take place from both authorized (insiders) and unauthorized (outsiders) users. My personal experience shows that unhappy user can damage the system, especially when they have a shell access. Some users are little smart and removes history file (such as ~/.bash_history) but you can monitor all user executed commands. It is recommended that you &#8230; <a href="http://kojiroh.wordpress.com/2011/12/09/how-to-enable-audit-trail-in-centos/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=172&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Intrusions can take place from both authorized (insiders) and unauthorized (outsiders) users. My personal experience shows that unhappy user can damage the system, especially when they have a shell access. Some users are little smart and removes history file (such as ~/.bash_history) but you can monitor all user executed commands.</p>
<p>It is recommended that you log user activity using process accounting. Process accounting allows you to view every command executed by a user including CPU and memory time. With process accounting sys admin always find out which command executed at what time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The psacct package contains several utilities for monitoring process activities, including ac, lastcomm, accton and sa.</p>
<ul>
<li>The <strong>ac</strong> command displays statistics about how long users have been logged on.</li>
<li>The <strong>lastcomm</strong> command displays information about previous executed commands.</li>
<li>The <strong>accton</strong> command turns process accounting on or off.</li>
<li>The <strong>sa</strong> command summarizes information about previously executed commmands.</li>
</ul>
<h3>Task: Install psacct or acct package</h3>
<p><code># yum install psacct</code></p>
<h3>Task: Start psacct/acct service</h3>
<p>You need to start psacct service manually. Type the following two commands to create /var/account/pacct file and start services:<br />
<code># chkconfig psacct on<br />
# /etc/init.d/psacct start<br />
</code><br />
Now let us see how to utilize these utilities to monitor user commands and time.</p>
<h3>Task: Display statistics about users&#8217; connect time</h3>
<p>ac command prints out a report of connect time in hours based on the logins/logouts. A total is also printed out. If you type ac without any argument it will display total connect time:<br />
<code>$ ac</code></p>
<p><code></code>Output:</p>
<pre>total       95.08</pre>
<p>Display totals for each day rather than just one big total at the end:<br />
<code>$ ac -d</code></p>
<p><code></code>Output:</p>
<pre>Nov  1  total        8.65
Nov  2  total        5.70
Nov  3  total       13.43
Nov  4  total        6.24
Nov  5  total       10.70
Nov  6  total        6.70
Nov  7  total       10.30
.....
..
...
Nov 12  total        3.42
Nov 13  total        4.55
Today   total        0.52</pre>
<p>Display time totals for each user in addition to the usual everything-lumped-into-one value:<br />
<code>$ ac -p</code></p>
<p><code></code>Output:</p>
<pre>        vivek                             87.49
        root                                 7.63
        total       95.11</pre>
<h3>Task: find out information about previously executed user commands</h3>
<p>Use lastcomm command which print out information about previously executed commands. You can search command using usernames, tty names, or by command names itself.</p>
<p>Display command executed by vivek user:<br />
<code>$ lastcomm vivek</code></p>
<p><code></code>Output:</p>
<pre>userhelper        S   X vivek  pts/0      0.00 secs Mon Nov 13 23:58
userhelper        S     vivek  pts/0      0.00 secs Mon Nov 13 23:45
rpmq                    vivek  pts/0      0.01 secs Mon Nov 13 23:45
rpmq                    vivek  pts/0      0.00 secs Mon Nov 13 23:45
rpmq                    vivek  pts/0      0.01 secs Mon Nov 13 23:45
gcc                     vivek  pts/0      0.00 secs Mon Nov 13 23:45
which                   vivek  pts/0      0.00 secs Mon Nov 13 23:44
bash               F    vivek  pts/0      0.00 secs Mon Nov 13 23:44
ls                      vivek  pts/0      0.00 secs Mon Nov 13 23:43
rm                      vivek  pts/0      0.00 secs Mon Nov 13 23:43
vi                      vivek  pts/0      0.00 secs Mon Nov 13 23:43
ping              S     vivek  pts/0      0.00 secs Mon Nov 13 23:42
ping              S     vivek  pts/0      0.00 secs Mon Nov 13 23:42
ping              S     vivek  pts/0      0.00 secs Mon Nov 13 23:42
cat                     vivek  pts/0      0.00 secs Mon Nov 13 23:42
netstat                 vivek  pts/0      0.07 secs Mon Nov 13 23:42
su                S     vivek  pts/0      0.00 secs Mon Nov 13 23:38</pre>
<p>For each entry the following information is printed. Take example of first output line:<br />
<code>userhelper S X vivek pts/0 0.00 secs Mon Nov 13 23:58</code><br />
Where,</p>
<ul>
<li>userhelper is command name of the process</li>
<li>S and X are flags, as recorded by the system accounting routines. Following is the meaning of each flag:</li>
<ul>
<li>S &#8212; command executed by super-user</li>
<li>F &#8212; command executed after a fork but without a following exec</li>
<li>D &#8212; command terminated with the generation of a core file</li>
<li>X &#8212; command was terminated with the signal SIGTERM</li>
</ul>
<li>vivek the name of the user who ran the process</li>
<li>prts/0 terminal name</li>
<li>0.00 secs &#8211; time the process exited</li>
</ul>
<p>Search the accounting logs by command name:<br />
<code>$ lastcomm rm<br />
$ lastcomm passwd</code></p>
<p><code></code>Output:</p>
<pre>rm                S     root     pts/0      0.00 secs Tue Nov 14 00:39
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:39
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:38
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:38
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:36
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:36
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:35
rm                S     root     pts/0      0.00 secs Tue Nov 14 00:35
rm                      vivek    pts/0      0.00 secs Tue Nov 14 00:30
rm                      vivek    pts/1      0.00 secs Tue Nov 14 00:30
rm                      vivek    pts/1      0.00 secs Tue Nov 14 00:29
rm                      vivek    pts/1      0.00 secs Tue Nov 14 00:29</pre>
<p>Search the accounting logs by terminal name pts/1<br />
<code>$ lastcomm pts/1</code></p>
<h3>Task: summarizes accounting information</h3>
<p>Use sa command to print summarizes information about previously executed commands. In addition, it condenses this data into a summary file named savacct which contains the number of times the command was called and the system resources used. The information can also be summarized on a per-user basis; sa will save this iinformation into a file named usracct.<br />
<code># sa</code></p>
<p><code></code>Output:</p>
<pre>     579     222.81re       0.16cp     7220k
       4       0.36re       0.12cp    31156k   up2date
       8       0.02re       0.02cp    16976k   rpmq
       8       0.01re       0.01cp     2148k   netstat
      11       0.04re       0.00cp     8463k   grep
      18     100.71re       0.00cp    11111k   ***other*
       8       0.00re       0.00cp    14500k   troff
       5      12.32re       0.00cp    10696k   smtpd
       2       8.46re       0.00cp    13510k   bash
       8       9.52re       0.00cp     1018k   less</pre>
<p>Take example of first line:<br />
<code>4 0.36re 0.12cp 31156k up2date</code><br />
Where,</p>
<ul>
<li><strong>0.36re</strong> &#8221;real time&#8221; in wall clock minutes</li>
<li><strong>0.12cp</strong> sum of system and user time in cpu minutes</li>
<li><strong>31156k </strong>cpu-time averaged core usage, in 1k units</li>
<li><strong>up2date</strong> command name</li>
</ul>
<p>Display output per-user:<br />
<code># sa -u</code></p>
<p><code></code>Output:</p>
<pre>root       0.00 cpu      595k mem accton
root       0.00 cpu    12488k mem initlog
root       0.00 cpu    12488k mem initlog
root       0.00 cpu    12482k mem touch
root       0.00 cpu    13226k mem psacct
root       0.00 cpu      595k mem consoletype
root       0.00 cpu    13192k mem psacct           *
root       0.00 cpu    13226k mem psacct
root       0.00 cpu    12492k mem chkconfig
postfix    0.02 cpu    10696k mem smtpd
vivek      0.00 cpu    19328k mem userhelper
vivek      0.00 cpu    13018k mem id
vivek      0.00 cpu    13460k mem bash             *
lighttpd   0.00 cpu    48240k mem php              *</pre>
<p>Display the number of processes and number of CPU minutes on a per-user basis<br />
<code># sa -m</code></p>
<p><code></code>Output:</p>
<pre>                                      667     231.96re       0.17cp     7471k
root                                  544      51.61re       0.16cp     7174k
vivek                                 103      17.43re       0.01cp     8228k
postfix                                18     162.92re       0.00cp     7529k
lighttpd                                2       0.00re       0.00cp    48536k</pre>
<h3>Task: Find out who is eating CPU</h3>
<p>By looking at re, k, cp/cpu (see above for output explanation) time you can find out suspicious activity or the name of user/command who is eating up all CPU. An <strong>increase in CPU/memory usage</strong> (command) is indication of problem.</p>
<p>Please note that above commands and packages also available on other UNIX like oses such as Sun Solaris and *BSD oses.</p>
<p>Reference:<br />
<a href="http://www.cyberciti.biz/tips/howto-log-user-activity-using-process-accounting.html">http://www.cyberciti.biz/tips/howto-log-user-activity-using-process-accounting.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=172&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/12/09/how-to-enable-audit-trail-in-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Exclude a File from HTTP Basic Authentication</title>
		<link>http://kojiroh.wordpress.com/2011/12/09/how-to-exclude-a-file-from-http-basic-authentication/</link>
		<comments>http://kojiroh.wordpress.com/2011/12/09/how-to-exclude-a-file-from-http-basic-authentication/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 03:47:05 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=168</guid>
		<description><![CDATA[To exclude a file from Apache&#8217;s HTTP Basic Authentication, edit the configuration file (/etc/httpd/conf/httpd.conf or .htpasswd) and add the following: AuthUserFile /path/to/passwd AuthName &#8220;Authorization Required&#8221; AuthType Basic require valid-user Satisfy Any Allow from all Reference: http://stackoverflow.com/questions/3865374/http-basic-auth-exclude-single-file<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=168&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To exclude a file from Apache&#8217;s HTTP Basic Authentication, edit the configuration file (/etc/httpd/conf/httpd.conf or .htpasswd)<br />
and add the following:</p>
<blockquote><p>AuthUserFile /path/to/passwd<br />
AuthName &#8220;Authorization Required&#8221;<br />
AuthType Basic<br />
require valid-user</p>
<p>Satisfy Any<br />
Allow from all</p></blockquote>
<p>Reference:</p>
<p>http://stackoverflow.com/questions/3865374/http-basic-auth-exclude-single-file</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=168&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/12/09/how-to-exclude-a-file-from-http-basic-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting 301 redirect for index.html page</title>
		<link>http://kojiroh.wordpress.com/2011/12/07/setting-301-redirect-for-index-html-page/</link>
		<comments>http://kojiroh.wordpress.com/2011/12/07/setting-301-redirect-for-index-html-page/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 03:52:46 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=165</guid>
		<description><![CDATA[Our client wants to have 301 redirect for index.html page. So http://www.website.com/products/index.html will be redirected to http://www.website.com/products/ To achieve this, make sure Apache&#8217;s Rewrite module is enabled and then add the following line in /etc/httpd/conf/httpd.conf: RewriteRule ^/products/index\.html$ /products/ [R=301] Run /sbin/service httpd reload for it to make effect<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=165&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Our client wants to have 301 redirect for index.html page.<br />
So http://www.website.com/products/index.html will be redirected to http://www.website.com/products/<br />
To achieve this, make sure Apache&#8217;s Rewrite module is enabled and then add the following line in /etc/httpd/conf/httpd.conf:</p>
<p>RewriteRule ^/products/index\.html$ /products/ [R=301]</p>
<p>Run /sbin/service httpd reload for it to make effect</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/165/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/165/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/165/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=165&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/12/07/setting-301-redirect-for-index-html-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing ClamAV on CentOS 5</title>
		<link>http://kojiroh.wordpress.com/2011/12/01/installing-clamav-on-centos-5/</link>
		<comments>http://kojiroh.wordpress.com/2011/12/01/installing-clamav-on-centos-5/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 10:46:37 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=158</guid>
		<description><![CDATA[There are few known viruses in Linux compared to Windows, but since users are uploading content to the Linux servers from time to time, it is better to be vigilant and to seek and destroy those on the server. We can install ClamAV on Linux servers since it is a fast, free and efficient. Installing &#8230; <a href="http://kojiroh.wordpress.com/2011/12/01/installing-clamav-on-centos-5/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=158&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are few known viruses in Linux compared to Windows, but since users are uploading content to the Linux servers from time to time, it is better to be vigilant and to seek and destroy those on the server. We can install ClamAV on Linux servers since it is a fast, free and efficient.</p>
<p><strong>Installing ClamAV (64-bit)</strong><br />
1. Download the file using wget<br />
$ sudo wget http://pkgs.repoforge.org/clamav/clamav-0.97.3-1.el5.rf.x86_64.rpm<br />
$ sudo wget http://pkgs.repoforge.org/clamav/clamav-db-0.97.3-1.el5.rf.x86_64.rpm</p>
<p>2. Install the packages<br />
$ sudo rpm -ivh clamav-*.rpm</p>
<p>Now that we have it installed there are a few things we need to learn about it and do. First thing is to update the definitions. We achieve this by running the command <em>freshclam</em>. Freshclam requires and Internet connection to download and update the virus definitions. All you have to do is type the command, press enter and voila! We are up to date.</p>
<p><strong>Running Antivirus Scanning Manually</strong><br />
To run antivirus and print infected files on /home:<br />
clamscan -ri /home</p>
<p>To run antivirus and remove infected files on /home:<br />
clamscan -ri &#8211;remove /home</p>
<p><strong>Automating Antivirus Scanning</strong><br />
It is a good security practice to have regular antivirus scanning on the system.<br />
To automate the scanning, just edit /etc/crontab and add the following at the bottom:</p>
<p>0 5 * * * root clamscan -ri /|mail -s &#8220;ClamScan Result for <em>servername</em>&#8221; <em>youremail@address.com</em></p>
<p>This will make ClamAV to run daily at 5.00 AM and send the scan result to <em>youremail@address.com</em>.<br />
The anti virus database has been set to be updated daily  so there is no need to configure it.</p>
<p>Reference:<br />
<a href="http://linuxforeverything.com/wordpress/?p=106">ClamAV on CentOS 5.5</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=158&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/12/01/installing-clamav-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to check the number of concurrent connection in SharePoint 2010</title>
		<link>http://kojiroh.wordpress.com/2011/11/30/how-to-check-the-number-of-concurrent-connection-in-sharepoint-201/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/30/how-to-check-the-number-of-concurrent-connection-in-sharepoint-201/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 09:05:41 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=154</guid>
		<description><![CDATA[You can use the following PowerShell script to check the number of concurrent connection in SharePoint 2010 function Get-WebServiceConnections() { $results = @{} $perfmon = new-object System.Diagnostics.PerformanceCounter $perfmon.CategoryName = "Web Service" $perfmon.CounterName = "Current Connections" $cat = new-object System.Diagnostics.PerformanceCounterCategory("Web Service") $instances = $cat.GetInstanceNames() foreach ($instance in $instances) { $perfmon.InstanceName = $instance $results.Add($instance, $perfmon.NextValue()) } write-output &#8230; <a href="http://kojiroh.wordpress.com/2011/11/30/how-to-check-the-number-of-concurrent-connection-in-sharepoint-201/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=154&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You can use the following PowerShell script to check the number of concurrent connection in SharePoint 2010</p>
<pre>
function Get-WebServiceConnections()
{
  $results = @{}
  $perfmon = new-object System.Diagnostics.PerformanceCounter
  $perfmon.CategoryName = "Web Service"

  $perfmon.CounterName = "Current Connections"

  $cat = new-object System.Diagnostics.PerformanceCounterCategory("Web Service")
  $instances = $cat.GetInstanceNames()

  foreach ($instance in $instances)

  {
    $perfmon.InstanceName = $instance
    $results.Add($instance, $perfmon.NextValue())
  }
write-output $results
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=154&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/30/how-to-check-the-number-of-concurrent-connection-in-sharepoint-201/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Identify which w3wp.exe belongs to which Application Pool in IIS7</title>
		<link>http://kojiroh.wordpress.com/2011/11/24/identify-which-w3wp-exe-belongs-to-which-application-pool-in-iis7/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/24/identify-which-w3wp-exe-belongs-to-which-application-pool-in-iis7/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 04:34:17 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=146</guid>
		<description><![CDATA[If Windows Task manager shows excessive resource usage (CPU or memory, mostly) for an IIS 7 worker process (w3wp.exe), it’s helpful to identify which of your application pools consumes the resources. I haven’t found a way to accomplish this in IIS Manager so I proceeded like so: At the command prompt: net start WAS Note: &#8230; <a href="http://kojiroh.wordpress.com/2011/11/24/identify-which-w3wp-exe-belongs-to-which-application-pool-in-iis7/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=146&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If Windows Task manager shows excessive resource usage (CPU or memory, mostly) for an IIS 7 worker process (w3wp.exe), it’s helpful to identify which of your application pools consumes the resources. I haven’t found a way to accomplish this in IIS Manager so I proceeded like so:</p>
<p>At the command prompt:</p>
<p><strong>net start WAS</strong></p>
<p>Note: WAS is the Windows Process Activation Service (btw, pretty silly service name, as it’s nigh impossible to google for WAS).</p>
<p>Run appcmd list wp:</p>
<p><strong>C:\Windows\system32&gt;%windir%/system32/inetsrv/appcmd list wp<br />
</strong>WP “5716″ (applicationPool:DefaultAppPool)<br />
WP “968″ (applicationPool:MyOtherAppPool)<br />
WP “5836″ (applicationPool:TheThirdAppPool)</p>
<p>The number in the results is the process ID in the results is the Windows process ID (PID).</p>
<p>Now in Windows Task Manager, after having enabled the PID column in View&gt;Select Columns… you can identify the offending w3wp.exe by its PID.</p>
<p>&nbsp;</p>
<p>Reference:<br />
<a href="http://dirk.net/2008/06/01/identify-which-w3wpexe-belongs-to-which-application-pool-in-iis7/">Identify which w3wp.exe belongs to which Application Pool in IIS7</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/146/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/146/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/146/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=146&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/24/identify-which-w3wp-exe-belongs-to-which-application-pool-in-iis7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Redirect HTTP to HTTPS with Exceptions</title>
		<link>http://kojiroh.wordpress.com/2011/11/23/how-to-redirect-http-to-https-with-exception/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/23/how-to-redirect-http-to-https-with-exception/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 12:40:07 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[WAMP]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=144</guid>
		<description><![CDATA[We have a requirement to redirect HTTP to HTTPS but we want to exclude image files from the redirection. First of all, make sure mod_rewrite is enabled in Apache; in other words, make sure that /etc/httpd/conf/httpd.conf contains the line: LoadModule rewrite_module modules/mod_rewrite.so Backup httpd.conf before you add the following: Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} &#8230; <a href="http://kojiroh.wordpress.com/2011/11/23/how-to-redirect-http-to-https-with-exception/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=144&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We have a requirement to redirect HTTP to HTTPS but we want to exclude image files from the redirection.<br />
First of all, make sure mod_rewrite is enabled in Apache; in other words, make sure that <em>/etc/httpd/conf/httpd.conf</em> contains the line:</p>
<blockquote><p>LoadModule rewrite_module modules/mod_rewrite.so</p></blockquote>
<p>Backup <em>httpd.conf</em> before you add the following:</p>
<blockquote><p>Options +FollowSymlinks<br />
RewriteEngine on<br />
RewriteCond %{REQUEST_FILENAME} !^(.+)\.png$<br />
RewriteCond %{REQUEST_FILENAME} !^(.+)\.jpg$<br />
RewriteCond %{REQUEST_FILENAME} !^(.+)\.gif$<br />
RewriteCond %{SERVER_PORT} !^443$<br />
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]</p></blockquote>
<p>Reference:</p>
<p>http://corz.org/serv/tricks/htaccess2.php</p>
<p>http://wiki.apache.org/httpd/RewriteCond</p>
<p>http://www.whoopis.com/howtos/apache-rewrite.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=144&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/23/how-to-redirect-http-to-https-with-exception/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Find the longest running queries on MS SQL Server</title>
		<link>http://kojiroh.wordpress.com/2011/11/16/find-the-longest-running-queries-on-ms-sql-server/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/16/find-the-longest-running-queries-on-ms-sql-server/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 12:45:51 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[MS SQL Server]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=138</guid>
		<description><![CDATA[The following SQL query will report the top 10 longest running queries. The time is in milliseconds. select distinct top 10 substring(t.text, (s.statement_start_offset/2)+1, (((case s.statement_end_offset when -1 then datalength(t.text) else s.statement_end_offset end) &#8211; s.statement_start_offset)/2) + 1) as SqlText , (case when s.statement_start_offset &#62; 0 then substring(t.text, 0, (s.statement_start_offset/2)+1) else &#8221; end) as SqlParameters , s.execution_count as &#8230; <a href="http://kojiroh.wordpress.com/2011/11/16/find-the-longest-running-queries-on-ms-sql-server/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=138&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following SQL query will report the top 10 longest running queries.<br />
The time is in milliseconds.</p>
<p>select distinct top 10<br />
substring(t.text, (s.statement_start_offset/2)+1, (((case s.statement_end_offset when -1 then datalength(t.text) else s.statement_end_offset end) &#8211; s.statement_start_offset)/2) + 1) as SqlText<br />
, (case when s.statement_start_offset &gt; 0 then substring(t.text, 0, (s.statement_start_offset/2)+1) else &#8221; end) as SqlParameters<br />
, s.execution_count as ExecutionCount<br />
, (s.max_elapsed_time/1000) as MaxElapsedTimeMs<br />
, (s.min_elapsed_time/1000) as MinElapsedTimeMs<br />
, isnull((s.total_elapsed_time/1000) / nullif(s.execution_count, 0), 0) as AvgElapsedTimeMs<br />
, s.creation_time as LogCreatedOn<br />
, s.last_execution_time as LastExecutionTime<br />
, isnull(s.execution_count / nullif(datediff(s, s.creation_time, getdate()), 0), 0) as FrequencyPerSec<br />
from<br />
sys.dm_exec_query_stats as s<br />
cross apply<br />
sys.dm_exec_sql_text(s.sql_handle) as t<br />
order by<br />
isnull((s.total_elapsed_time/1000) / nullif(s.execution_count, 0), 0) desc</p>
<p>Reference:<br />
<a href="http://blog.pengoworks.com/index.cfm/2009/1/2/Find-the-longest-running-queries-on-your-MSSQL-2005-Server">dans.blog</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/138/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/138/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/138/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=138&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/16/find-the-longest-running-queries-on-ms-sql-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving/copying SharePoint Site</title>
		<link>http://kojiroh.wordpress.com/2011/11/16/moving-copying-sharepoint-site/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/16/moving-copying-sharepoint-site/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 09:57:17 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=130</guid>
		<description><![CDATA[1. Make sure the destination web application and site collection have been setup for the destination site. 2. Open command prompt 3. Backup source site with the following command: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe -o backup -url http://www.source.com/ -filename d:\source_backup.bak 4. Restore it to the destination site with the following command (the existing site &#8230; <a href="http://kojiroh.wordpress.com/2011/11/16/moving-copying-sharepoint-site/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=130&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<pre>1. Make sure the destination web application and site collection have been setup for the destination site.
2. Open command prompt
3. Backup source site with the following command:
       C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe -o backup -url http://www.source.com/ -filename <em>d:\source_backup.bak</em>
4. Restore it to the destination site with the following command (the existing site will be overwritten):
       C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe -o restore -url http://www.destination.com/ -filename <em>d:\source_backup.bak</em> -overwrite</pre>
<p>If you encounter an error, you may need to deploy solution (WSP). Please see http://sharepointfoundation2010.blogspot.com/2010/09/how-to-deploy-solution-wsp-from.html<br />
Copying web.config may also necessary.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/130/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/130/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/130/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=130&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/16/moving-copying-sharepoint-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
		<item>
		<title>Select Date Query Between Date Range in MySQL</title>
		<link>http://kojiroh.wordpress.com/2011/11/02/select-date-query-between-date-range-in-mysql/</link>
		<comments>http://kojiroh.wordpress.com/2011/11/02/select-date-query-between-date-range-in-mysql/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 02:59:13 +0000</pubDate>
		<dc:creator>ivangoh</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://kojiroh.wordpress.com/?p=124</guid>
		<description><![CDATA[Query to  select data between 01-10-2011 and 31-10-2011 select * from table WHERE creation_date BETWEEN STR_TO_DATE('01-10-2011', '%d-%m-%Y') AND STR_TO_DATE('31-10-2011', '%d-%m-%Y') Query to  select data between 01-11-2011 0900 hours and 02-11-2011 0800 hours select * from table WHERE creation_date BETWEEN STR_TO_DATE('01-11-2011 09:00:00', '%d-%m-%Y %H:%i:%s') AND STR_TO_DATE('02-11-2011 08:00:00', '%d-%m-%Y %H:%i:%s')<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=124&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Query to  select data between 01-10-2011 and 31-10-2011</p>
<pre>select * from <em>table</em> WHERE <em>creation_date</em> BETWEEN STR_TO_DATE('01-10-2011', '%d-%m-%Y') AND STR_TO_DATE('31-10-2011', '%d-%m-%Y')</pre>
<p>Query to  select data between 01-11-2011 0900 hours and 02-11-2011 0800 hours</p>
<pre>select * from table WHERE creation_date BETWEEN STR_TO_DATE('01-11-2011 09:00:00', '%d-%m-%Y %H:%i:%s') AND STR_TO_DATE('02-11-2011 08:00:00', '%d-%m-%Y %H:%i:%s')</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kojiroh.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kojiroh.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kojiroh.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kojiroh.wordpress.com&amp;blog=399704&amp;post=124&amp;subd=kojiroh&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kojiroh.wordpress.com/2011/11/02/select-date-query-between-date-range-in-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58ded49c73a837f3f515036b168206a4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ivangoh</media:title>
		</media:content>
	</item>
	</channel>
</rss>
