<?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>Kernel-Panik.com &#187; Jorge_S</title>
	<atom:link href="http://www.kernel-panik.com/wordpress/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kernel-panik.com/wordpress</link>
	<description>science, technology, linux, howto&#039;s</description>
	<lastBuildDate>Tue, 27 Oct 2009 08:49:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>rpmforge sarg 2.2.3.1-1 x64 package bug on CentOS 5.3</title>
		<link>http://www.kernel-panik.com/wordpress/2009/07/15/rpmforge-sarg-bug-centos/</link>
		<comments>http://www.kernel-panik.com/wordpress/2009/07/15/rpmforge-sarg-bug-centos/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 07:43:56 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[rpmforge]]></category>
		<category><![CDATA[sarg]]></category>
		<category><![CDATA[segfault]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/?p=34</guid>
		<description><![CDATA[While running /etc/cron.daily/sarg against a medium size squid access.log file, this error showed on the screen of a CentOS 5.3 x64 box:
&#8220;sarg[5646]: segfault at 000000008d784200 rip 0000003280078d80 rsp 00007fff8d784d78 error 4&#8243;
After googling for a while I found this thread explaining similar problems. Apparently the current sarg rpmforge package for RHEL 5 x64 has some kind [...]]]></description>
			<content:encoded><![CDATA[<p>While running /etc/cron.daily/sarg against a medium size squid access.log file, this error showed on the screen of a CentOS 5.3 x64 box:</p>
<p style="padding-left: 30px;">&#8220;sarg[5646]: segfault at 000000008d784200 rip 0000003280078d80 rsp 00007fff8d784d78 error 4&#8243;</p>
<p>After googling for a while I found <a title="centos.org forums" href="http://www.centos.org/modules/newbb/viewtopic.php?topic_id=16303" target="_blank">this thread</a> explaining similar problems. Apparently the current sarg rpmforge package for RHEL 5 x64 has some kind of bug when dealing with long url&#8217;s. I also noticed that at the <a title="rpmforge sarg package listing" href="http://packages.sw.be/sarg/" target="_blank">rpmforge repository for sarg</a> there is a newer version, <a href="http://packages.sw.be/sarg/sarg-2.2.5-1.fc9.rf.i386.rpm">sarg-2.2.5-1</a>, but the aren&#8217;t packages for  RHEL 5 x86 x64 arquitecture, only for FC and RHEL PPC.</p>
<p>The fix is pretty simple, just uninstall the x64 version and install the i386 version. /etc/cron.daily/sarg will ran without problems after changing to the x86 version.</p>
<p>At the time  this post was written, latest rpmforge sarg packages for CentOS 5 x64 &amp; i386 were:</p>
<p style="padding-left: 30px;"><a href="http://packages.sw.be/sarg/sarg-2.2.3.1-1.el5.rf.x86_64.rpm">sarg-2.2.3.1-1.el5.rf.x86_64.rpm</a> &lt;&#8211; I was using this when I got the error</p>
<p style="padding-left: 30px;"><a href="http://packages.sw.be/sarg/sarg-2.2.3.1-1.el5.rf.i386.rpm">sarg-2.2.3.1-1.el5.rf.i386.rpm</a> &lt;&#8211; changing to this one fixed the problem</p>
<p>I did this for changing the package version:</p>
<ul>
<li>rpm -ev rpm -ev sarg-2.2.3.1-1.el5.rf</li>
<li>wget http://packages.sw.be/sarg/sarg-2.2.3.1-1.el5.rf.i386.rpm</li>
<li>yum localinstall sarg-2.2.3.1-1.el5.rf.i386.rpm</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2009/07/15/rpmforge-sarg-bug-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Information about fraudulent 2009 H1N1 Influenza Products</title>
		<link>http://www.kernel-panik.com/wordpress/2009/05/02/information-about-fraudulent-2009-h1n1-influenza-products/</link>
		<comments>http://www.kernel-panik.com/wordpress/2009/05/02/information-about-fraudulent-2009-h1n1-influenza-products/#comments</comments>
		<pubDate>Sat, 02 May 2009 11:47:59 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[FDA]]></category>
		<category><![CDATA[H1N1]]></category>
		<category><![CDATA[influenza]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/2009/05/02/information-about-fraudulent-2009-h1n1-influenza-products/</guid>
		<description><![CDATA[ScienceDaily News:
FDA, FTC Warn Public Of Fraudulent 2009 H1N1 Influenza Products 
Interesting article that alerts and inform us about the raise of fraudulent medication for the H1N1 Influenza virus.
Article gives us this very useful links:

FDA&#8217;s  web site for tips about how to protect themselves when buying medicines online: http://www.fda.gov/buyonlineguide/
Information about FDA-approved antiviral drugs for [...]]]></description>
			<content:encoded><![CDATA[<p>ScienceDaily News:</p>
<p><a title="Cience Daily: FDA, FTC Warn Public Of Fraudulent 2009 H1N1 Influenza Products" href="http://bit.ly/eCImV" target="_blank">FDA, FTC Warn Public Of Fraudulent 2009 H1N1 Influenza Products </a></p>
<p>Interesting article that alerts and inform us about the raise of fraudulent medication for the H1N1 Influenza virus.</p>
<p>Article gives us this very useful links:</p>
<ul>
<li>FDA&#8217;s  web site for tips about how to protect themselves when buying medicines online: <a title="FDA's website with tips about influenza products online" rel="nofollow" href="http://www.fda.gov/buyonlineguide/" target="_blank">http://www.fda.gov/buyonlineguide/</a></li>
<li>Information about FDA-approved antiviral drugs for  influenza: <a title="Information about FDA-approved antiviral drugs for influenza" href="http://www.fda.gov/cder/drug/antivirals/influenza/default.htm" target="_blank">http://www.fda.gov/cder/drug/antivirals/influenza/default.htm</a></li>
<li>Personal protective equipment:<a title="Personal protective equipment" rel="nofollow" href="http://www.fda.gov/cdrh/ppe/" target="_blank">http://www.fda.gov/cdrh/ppe/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2009/05/02/information-about-fraudulent-2009-h1n1-influenza-products/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XFS Filesystem performance tweaking on Linux</title>
		<link>http://www.kernel-panik.com/wordpress/2008/01/14/xfs-filesystem-performance-tweaking-on-linux/</link>
		<comments>http://www.kernel-panik.com/wordpress/2008/01/14/xfs-filesystem-performance-tweaking-on-linux/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 10:52:51 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[XFS filesystem]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kernel-panik.com]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tweak]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/2008/01/14/xfs-filesystem-tweaking-for-better-performance-tm-on-linux/</guid>
		<description><![CDATA[Some years ago I found this old but still usefull guide for xfs performance tweaking on linux:
Filesystem performance tweaking with XFS on Linux
which is, esencially, a two-steps simple procedure:




Create xfs filesystem with a 64 megabyte log  
 # mkfs.xfs -f -l size=64m /dev/hda3
Mount filesystem with 8 log buffers, and atime and diratime disabled 
 [...]]]></description>
			<content:encoded><![CDATA[<p>Some years ago I found this old but still usefull guide for xfs performance tweaking on linux:</p>
<p><a href="http://www.everything2.com/index.pl?node_id=1479435" title="http://www.everything2.com/index.pl?node_id=1479435" target="_blank">Filesystem performance tweaking with XFS on Linux</a></p>
<p>which is, esencially, a two-steps simple procedure:<br />
<span id="more-7"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-0018366203309875";
//www.kernel-panik.com 200x200 Ad unit Link
google_ad_slot = "2232429646";
google_ad_width = 200;
google_ad_height = 200;
//--></script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><font color="#999999">Create xfs filesystem with a 64 megabyte log  </font><font color="#ffff99"><br />
<font color="#339966"> # mkfs.xfs -f -l size=64m /dev/hda3</font></font></p>
<p><font color="#999999">Mount filesystem with 8 log buffers, and atime and diratime disabled </font><font color="#ffff99"><br />
<font color="#339966"> # mount -o noatime,nodiratime,logbufs=8 /dev/hda3 /mnt/gentoo/</font><br />
</font><br />
These simple tweaks do help! specially on large RAID partitions.</p>
<p><font color="#000000">- Corrections, comments, and suggestions are always welcome -</font></p>
<p>-=kp=-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2008/01/14/xfs-filesystem-performance-tweaking-on-linux/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Gentoo libexpat libexpat.so error simple fix</title>
		<link>http://www.kernel-panik.com/wordpress/2007/12/03/tip-gentoo-libexpatso-error-simple-fix/</link>
		<comments>http://www.kernel-panik.com/wordpress/2007/12/03/tip-gentoo-libexpatso-error-simple-fix/#comments</comments>
		<pubDate>Mon, 03 Dec 2007 09:26:00 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[kernel-panik.com]]></category>
		<category><![CDATA[libexpat]]></category>
		<category><![CDATA[libexpat.so]]></category>
		<category><![CDATA[support]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/2007/12/03/tip-gentoo-libexpatso-error-simple-fix/</guid>
		<description><![CDATA[While upgrading an old gentoo box I encountered this error:
xgettext: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
I tried fixing it with revdep-rebuild tool but it failed too. Through some research I found this is a common error consequence of a broken update process (nothing is perfect [...]]]></description>
			<content:encoded><![CDATA[<p>While upgrading an old gentoo box I encountered this error:</p>
<blockquote><p>xgettext: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory</p></blockquote>
<p>I tried fixing it with revdep-rebuild tool but it failed too. Through some research I found this is a common error consequence of a broken update process (nothing is perfect in this life) due to a circular dependency.</p>
<p>But you don&#8217;t have to worry, there is a simple way to fix this:<br />
<span id="more-8"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-0018366203309875";
/* www.kernel-panik.com 200x200 Ad unit text */
google_ad_slot = "9155669200";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<blockquote><p><font color="#339966">kp ~ # emerge &#8211;unmerge &#8211;quiet expat gettext<br />
kp ~ # emerge &#8211;quiet expat gettext</font></p></blockquote>
<p>After this your emerge processes will run smoothly again.</p>
<p>-=kp=-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2007/12/03/tip-gentoo-libexpatso-error-simple-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>qc-usb-messenger with Logitech Quickcam Messenger on Gentoo Linux Howto</title>
		<link>http://www.kernel-panik.com/wordpress/2007/11/22/logitech-quickcam-messenger-on-gentoo-linux-how-to-with-qc-usb-messenger-drivers/</link>
		<comments>http://www.kernel-panik.com/wordpress/2007/11/22/logitech-quickcam-messenger-on-gentoo-linux-how-to-with-qc-usb-messenger-drivers/#comments</comments>
		<pubDate>Thu, 22 Nov 2007 17:29:07 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Linux kernel]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kernel-panik.com]]></category>
		<category><![CDATA[logitech quickcam messenger webcam]]></category>
		<category><![CDATA[qc-usb-messenger]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/2007/11/22/logitech-quickcam-messenger-on-gentoo-linux-how-to-with-qc-usb-messenger-drivers/</guid>
		<description><![CDATA[In this post I will explain you how I got my Logitech Quickcam Messenger webcam working with Gentoo Linux using qc-usb-messenger drivers (module will be called quickcam).
Webcam information:
Manufacturer: Logitech
Part Number: 861144-0000
Model: Logicool V-UM27 Quickcam USB
# lsusb   information:
ID 046d:08f0 Logitech, Inc. QuickCam Messenger
First of all we will prepare our kernel so our driver compiles [...]]]></description>
			<content:encoded><![CDATA[<p>In this post I will explain you how I got my Logitech Quickcam Messenger webcam working with Gentoo Linux using qc-usb-messenger drivers (module will be called quickcam).</p>
<p>Webcam information:</p>
<blockquote><p>Manufacturer: Logitech<br />
Part Number: 861144-0000<br />
Model: Logicool V-UM27 Quickcam USB</p></blockquote>
<blockquote><p><font color="#339966"># lsusb</font>   information:<br />
ID 046d:08f0 Logitech, Inc. QuickCam Messenger</p></blockquote>
<p>First of all we will prepare our kernel so our driver compiles neatly. I am currently using kernel 2.6.23-gentoo-r2.<br />
<span id="more-5"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-0018366203309875";
//www.kernel-panik.com 200x200 Ad unit text
google_ad_slot = "9155669200";
google_ad_width = 200;
google_ad_height = 200;
//--></script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<blockquote><p><font color="#339966">Select the following kernel options and recompile:</font></p>
<p style="margin-bottom: 0in"><font color="#339966">Device Drivers &#8212;&gt; Multimedia devices &#8212;&gt;<br />
&lt;M&gt; Video For Linux<br />
[*]   Enable Video For Linux API 1 compatible Layer<br />
[*]   Video capture adapters (NEW)  &#8212;&gt;</font></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in"><font color="#339966">Device Drivers &#8212;&gt; Multimedia devices &#8212;&gt; Video capture adapters &#8211;&gt;<br />
[*]   Autoselect pertinent encoders/decoders and other helper chips<br />
[*]   V4L USB devices (NEW)  &#8212;&gt;</font></p>
<p style="margin-bottom: 0in">&nbsp;</p>
<p style="margin-bottom: 0in"><font color="#339966">Device Drivers &#8212;&gt; Multimedia devices &#8212;&gt; Video capture adapters &#8211;&gt; V4L USB devices &#8211;&gt;<br />
(none)</font></p></blockquote>
<p style="margin-bottom: 0in">&nbsp;</p>
<p> Next we emerge our <a href="http://gentoo-portage.com/media-video/qc-usb-messenger" title="Portage media-video/qc-usb-messenger" target="_blank">qc-usb-messenger</a> drivers:</p>
<blockquote><p><font color="#339966">emerge &#8211;quiet media-video/qc-usb-messenger</font></p></blockquote>
<p>Now we check if the driver loads, so we connect our camera</p>
<blockquote><p><font color="#ffff99"><font color="#999999"># tail -f /var/log/messages   should give us a message similar to:</font><br />
<font color="#339966"> kp_1 quickcam [48.266871]: poisoning qc in qc_usb_exit<br />
kp_1 quickcam [54.779816]: &#8212;&#8212;&#8212;-LOADING QUICKCAM MODULE&#8212;&#8212;&#8212;&#8212;<br />
kp_1 quickcam [54.779852]: struct quickcam size: 4612<br />
kp_1 quickcam: QuickCam USB camera found (driver version QuickCam Messenger/Communicate USB 1.7 $Date: 2007/09/02 00:00:00 $)<br />
kp_1 quickcam: Kernel:2.6.23-gentoo-r2 bus:2 class:FF subclass:FF vendor:046D product:08F0<br />
kp_1 quickcam [54.780122]: poisoning qc in qc_usb_init<br />
kp_1 quickcam [54.809479]: E00A contains 08F0<br />
kp_1 quickcam: Sensor VV6450 detected<br />
kp_1 input: Quickcam snapshot button as /devices/virtual/input/input2<br />
kp_1 quickcam [54.813168]: Quickcam snapshot button registered on usb-0000:00:01.3-2/input0<br />
kp_1 quickcam: Registered device: /dev/video0<br />
kp_1 usbcore: registered new interface driver quickcam</font></font></p></blockquote>
<blockquote><p><font color="#ffff99"><font color="#999999">if driver is not automatically loaded, you can always modprobe it, and the check if interface has been registered</font><br />
<font color="#339966"> kp_1 ~ # modprobe quickcam</font></font></p></blockquote>
<p>And that&#8217;s it! now you can configure any program that can read v4l devices, like <a href="http://gentoo-portage.com/media-tv/xawtv" title="Xawtv portage package" target="_blank">xawtv</a> and <a href="http://www.kernel-panik.com/wordpress/2007/11/20/cherokee-php-zoneminder-on-gentoo-linux-how-to/" title="Cherokee + php + Zoneminder on Gentoo Linux" target="_blank">Zoneminder</a>  <img src='http://www.kernel-panik.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><font color="#000000">- Feel free to leave any comment, suggestion, request or correction you want. I will update this page constantly -</font></p>
<p>-=kp=-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2007/11/22/logitech-quickcam-messenger-on-gentoo-linux-how-to-with-qc-usb-messenger-drivers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cherokee + php + Zoneminder on Gentoo Linux Howto</title>
		<link>http://www.kernel-panik.com/wordpress/2007/11/20/cherokee-php-zoneminder-on-gentoo-linux-how-to/</link>
		<comments>http://www.kernel-panik.com/wordpress/2007/11/20/cherokee-php-zoneminder-on-gentoo-linux-how-to/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 20:26:31 +0000</pubDate>
		<dc:creator>Jorge_S</dc:creator>
				<category><![CDATA[Cherokee Web Server]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[kernel-panik.com]]></category>
		<category><![CDATA[zoneminder]]></category>
		<category><![CDATA[cctv]]></category>
		<category><![CDATA[cherokee]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.kernel-panik.com/wordpress/?p=4</guid>
		<description><![CDATA[In this How-to I will explain how to install and configure:


Cherokee 	Web Server


Zoneminder 	video camera security and surveillance solution


ffmpeg 	support with mpeg-4 codec (xvid)


php 	and other relevant packages


I have divided this guide in 2 parts: Cherokee + php and Zoneminder installation.
&#160;
So, let&#8217;s begin!




PART 1 : Installing Cherokee Web Server and PHP on Gentoo Linux
&#160;
First we [...]]]></description>
			<content:encoded><![CDATA[<p align="left">In this How-to I will explain how to install and configure:</p>
<ul>
<li>
<p style="margin-bottom: 0in" align="left"><a href="http://www.cherokee-project.com/" onclick="javascript:urchinTracker('/external/www.cherokee-project.com/');" target="_blank">Cherokee</a> 	Web Server</p>
</li>
<li>
<p style="margin-bottom: 0in" align="left"><a href="http://zoneminder.com/" onclick="javascript:urchinTracker('/external/zoneminder.com');" target="_blank">Zoneminder</a> 	video camera security and surveillance solution</p>
</li>
<li>
<p style="margin-bottom: 0in" align="left"><a href="http://ffmpeg.mplayerhq.hu/" onclick="javascript:urchinTracker('/external/ffmpeg.mplayerhq.hu/');">ffmpeg</a> 	support with mpeg-4 codec (xvid)</p>
</li>
<li>
<p align="left"><a href="http://www.php.net/" onclick="javascript:urchinTracker('/external/www.php.net');" target="_blank">php</a> 	and other relevant packages</p>
</li>
</ul>
<p align="left">I have divided this guide in 2 parts: Cherokee + php and Zoneminder installation.</p>
<p align="left">&nbsp;</p>
<p align="left">So, let&#8217;s begin!</p>
<p align="left"><span id="more-4"></span><br />
<script type="text/javascript"><!--
google_ad_client = "pub-0018366203309875";
//www.kernel-panik.com 200x200 Ad unit text
google_ad_slot = "9155669200";
google_ad_width = 200;
google_ad_height = 200;
//--></script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<strong>PART 1 : Installing Cherokee Web Server and PHP on Gentoo Linux</strong></p>
<p align="left">&nbsp;</p>
<p align="left">First we need to <a href="http://gentoo-wiki.com/Masked" onclick="javascript:urchinTracker('/external/gentoo-wiki.com/Masked');" target="_blank">unmask</a> <a href="http://gentoo-portage.com/www-servers/cherokee/ChangeLog" onclick="javascript:urchinTracker('/external/gentoo-portage.com/www-servers/cherokee/ChangeLog');">www-servers/cherokee</a> package</p>
<p align="left"><font color="#339966">	# echo &#8220;www-servers/cherokee&#8221; &gt;&gt; /etc/portage/package.keywords</font></p>
<p align="left">next we set up our make options for cherokee</p>
<p align="left"><font color="#999999">	Edit /etc/make.conf and add &#8220;threads&#8221; to the USE variable</font></p>
<p align="left">finally we use emerge to compile and install the package</p>
<p align="left"><font color="#339966">	# emerge &#8211;quiet www-servers/cherokee</font></p>
<p align="left"><font color="#ffff99">	</font><font color="#999999">TIP: using the &#8211;quiet reduces the output produced by emerge, reducing the cpu consumption.</font></p>
<p align="left">Now we will add php support to Cherokee. This is quite simple as portage do most of the work for us, you just need php compiled with FastCGI support. &#8211; This is my usual configuration:</p>
<p align="left"><span style="text-decoration: none"><font color="#ccffcc"><font color="#999999">	edit /etc/make.conf</font><br />
<font color="#999999"> add</font> <font color="#339966">&#8220;cgi gd ftp hash mysql opd sockets xml&#8221;</font> <font color="#999999">to the USE variable</font></font></span></p>
<p align="left"><font color="#999999">	cgi &#8211; Add support for the cgi / FastCGI interface<br />
gd &#8211; Adds support for media-libs/gd (to generate graphics on the fly)<br />
</font> <font color="#999999">ftp &#8211; Adds FTP (File Transfer Protocol) support<br />
</font> <font color="#999999">mhash &#8211; Adds support for the mhash library<br />
</font> <font color="#999999">mysql &#8211; Adds mySQL Database support<br />
</font> <font color="#999999">pdo – database access libraries </font><font color="#999999">sockets – Adds support for tcp/ip sockets<br />
xml &#8211; Add support for XML files</font></p>
<p align="left">Now we are now ready to emerge our package (this will take while to finish):</p>
<p style="text-decoration: none" align="left"><font color="#339966">	# emerge &#8211;quiet dev-lang/php</font></p>
<p style="text-decoration: none" align="left">and start Cherokee Web Server:</p>
<p style="text-decoration: none" align="left"><font color="#339966">	# /etc/init.d/cherokee start</font></p>
<p style="text-decoration: none" align="left">Cherokee + PHP should be working fine now, if you want to test it you follow this simple process:</p>
<p style="text-decoration: none" align="left"><font color="#339966">	# echo &#8220;&lt;? phpinfo(); ?&gt;&#8221; &gt; /var/www/localhost/htdocs/test.php</font></p>
<p style="text-decoration: none" align="left"><font color="#999999">	open http://your_domain_or_ip_address/test.php and you should see a php report. </font></p>
<p style="text-decoration: none" align="left"><font color="#999999">	If everything is ok we remove the file:</font></p>
<p style="text-decoration: none" align="left"><font color="#ccffcc">	</font><font color="#339966"># rm /var/www/localhost/htdocs/test.php</font></p>
<p align="left"><font color="#999999"><span style="text-decoration: none">	TIP: the phpinfo(); function can be a dangerous security issue! it displays sensitive information 	about our php configuration!</span></font></p>
<p align="left"><strong>PART 2 : Zoneminder + ffmpeg + mpeg4 (divx) support on Gentoo Linux + Cherokee</strong></p>
<p align="left">Zoneminder is really cool video security and surveillance system, and it&#8217;s even cooler when you add ffmpeg with mpeg4 codec support!. For this guide I assume you have your video capture device, webcam, or video streaming service already up and running. First we modify our USE variable in make.conf:</p>
<p align="left"><font color="#999999"><span style="text-decoration: none">	edit /etc/make.conf with you favorite editor and add the following values to your USE varible:</span></font></p>
<p align="left"><font color="#ffff99"><span style="text-decoration: none">	</span><font color="#339966">&#8220;a52 aac encode ieee1394 imlib ogg sdl theora truetype v4l vorbis x264 xvid aalib alsa fbcon flac ggi libcaca bzip2 gif jpeg jpeg2k mp3 png tiff mpeg vhosts&#8221;</font></font></p>
<p align="left"><font color="#ffff99">	</font><font color="#ccffcc"><font color="#999999">USE variables for</font> <a href="http://gentoo-portage.com/media-video/ffmpeg" onclick="javascript:urchinTracker('/external/gentoo-portage.com/media-video/ffmpeg');" target="_blank">media-video/ffmpeg </a></font></p>
<p align="left"><font color="#999999">a52 &#8211; Enables support for decoding ATSC A/52 streams used in DVD<br />
aac &#8211; Enables support for MPEG-4 AAC Audio<br />
encode &#8211; Adds support for encoding of audio or video files eee1394 &#8211; Enable FireWire/iLink IEEE1394 support (dv, camera, &#8230;)<br />
imlib &#8211; Adds support for imlib, an image loading and rendering library<br />
ogg &#8211; Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac)<br />
sdl &#8211; Adds support for Simple Direct Layer (media library)<br />
theora &#8211; Adds support for the Theora Video Compression Codec<br />
truetype &#8211; Adds support for FreeType and/or FreeType2 fonts<br />
v4l &#8211; Enables video4linux support<br />
vorbis &#8211; Adds support for the OggVorbis audio codec<br />
x264 &#8211; Enable h264 encoding using x264<br />
xvid &#8211; Adds support for xvid.org&#8217;s open-source mpeg-4 codec</font></p>
<p align="left"><font color="#ccffcc"><font color="#999999"><span style="text-decoration: none">	USE variables for </span></font><a href="http://gentoo-portage.com/media-libs/libsdl" onclick="javascript:urchinTracker('/external/gentoo-portage.com/media-libs/libsdl');" target="_blank"><span style="text-decoration: none">media-libs/libsdl</span></a></font></p>
<p align="left"><font color="#999999">aalib &#8211; Adds support for media-libs/aalib (ASCII-Graphics Library)<br />
alsa &#8211; Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture)<br />
fbcon &#8211; Adds framebuffer support for the console, via the kernel<br />
flac &#8211; Adds support for the flac audio codec<br />
cgi &#8211; Adds support for media-libs/libggi (non-X video api/drivers)<br />
libcaca &#8211; Add support for colored ASCII-art graphics</font></p>
<p align="left"><font color="#ccffcc"><font color="#999999">	USE variables for</font> <a href="http://gentoo-portage.com/media-libs/imlib2" onclick="javascript:urchinTracker('/external/gentoo-portage.com/media-libs/imlib2');">media-libs/imlib2</a></font></p>
<p align="left"><font color="#999999">bzip2 &#8211; Use the bzlib compression library<br />
gif &#8211; Adds GIF image support<br />
jpeg &#8211; Adds JPEG image support<br />
jpeg2k &#8211; Support for JPEG 2000, a wavelet-based image compression format<br />
mp3 &#8211; Add support for reading mp3 files tiff &#8211; Adds support for the tiff image format</font></p>
<p align="left"><font color="#ccffcc"><font color="#999999">	USE variables for </font><a href="http://gentoo-portage.com/www-misc/zoneminder" onclick="javascript:urchinTracker('/external/gentoo-portage.com/www-misc/zoneminder');">www-misc/zoneminder</a></font></p>
<p align="left"><font color="#999999">mpeg -Adds libmpeg3 support to various packages<br />
vhosts &#8211; Adds support for installing web-based applications into a virtual-hosting environment</font></p>
<p align="left">We unmask Zoneminder ebuild and it&#8217;s dependencies:</p>
<p align="left"><font color="#339966">	# echo &#8220;www-misc/zoneminder&#8221; &gt;&gt; /etc/portage/package.keywords </font></p>
<p align="left"><font color="#339966">	# echo &#8220;dev-perl/X10&#8243; &gt;&gt; /etc/portage/package.keywords</font></p>
<p align="left">Zoneminder ebuild needs apache user/group to finish installing, so we need create them (we will delete them later)</p>
<p align="left"><font color="#339966">	# useradd apache (this will create both user and group)</font></p>
<p align="left"><font color="#339966">we are now ready to launch the emerge process for Zoneminder + ffmpeg</font></p>
<p align="left"><font color="#ffff99"><font color="#339966">	# emerge &#8211;quiet web-misc/zoneminder media-video/ffmpeg</font> </font></p>
<p align="left"><font color="#999999">	NOTE: at this point you might see a webapp-config error, this is because you probably didn&#8217;t use vhosts USE variable, in this cases webapp-config runs automatically for user localhost, showing you this error:</font></p>
<p align="left"><font color="#999999">* Fatal error: Your configuration file sets the server type &#8220;Apache&#8221;</font></p>
<p align="left"><font color="#999999">* Fatal error: but the corresponding package does not seem to be installed!</font></p>
<p align="left"><font color="#999999">if this happens, just ignore the error, we will copy the files by hand later.</font></p>
<p align="left">we delete the apache user/group we created earlier</p>
<p align="left"><font color="#ffff99"><font color="#339966">	# userdel apache # groudel apache</font> </font></p>
<p align="left">webapp-config won&#8217;t work because we don&#8217;t have Apache installed, so we copy Zoneminder files manually:</p>
<p align="left"><font color="#339966">	# mkdir /var/www/localhost/htdocs/zoneminder/</font></p>
<p align="left"><font color="#339966">	# cp /usr/share/webapps/zoneminder/1.22.3/htdocs/* /var/www/localhost/htdocs/zoneminder/ -R</font></p>
<p align="left"><font color="#ffff99"><font color="#339966">	# cp /usr/share/webapps/zoneminder/1.22.3/hostroot/cgi-bin/* /var/www/localhost/cgi-bin/ -R</font> </font></p>
<p align="left"><font color="#999999">	TIP: Gentoo always saves emerged webapps in /usr/share/webapps/</font></p>
<p align="left">time to modify directory permissions so Zoneminder works with Cherokee:</p>
<p style="text-decoration: none" align="left"><font color="#339966">	# chown cherokee:cherokee /var/log/zoneminder/ -R</font></p>
<p style="text-decoration: none" align="left"><font color="#339966"># chown cherokee:cherokee /var/run/zm -R</font></p>
<p style="text-decoration: none" align="left"><font color="#339966"># chown cherokee:cherokee /var/www/localhost/ -R</font></p>
<p style="text-decoration: none" align="left">Zoneminder needs a mysql database to store it&#8217;s data, let&#8217;s set things up!</p>
<p style="text-decoration: none" align="left"><font color="#999999">	We check if our hostname is configured in /etc/hosts </font></p>
<p style="text-decoration: none" align="left"><font color="#339966">	kp_1 ~ # vi /etc/hosts</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">127.0.0.1 localhost your_hostname</font></p>
<p style="text-decoration: none" align="left"><font color="#ffcc99"><font color="#999999">Now we run mysql first installation script</font> </font></p>
<p style="text-decoration: none" align="left"><font color="#339966">	kp_1 ~ # /usr/bin/mysql_install_db</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">Installing MySQL system tables&#8230; OK</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">Filling help tables&#8230; OK</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">(etc)</font></p>
<p style="text-decoration: none" align="left"><font color="#000000">	time to set our mysql root password </font></p>
<p style="text-decoration: none" align="left"><font color="#339966">	kp_1 ~ # /etc/init.d/mysql start </font></p>
<p style="text-decoration: none" align="left"><font color="#ffff99"><font color="#339966">	kp_1 ~ # /usr/bin/mysqladmin -u root password &#8216;your_password</font>&#8216;</font></p>
<p style="text-decoration: none" align="left"><font color="#ffcc99"><font color="#000000">	now we fill our sql data and set up database permissions</font><font color="#ffff99"> </font></font></p>
<p style="text-decoration: none" align="left"><font color="#339966">	kp_1 ~ # mysql -p -u root &lt; /usr/share/zoneminder/db/zm_create.sql</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kp_1 ~ # mysql -p -u root zm</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">mysql&gt; grant all on zm.* to &#8216;zoneminder&#8217;@localhost identified by &#8216;password&#8217;;</font><font color="#ffcc99"> </font></p>
<p style="text-decoration: none" align="left">setting up our system information in /etc/zm.conf</p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_PATH_BUILD=/usr/share/zoneminder</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_PATH_WEB=/var/www/localhost/htdocs/zoneminder</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_PATH_CGI=/var/www/localhost/cgi-bin</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_WEB_USER=cherokee</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_WEB_GROUP=cherokee</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_DB_HOST=localhost</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_DB_NAME=zm</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_DB_USER=zoneminder</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">ZM_DB_PASS=you_db_password_for_user_zoneminder</font></p>
<p style="text-decoration: none" align="left">To avoid having low shared memory errors (usually happens) we modify our sysctl.com:</p>
<p style="text-decoration: none" align="left"><font color="#339966">	kp_1 ~ # vi /etc/sysctl.conf</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kernel.shmmax=200000000</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kernel.shmall=200000000</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kp_1 ~ # sysctl -p /etc/sysctl.conf</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kernel.shmmax = 200000000</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kernel.shmall = 200000000</font></p>
<p style="text-decoration: none" align="left"><font color="#339966">kp_1 ~ #</font></p>
<p align="left"><span style="text-decoration: none">We set the permissions so user cherokee can read from video devices:</span></p>
<p align="left"><font color="#ffff99"><span style="text-decoration: none">	</span><font color="#339966"># usermod -G video cherokee</font></font></p>
<p align="left"><span style="text-decoration: none">If needed, modify the following line with your video device(s):</span></p>
<p align="left"><font color="#339966">	# chmod 660 /dev/v4l/video0</font></p>
<p align="left">restart involved services “just-in-case(tm)”:</p>
<p align="left"><font color="#339966">	# /etc/init.d/mysql restart</font></p>
<p align="left"><font color="#339966"># /etc/init.d/cherokee restart</font></p>
<p align="left"><font color="#339966"># /etc/init.d/zoneminder restart</font></p>
<p align="left">Point your browser (preferably firefox, gives better streaming performance) to htpp://yoursite/zoneminder, You should now have a working Zoneminder system!</p>
<p align="left">&nbsp;</p>
<p align="left"><font color="#000000">- Feel free to leave any comments, suggestions, bug reports, or any kind of feedback you want<br />
I will try to answer most of your questions &#8211; This page will be updated periodically -</font></p>
<p align="left">-=kp=-</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel-panik.com/wordpress/2007/11/20/cherokee-php-zoneminder-on-gentoo-linux-how-to/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
