<?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>Kwatog &#38; Co &#187; Linux</title>
	<atom:link href="http://kwatog.com/category/blog/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Fri, 04 May 2012 07:34:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Suppress Error Message of cp (copy)</title>
		<link>http://kwatog.com/blog/suppress-error-message-of-cp-copy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=suppress-error-message-of-cp-copy</link>
		<comments>http://kwatog.com/blog/suppress-error-message-of-cp-copy/#comments</comments>
		<pubDate>Fri, 04 May 2012 07:34:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[cp]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[suppress message]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=762</guid>
		<description><![CDATA[There are times when you don&#8217;t need to know if the command you fired threw an error or not. That&#8217;s exactly what I needed in one of the systems I maintain. The copy command should not throw an error if there&#8217;s no file to copy. So instead of writing a number of lines for validations,&#8230;]]></description>
			<content:encoded><![CDATA[<p>There are times when you don&#8217;t need to know if the command you fired threw an error or not. That&#8217;s exactly what I needed in one of the systems I maintain. The copy command should not throw an error if there&#8217;s no file to copy. So instead of writing a number of lines for validations, I just throw the message to /dev/null. Here&#8217;s the code :</p>
<p><code>cp /path/to/file.txt /newpath/ 2> /dev/null</code></p>
<p>Source : existing codes <img src='http://kwatog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/suppress-error-message-of-cp-copy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove WordPress Maintenance Mode</title>
		<link>http://kwatog.com/blog/remove-wp-maintenance-mode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=remove-wp-maintenance-mode</link>
		<comments>http://kwatog.com/blog/remove-wp-maintenance-mode/#comments</comments>
		<pubDate>Sat, 03 Mar 2012 16:22:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=756</guid>
		<description><![CDATA[Sometimes, upgrades fail at some point for some reason. That will leave your site in maintenance mode and unusable. That&#8217;s the &#8220;Briefly Unavailable for Scheduled Maintenance&#8221; that we see while the upgrade is on-going or if it fails. So how do we get out of the maintenance mode? The Fix The fix is as simple&#8230;]]></description>
			<content:encoded><![CDATA[<p>Sometimes, upgrades fail at some point for some reason. That will leave your site in maintenance mode and unusable. That&#8217;s the &#8220;Briefly Unavailable for Scheduled Maintenance&#8221; that we see while the upgrade is on-going or if it fails. So how do we get out of the maintenance mode?<br />
<span id="more-756"></span></p>
<h3>The Fix</h3>
<p>The fix is as simple as deleting the file named .maintenance in the root folder of the site. You can delete the file via your favorite ftp or ssh client. </p>
<h3>The Reason</h3>
<p>During upgrade, WordPress creates a .maintenance file in the root folder. This file is removed after the upgrade is finished. </p>
<p>Source:<br />
WordPress Codex</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/remove-wp-maintenance-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Get The First File in Unix</title>
		<link>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-get-the-first-file-in-unix</link>
		<comments>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 07:20:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=721</guid>
		<description><![CDATA[In case you are looking files using ls or find command and only want to get the first file found, the command would be like. ls -l /any/path/filename*&#124;sed -e 's///,/g'&#124;awk -F "," '{print $NF}'&#124;head -1 Of course, you can also use it in find command. find /any/path/ -name "filename*" -type f&#124;sed -e 's///,/g'&#124;awk -F ","&#8230;]]></description>
			<content:encoded><![CDATA[<p>In case you are looking files using ls or find command and only want to get the first file found, the command would be like.<br />
<code><br />
ls -l /any/path/filename*|sed -e 's///,/g'|awk -F "," '{print $NF}'|head -1<br />
</code></p>
<p>Of course, you can also use it in find command.</p>
<p><code><br />
find /any/path/ -name "filename*" -type f|sed -e 's///,/g'|awk -F "," '{print $NF}'|head -1<br />
</code><br />
<span id="more-721"></span><br />
The key here is the head -1 command which limits the output to just one line. I came about this when I was investigating a problem in one of the programs that I maintain. The original code is as below.<br />
<code><br />
inputFile=`ls -l /any/path/filename*|sed -e 's///,/g'|awk -F "," '{print $NF}'`<br />
</code><br />
It looks correct, runs perfectly during testing and there seems to be no problem. However, if there&#8217;s more than one file, the variable inputFile will have multiple-line data. When used in a command, the problem starts. Basically, it was only expecting one file. When more than one file is push, inputFile should just get the first file. That&#8217;s why pipe-in another command which is the head -1. </p>
<p>In case you need the last file, then just change the head -1  to tail -1. </p>
<p>Bugs like this is hard to find. When we test or investigate, we usually use just one file to run through the whole program. And that&#8217;s what happened with this issue was raised to me. The previous developer is already pulling his hair because in order to get to that problematic line, he had to go trace it though a deep layer of shell scripts. </p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpotVPS First Impressions</title>
		<link>http://kwatog.com/blog/spotvps-first-impressions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=spotvps-first-impressions</link>
		<comments>http://kwatog.com/blog/spotvps-first-impressions/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 07:57:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NGINX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=706</guid>
		<description><![CDATA[After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It&#8217;s there where I stumbled upon a promo from SpotVPS. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET. And who are they?&#8230;]]></description>
			<content:encoded><![CDATA[<p>After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It&#8217;s there where I stumbled upon a promo from <a href="http://www.comforthost.net/billing/aff.php?aff=115">SpotVPS</a>. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET.</p>
<p>And who are they? Here&#8217;s what they say about themselves.</p>
<blockquote><p>
ComfortHost.NET have been here since 2004 offer high quality web hosting solutions. All SpotVPS nodes are fully owned hardware and are colocated. All servers used by SpotVPS have been bought with internal cash. Our only monthly cost for these servers are the actual colocation. We are financially healthy and profitable since day one. We are NOT going out of buisness any time soon. We are in it for the long run!
</p></blockquote>
<p>ComfortHost on http://www.webhostingtalk.com/showthread.php?t=1110770</p>
<p>Here&#8217;s the plan that I got.<br />
$6.99/mo Ultimate Plan<br />
Memory: 2048mb (2gb)<br />
HD Space: 50gb (50,000mb)<br />
Bandwidth: 1,000gb (1TB)<br />
Monthly Price: $6.99/mo<br />
Setup Fee: FREE!<br />
FREE GIGABIT PORT &#8211; FREE WEEKLY BACKUPS &#8211; FREE HARDWARE RAID<br />
Location: Orlando, FL at DimeNOC<br />
Test IP Address: 72.29.87.105</p>
<p>2GB RAM for $6.99. That&#8217;s sweet. Want to try it yourself? <a href="http://www.comforthost.net/billing/aff.php?aff=115">ORDER NOW</a></p>
<p>Word of caution,though. This plan (and all other dirt-cheap vps that I know of) comes with very limited support. You are usually given your VPS, IP and OS install and you have to do the rest. I installed mine with NGiNx, PHP, MySQL and it&#8217;s already up and running for 7 days straight now. </p>
<p>Here&#8217;s the result of the test I made on my VPS.<br />
<code><br />
[root@vps ~]# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync<br />
16384+0 records in<br />
16384+0 records out<br />
1073741824 bytes (1.1 GB) copied, 14.9939 seconds, 71.6 MB/s</p>
<p>[root@vps ~]# wget cachefly.cachefly.net/100mb.test<br />
--2011-11-24 18:10:35-- http://cachefly.cachefly.net/100mb.test<br />
Resolving cachefly.cachefly.net... 205.234.175.175<br />
Connecting to cachefly.cachefly.net|205.234.175.175|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 104857600 (100M) [application/octet-stream]<br />
Saving to: `100mb.test'</p>
<p>100%[==============================================================================================================================>] 104,857,600 66.8M/s in 1.5s<br />
2011-11-24 18:10:36 (66.8 MB/s) - `100mb.test' saved [104857600/104857600]<br />
</code></p>
<p>I&#8217;ll try to come up with a review together with my other hosting providers. <img src='http://kwatog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/spotvps-first-impressions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Install Setacl in Linux</title>
		<link>http://kwatog.com/blog/how-to-install-setacl-in-linux/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-install-setacl-in-linux</link>
		<comments>http://kwatog.com/blog/how-to-install-setacl-in-linux/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 05:50:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[getacl]]></category>
		<category><![CDATA[getfacl]]></category>
		<category><![CDATA[setacl]]></category>
		<category><![CDATA[setfacl]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=661</guid>
		<description><![CDATA[First, there&#8217;s no setacl in Linux. Instead, it has setfacl. Take note of the f. Second, setfacl is part of the access control list(acl) package so we install the acl intead of setfacl. In that way, we also install getfacl. Here&#8217;s how. yum -y install acl Ok, that&#8217;s for CentOS and other RedHat alternatives. I&#8230;]]></description>
			<content:encoded><![CDATA[<p>First, there&#8217;s no setacl in Linux. Instead, it has setfacl. Take note of the f. Second, setfacl is part of the access control list(acl) package so we install the acl intead of setfacl. In that way, we also install getfacl.<br />
<span id="more-661"></span><br />
Here&#8217;s how.</p>
<p><code>yum -y install acl</code></p>
<p>Ok, that&#8217;s for CentOS and other RedHat alternatives. I believe it is <code>sudo apt-get acl</code> for Debian/Ubuntu flavors.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-install-setacl-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upgrade MySQL 5.0 to 5.5 in CentOS</title>
		<link>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-upgrade-mysql-5-0-to-5-5-in-centos</link>
		<comments>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 16:19:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=651</guid>
		<description><![CDATA[I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the Pagudpud Resort&#8216;s (owned by the Jackoleros) database server, I don&#8217;t know where&#8230;]]></description>
			<content:encoded><![CDATA[<p>I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the <a href="http://pagudpud-resort.com">Pagudpud Resort</a>&#8216;s (owned by the Jackoleros) database server, I don&#8217;t know where to start. The MySQL official website suggests(or at least, that&#8217;s how I understand it) that I recompile. I know I did not recompile before so after some fruitless googling, I finally found a working version. But first, thanks to <a href="http://blog.famillecollet.com/pages/English-site-introduction">remi</a> for sharing the rpm.<br />
<span id="more-651"></span><br />
Before we proceed, I&#8217;d like to remind you that this is for <strong>MySQL 5.5.14</strong> on <strong>CentOS 5.6</strong>. My original MySQL install was 5.x. If your baseline environment is different from mine, then I suggest you look elsewhere for the tutorial. The source at the end of this post may help.</p>
<p>**** UPDATE *****<br />
The following steps require the EPEL (Extra Packages for Enterprise Linux) so you&#8217;ll have to install epel first before proceeding. Here&#8217;s the command:<br />
<code>rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm</code></p>
<p><strong>Step 1</strong> login as root to your vps</p>
<p><strong>Step 2</strong> Install Remi repository<br />
<code>rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm</code><br />
The result will something like..<br />
<code>Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm<br />
warning: /var/tmp/rpm-xfer.cVJJxn: Header V3 DSA signature: NOKEY, key ID 00f97f56<br />
Preparing...                ########################################### [100%]<br />
   1:remi-release           ########################################### [100%]</code></p>
<p><strong>Step 3</strong> Check availability of MySQL versions<br />
<code>yum --enablerepo=remi,remi-test list mysql mysql-server</code></p>
<p>the last lines of the output should be something like this.<br />
<code><br />
Available Packages<br />
mysql.i386                                5.5.14-1.el5.remi                          remi<br />
mysql-server.i386                         5.5.14-1.el5.remi                          remi<br />
[root@one ~]#<br />
</code></p>
<p><strong>Step 4</strong> Update or Install MySQL<br />
<code>yum --enablerepo=remi,remi-test install mysql mysql-server</strong></p>
<p><strong>Step 5</strong> Restart MySQL<br />
<code>service mysqld start</code></p>
<p><strong>Step 6</strong> Upgrade MySQL Databases<br />
<code>mysql_upgrade -u root -p</code></p>
<p>***** NOTE : THE LAST STEP IS VERY IMPORTANT BECAUSE IT WILL CREATE PRIVILEGE TABLES ******</p>
<p>Source :</p>
<p>http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>LAMP Install on VPS : CentOS5+Apache+MySQL+suPHP</title>
		<link>http://kwatog.com/apache/lamp-install-on-vps-centos5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lamp-install-on-vps-centos5</link>
		<comments>http://kwatog.com/apache/lamp-install-on-vps-centos5/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 15:50:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=627</guid>
		<description><![CDATA[Here&#8217;s the work-in-progress instructions for setting up a LAMP. It&#8217;s been sitting on my draft for ages and I have to publish it because a few of my friends need it. **** NOTE : If you notice, it&#8217;s still a draft. It came from a number of sources but these are the steps I use.&#8230;]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the work-in-progress instructions for setting up a LAMP. It&#8217;s been sitting on my draft for ages and I have to publish it because a few of my friends need it. </p>
<p>**** NOTE : If you notice, it&#8217;s still a draft. It came from a number of sources but these are the steps I use. So I know it works. **********</p>
<p><span id="more-627"></span></p>
<p>update apache<br />
yum -y update </p>
<p>install utilities and compiler<br />
yum -y install zip nmap fileutils gcc-c++ acl</p>
<p>install make<br />
yum -y install make</p>
<h3>MySQL Installation</h3>
<p><code><br />
yum -y install mysql mysql-devel mysql-server<br />
chkconfig --levels 235 mysqld on<br />
mysqld start<br />
/usr/bin/mysql_secure_installation<br />
</code></p>
<h3>Install PHP</h3>
<p><code>yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel<br />
</code><br />
Upgrade PHP to 5.3<br />
<code>rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm<br />
yum --enablerepo=webtatic update php</code></p>
<h3>Install ProFTP</h3>
<p><code>yum -y remove vsftpd   --to remov vsftpd if it's existing<br />
cd /tmp<br />
wget --passive-ftp ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.3e.tar.gz<br />
tar xvfz proftpd-1.3.3e.tar.gz<br />
cd proftpd-1.3.3e<br />
./configure --sysconfdir=/etc; make; make install<br />
cd /tmp; rm -rf ./proftpd-1.3.3*<br />
ln -s /usr/local/sbin/proftpd /usr/sbin/proftpd<br />
touch /etc/init.d/proftpd<br />
chmod 755 /etc/init.d/proftpd<br />
vi /etc/init.d/proftpd<br />
</code></p>
<p>Paste the following settings and then save.<br />
<code><br />
#!/bin/sh<br />
# $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $<br />
#<br />
# proftpd This shell script takes care of starting and stopping<br />
# proftpd.<br />
#<br />
# chkconfig: - 80 30<br />
# description: ProFTPD is an enhanced FTP server with a focus towards<br />
# simplicity, security, and ease of configuration.<br />
# It features a very Apache-like configuration syntax,<br />
# and a highly customizable server infrastructure,<br />
# including support for multiple 'virtual' FTP servers,<br />
# anonymous FTP, and permission-based directory visibility.<br />
# processname: proftpd<br />
# config: /etc/proftp.conf<br />
# pidfile: /var/run/proftpd.pid</p>
<p># Source function library.<br />
. /etc/rc.d/init.d/functions</p>
<p># Source networking configuration.<br />
. /etc/sysconfig/network</p>
<p># Check that networking is up.<br />
[ ${NETWORKING} = "no" ] &#038;&#038; exit 0</p>
<p>[ -x /usr/sbin/proftpd ] || exit 0</p>
<p>RETVAL=0</p>
<p>prog="proftpd"</p>
<p>start() {<br />
echo -n $"Starting $prog: "<br />
daemon proftpd<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &#038;&#038; touch /var/lock/subsys/proftpd<br />
}</p>
<p>stop() {<br />
echo -n $"Shutting down $prog: "<br />
killproc proftpd<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &#038;&#038; rm -f /var/lock/subsys/proftpd<br />
}</p>
<p># See how we were called.<br />
case "$1" in<br />
start)<br />
start<br />
;;<br />
stop)<br />
stop<br />
;;<br />
status)<br />
status proftpd<br />
RETVAL=$?<br />
;;<br />
restart)<br />
stop<br />
start<br />
;;<br />
condrestart)<br />
if [ -f /var/lock/subsys/proftpd ]; then<br />
stop<br />
start<br />
fi<br />
;;<br />
reload)<br />
echo -n $"Re-reading $prog configuration: "<br />
killproc proftpd -HUP<br />
RETVAL=$?<br />
echo<br />
;;<br />
*)<br />
echo "Usage: $prog {start|stop|restart|reload|condrestart|status}"<br />
exit 1<br />
esac</p>
<p>exit $RETVAL<br />
</code></p>
<p>vi /etc/proftpd.conf<br />
<code><br />
Group nobody<br />
DefaultRoot ~<br />
IdentLookups off<br />
ServerIdent on "FTP Server ready."<br />
</code></p>
<p>chkconfig &#8211;levels 235 proftpd on</p>
<h3>Install suPHP</h3>
<p>cd /tmp<br />
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm<br />
rpm &#8211;import http://apt.sw.be/RPM-GPG-KEY.dag.txt<br />
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm<br />
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm<br />
yum -y install htop<br />
yum -y install mod_suphp<br />
edit /etc/suphp.conf<br />
make sure these lines are there:</p>
<p>webserver_user=apache<br />
x-httpd-php=&#8221;php:/usr/bin/php-cgi&#8221;<br />
x-suphp-cgi=&#8221;execute:!self&#8221;</p>
<p> edit /etc/httpd/conf.d/suphp.conf (which is the global configuration for suPHP).<br />
vi +/suPHP_Engine /etc/httpd/conf.d/suphp.conf</p>
<p>change it to suPHP_Engine off</p>
<p>6) Set suPHP to work with VirtualHost, add these few lines inside <virtualhost> </virtualhost> tag.</p>
<p>suPHP_Engine on<br />
suPHP_UserGroup username groupname<br />
AddHandler x-httpd-php .php .php3 .php4 .php5<br />
suPHP_AddHandler x-httpd-php</p>
<p>Example :<br />
<VirtualHost 75.235.323.55:80><br />
    ServerAdmin support@yourdomain.com<br />
    DocumentRoot /usr/kitty/yourdomain.com<br />
    ServerName yourdomain.com<br />
    ServerAlias *.yourdomain.com<br />
    suPHP_Engine on<br />
    suPHP_UserGroup kitty kitty<br />
    AddHandler x-httpd-php .php .php3 .php4 .php5<br />
    suPHP_AddHandler x-httpd-php<br />
    ErrorLog logs/yourdomain.com-error_log<br />
    CustomLog logs/yourdomain.com-access_log common<br />
</VirtualHost></p>
<p>Source : <a href="http://wiki.centos.org/AdditionalResources/Repositories/RPMForge" rel="nofollow">CentOS Additional Packages</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/apache/lamp-install-on-vps-centos5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive setacl command on Linux/Unix</title>
		<link>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=recursive-setacl-command-on-linuxunix</link>
		<comments>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 09:45:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[setacl]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=591</guid>
		<description><![CDATA[Setting access control list(acl) recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below. find /any/path -exec setacl -m user:USERID:rwx {} ';' What it does is it finds all the files and directories inside the /any/path, recursively.&#8230;]]></description>
			<content:encoded><![CDATA[<p>Setting <strong>access control list(acl) </strong>recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below.<br />
<span id="more-591"></span><br />
<code><br />
find /any/path -exec setacl -m user:USERID:rwx {} ';'<br />
</code></p>
<p>What it does is it finds all the files and directories inside the /any/path, recursively. And then on each of the files/directories, it executes the the setacl command. </p>
<p>For some linux flavors, this is done simpler as below.<br />
<code><br />
setacl -Rm user:USERID:rwx<br />
</code></p>
<p>Here&#8217;s how to install setacl/setfacl &#8211;><a href="http://kwatog.com/blog/how-to-install-setacl-in-linux/">Install setacl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SubVersion Initialization Error</title>
		<link>http://kwatog.com/blog/subversion-initialization-error/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=subversion-initialization-error</link>
		<comments>http://kwatog.com/blog/subversion-initialization-error/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 08:00:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=577</guid>
		<description><![CDATA[After installing subversion, I hit some error when I tried to restart Apache. When I removed/renamed the subversion.conf and the error went away. Obviously, subversion did not work. So I investigated to find out the root cause. Here&#8217;s two of the errors I encountered. Cannot load /etc/httpd/modules/mod_dav_svn.so Invalid command &#8216;AuthUserFile&#8217; Solution Uncomment the following lines&#8230;]]></description>
			<content:encoded><![CDATA[<p>After installing subversion, I hit some error when I tried to restart Apache. When I removed/renamed the subversion.conf and the error went away. Obviously, subversion did not work. So I investigated to find out the root cause.<br />
<span id="more-577"></span><br />
Here&#8217;s two of the errors I encountered.</p>
<ol>
<li><strong>Cannot load /etc/httpd/modules/mod_dav_svn.so</strong></li>
<li><strong>Invalid command &#8216;AuthUserFile&#8217;</strong></li>
</ol>
<h3>Solution</h3>
<p>Uncomment the following lines in httpd.conf<br />
<code><br />
LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so<br />
</code></p>
<p>It turned out that I commented these files to limit the number of modules loaded on Apache. I&#8217;m only loading the bare minimum so that WordPress would run properly on my VPS.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/subversion-initialization-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install Subversion on CentOS</title>
		<link>http://kwatog.com/blog/how-to-install-subversion-on-centos/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-install-subversion-on-centos</link>
		<comments>http://kwatog.com/blog/how-to-install-subversion-on-centos/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 20:00:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://kwatog.com/?p=570</guid>
		<description><![CDATA[I finally decided to setup an online version control and chose subversion (instead of cvs which I use on my macbook). Initially, I was thinking of subscribing to github but the prospect of paying monthly did not bode well especially that it would only be me who will be updating the codes. Github has a&#8230;]]></description>
			<content:encoded><![CDATA[<p>I finally decided to setup an online version control and chose subversion (instead of cvs which I use on my macbook). Initially, I was thinking of subscribing to github but the prospect of paying monthly did not bode well especially that it would only be me who will be updating the codes. Github has a free service though. But that&#8217;s if you open-source your code.<br />
<span id="more-570"></span><br />
Ok, enough for the chatter. Here&#8217;s the steps for installing subversion.</p>
<p><strong>Step 1: Install SubVersion via yum</strong><br />
<code>yum install mod_dav_svn subversion</code></p>
<p><strong>Step 2: Edit Apache Config</strong><br />
<code>vi /etc/httpd/conf/httpd.conf</code></p>
<p>make sure to uncomment the following lines.<br />
<strong>LoadModule authn_file_module modules/mod_authn_file.so<br />
LoadModule dav_module modules/mod_dav.so<br />
</strong></p>
<p><strong>Step 3: Restart Apache</strong><br />
<code>service httpd start</code></p>
<p><strong>Step 4: Edit subversion.conf</strong><br />
<code><br />
cd /etc/httpd/conf.d/<br />
vi subversion.conf<br />
</code><br />
make sure the modules below are also uncommented<br />
LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p>
<p>Add the following to allow a basic authentication and point Apache to where the actual repository resides.<br />
<code><br />
&lt;Location /repos&gt;<br />
   DAV svn<br />
   SVNParentPath /var/www/svn/repos</p>
<p>   # Limit write permission to list of valid users.<br />
   &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
      # Require SSL connection for password protection.<br />
      # SSLRequireSSL</p>
<p>      AuthType Basic<br />
      AuthName "Authorization Realm"<br />
      AuthUserFile /etc/svn-auth-conf<br />
      Require valid-user<br />
   &lt;/LimitExcept&gt;<br />
&lt;/Location&gt;<br />
</code></p>
<p><strong>VPS ALERT!!!!</strong><br />
Since I&#8217;m using Virtual Private Server (VPS) and suPHP, I have the code below. Take note that the location is inside the VirtualHost directive.<br />
<code><br />
&lt;VirtualHost *:80&gt;<br />
    ServerAdmin support@domain.com<br />
    DocumentRoot /var/www/domain.com<br />
    ServerName domain.com<br />
    ServerAlias *.domain.com<br />
    suPHP_Engine on<br />
    suPHP_UserGroup myuser myuser<br />
    AddHandler x-httpd-php .php .php3 .php4 .php5<br />
    suPHP_AddHandler x-httpd-php<br />
    ErrorLog logs/domain.com-error_log<br />
    LogFormat "%h %l %u %t "%r" %>s %b" common<br />
    CustomLog logs/domain.com-access_log common<br />
    &lt;Location /repos&gt;<br />
      DAV svn<br />
      SVNParentPath /var/www/domain.com/repos      SetHandler repos</p>
<p>     &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
      AuthType Basic<br />
      AuthName &quot;Authorization Realm&quot;<br />
      AuthUserFile /etc/svn-auth-conf<br />
      Require valid-user<br />
    &lt;/LimitExcept&gt;</p>
<p>&lt;/Location>&gt;<br />
&lt;/VirtualHost&gt;<br />
</code><br />
<strong>Step 5: Set the Password for your Users</strong><br />
<code><br />
[root@vps ~]# htpasswd -cm /etc/svn-auth-conf yourusername<br />
New password:<br />
Re-type new password:<br />
Adding password for user yourusername<br />
[root@vps ~]# htpasswd -m /etc/svn-auth-conf anotherusername<br />
New password:<br />
Re-type new password:<br />
Adding password for user anotherusername<br />
</code></p>
<p><strong>Step 6: Create Your Repository</strong><br />
<code><br />
[root@vps ~]# cd /var/www/ -- Or wherever you placed your path above<br />
[root@vps ~]# mkdir svn<br />
[root@vps ~]# cd svn<br />
[root@vps ~]# svnadmin create repos<br />
[root@vps ~]# chown -R apache:apache repos<br />
[root@vps ~]# service httpd restart<br />
</code></p>
<hr/>
Source : http://wiki.centos.org/HowTos/Subversion</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-install-subversion-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

