<?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>EZ Linux Admin &#187; Linux Software / Scripts</title>
	<atom:link href="http://www.ezlinuxadmin.com/category/linux-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ezlinuxadmin.com</link>
	<description>Making Linux Easier</description>
	<lastBuildDate>Tue, 29 Jun 2010 19:37:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Optimize MySQL DataBases</title>
		<link>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/</link>
		<comments>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 19:37:50 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[myisamchk]]></category>
		<category><![CDATA[mysqlcheck]]></category>
		<category><![CDATA[optimize mysql]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=491</guid>
		<description><![CDATA[If you are online then you should run: mysqlcheck
mysqlcheck -o &#8211;all-databases
If you are offline then you can run myisamchk which is a little more thorough.
myisamchk &#8211;sort-index
myisamchk -r tbl_name
]]></description>
			<content:encoded><![CDATA[<p>If you are online then you should run: mysqlcheck</p>
<blockquote><p>mysqlcheck -o &#8211;all-databases</p></blockquote>
<p>If you are offline then you can run myisamchk which is a little more thorough.</p>
<blockquote><p>myisamchk &#8211;sort-index<br />
myisamchk -r tbl_name</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/06/optimize-mysql-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>setroubleshoot bug</title>
		<link>http://www.ezlinuxadmin.com/2010/05/setroubleshoot/</link>
		<comments>http://www.ezlinuxadmin.com/2010/05/setroubleshoot/#comments</comments>
		<pubDate>Mon, 24 May 2010 06:20:07 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[/usr/bin/python]]></category>
		<category><![CDATA[setroubleshoot]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=472</guid>
		<description><![CDATA[There is a bug with the new option in Centos 5 called setroubleshoot.
The bug spins the program over and over causing high memory and sometimes CPU use. Unfortunately there is no permanent fix yet, but if you see something like this high in your daily process log:
/usr/bin/python -E /usr/sbin/setroubleshootd
To fix for now you simply have [...]]]></description>
			<content:encoded><![CDATA[<p>There is a bug with the new option in Centos 5 called setroubleshoot.</p>
<p>The bug spins the program over and over causing high memory and sometimes CPU use. Unfortunately there is no permanent fix yet, but if you see something like this high in your daily process log:</p>
<blockquote><p>/usr/bin/python -E /usr/sbin/setroubleshootd</p></blockquote>
<p>To fix for now you simply have to restart the process:</p>
<blockquote><p>/etc/init.d/setroubleshoot restart</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/05/setroubleshoot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mod_cband the new Mod_Bandwidth</title>
		<link>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 02:52:12 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[limit server bandwidth]]></category>
		<category><![CDATA[mod_bandwidth]]></category>
		<category><![CDATA[mod_cband]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=453</guid>
		<description><![CDATA[I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I [...]]]></description>
			<content:encoded><![CDATA[<p>I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it&#8217;s free. The new mod to regulate bandwidth and more is called Mod_cband I&#8217;m not sure what cband means but I can guess channel bandwidth.</p>
<p>Here is how to get it set up with Cantos 5.3 easily.</p>
<p>I wanted to host for my brother the latest WoW patch, but at a hefty 450 MB, I didn’t want to blow all my bandwidth on it either. I am setting a limit for the download at 2.5 TB of bandwidth, and limiting it to 5mbs at 10 connections a second. My hardware is RHEL 4 running on a P4 with Plesk 8. In the guide to follow, you’ll see a few steps that wouldn’t be needed on a non-plesk system. To setup bandwidth limiting for the host, we need to be able to compile a new apache module against our system, and then install and configure it.</p>
<p>Step 1: The prereqs</p>
<p>First I needed to setup a yum repository for FC4. This can be accomplished by issuing an RPM command:</p>
<p>rpm -ivh http://rpm.livna.org/livna-release-4.rpm</p>
<p>Now that you can access the RPM packages, we need to install http-devel using yum:</p>
<p>yum install httpd-devel</p>
<p>If all went well, we can now extract, compile, and install mod_cband for apache:</p>
<p>cd /tmp<br />
wget http://cband.linux.pl/download/mod-cband-0.9.7.4.tgz<br />
tar xzvf mod-cband-0.9.7.4.tgz<br />
cd mod-cband-0.9.7.4<br />
./configure<br />
make<br />
make install</p>
<p>If all went well, restart apache with the new module (you can check httpd.conf to make sure the module is going to be loaded):</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 2: Configuration</p>
<p>Here’s where the Plesk part gets annoying. We can’t just edit our vhosts file, because plesk writes over it all the time. Instead, we edit a /home/httpd/vhosts/*/subdomains/*/conf/vhost.conf file. Mine looks like this:</p>
<p>CBandScoreboard /var/www/scoreboard<br />
CBandPeriod 4W<br />
CBandDefaultExceededCode 509<br />
CBandLimit 2500G<br />
CBandSpeed 5000 5 10<br />
CBandRemoteSpeed 1600 3 1<br />
&lt;Location /cband-status&gt;<br />
SetHandler cband-status<br />
&lt;/Location&gt;<br />
&lt;Location /cband-status-me&gt;<br />
SetHandler cband-status-me<br />
&lt;/Location&gt;</p>
<p>What does this mean? (1) Use /var/www/scoreboard to log usage and limits (2) Reset the limit count every 4 weeks (3) Throw a 509 error when the limits are exceeded (4) Allow 2.5TB per period (5) Allow 5mbs with 5 requests a second and 10 connections at a time oeverall (6) Allow 1.6mbs with 3 requests a second and 1 connections at a time per client (7) Allow us to access a page at /cband-status to view the status.</p>
<p>You’ll also need to issue commands to make the scoreboard directory, and to allow apache to own it:</p>
<p>mkdir /var/www/scoreboard<br />
chown apache:apache /var/www/scoreboard</p>
<p>Finally, Plesk requires you to inform it of your work:</p>
<p>/usr/local/psa/admin/sbin/websrvmng -u &#8211;vhost-name=yourdomain.com</p>
<p>If you restart Apache now, everything should work!</p>
<p>/etc/init.d/httpd restart</p>
<p>Step 3: An Example</p>
<p>You can take a peek at my status page right now if you’d like. It looks a bit like this:</p>
<p><a href="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg"><img class="alignnone size-full wp-image-454" title="cband-panel" src="http://www.ezlinuxadmin.com/wp-content/uploads/2010/03/cband-panel.jpg" alt="" width="450" height="209" /></a></p>
<p>A quick note, I simply just added:</p>
<blockquote><p>CBandPeriod 4W<br />
CBandLimit 10000G<br />
CBandSpeed 12000 40 80<br />
CBandRemoteSpeed 6400 12 4</p></blockquote>
<p>Now this set the limit to about 12 megs (MPS) a second which is a lot, but this customer is paying $250 a month to cover it. Most websites should max at about 5 MPS. I left out the other options because I didn&#8217;t need them and it&#8217;s less load on the server without them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/mod_cband-the-new-mod_bandwidth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Raise apache 2.0 max clients hard limit in cpanel</title>
		<link>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 16:42:44 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[apache 2.0 hard limit raise]]></category>
		<category><![CDATA[apche 2.0 raise limit]]></category>
		<category><![CDATA[raise hard limit]]></category>
		<category><![CDATA[raise max clients]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=444</guid>
		<description><![CDATA[Apache 2.0 makes raising the max client from the default 256 hard limit a little harder now. If you have cpanel then it&#8217;s even a little harder or I should you just need to know what to do, figuring it out is a shot in the dark.
One main difference is you have raise the server [...]]]></description>
			<content:encoded><![CDATA[<p>Apache 2.0 makes raising the max client from the default 256 hard limit a little harder now. If you have cpanel then it&#8217;s even a little harder or I should you just need to know what to do, figuring it out is a shot in the dark.</p>
<p>One main difference is you have raise the server limit if you want to raise the max client limit.</p>
<p>The easiest way to do this is to go to:</p>
<ol>
<li>Web Hosting Manager</li>
<li>Then click Apache Configuration</li>
<li>Then click Include Editor</li>
<li>Then click the apache version under the pre-main include</li>
<li>Then add this to the input section:</li>
</ol>
<blockquote><p>ServerLimit 512</p>
<p>StartServers 32<br />
MinSpareServers 5<br />
MaxSpareServers 20<br />
MaxClients 512<br />
MaxRequestsPerChild 1000</p></blockquote>
<p>Then save and it will ask to restart apache you click yes there.</p>
<p>Now your apache limit is set to 512 and cpanel will not mess with it.</p>
<p>Here is the explanation for each derivative in the above code:</p>
<p><strong>MaxClients:</strong></p>
<p>The MaxClients sets the limit on maximum simultaneous requests that can be supported by the server; no more than this number of child processes are spawned. It shouldn&#8217;t be set too low; otherwise, an ever-increasing number of connections are deferred to the queue and eventually time-out while the server resources are left unused. Setting this too high, on the other hand, will cause the server to start swapping which will cause the response time to degrade drastically. The appropriate value for MaxClients can be calculated as:</p>
<p>If there are more concurrent users than MaxClients, the requests will be queued up to a number based on ListenBacklog directive. Increase ServerLimit to set MaxClients above 256.</p>
<p><strong>MinSpareServers, MaxSpareServers, and StartServers:</strong></p>
<p>MaxSpareServers and MinSpareServers determine how many child processes to keep active while waiting for requests. If the MinSpareServers is too low and a bunch of requests come in, Apache will have to spawn additional child processes to serve the requests. Creating child processes is relatively expensive. If the server is busy creating child processes, it won&#8217;t be able to serve the client requests immediately. MaxSpareServers shouldn&#8217;t be set too high: too many child processes will consume resources unnecessarily.</p>
<p>Tune MinSpareServers and MaxSpareServers so that Apache need not spawn more than 4 child processes per second (Apache can spawn a maximum of 32 child processes per second). When more than 4 children are spawned per second, a message will be logged in the ErrorLog.</p>
<p>The StartServers directive sets the number of child server processes created on startup. Apache will continue creating child processes until the MinSpareServers setting is reached. This doesn&#8217;t have much effect on performance if the server isn&#8217;t restarted frequently. If there are lot of requests and Apache is restarted frequently, set this to a relatively high value.</p>
<p><strong>MaxRequestsPerChild:</strong></p>
<p>The MaxRequestsPerChild directive sets the limit on the number of requests that an individual child server process will handle. After MaxRequestsPerChild requests, the child process will die. It&#8217;s set to 0 by default, the child process will never expire. It is appropriate to set this to a value of few thousands. This can help prevent memory leakage, since the process dies after serving a certain number of requests. Don&#8217;t set this too low, since creating new processes does have overhead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/raise-apache-2-0-hard-limit-cpanel-max-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Repair DNS scripts and tips</title>
		<link>http://www.ezlinuxadmin.com/2010/03/repair-dns-scripts-and-tips/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/repair-dns-scripts-and-tips/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 22:04:50 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[cpanel dns]]></category>
		<category><![CDATA[dns crash]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=442</guid>
		<description><![CDATA[Fixing DNS is a tricky thing, with cpanel there is a couple steps to try first.
DNS failed you are not sure why, try this first:
/scripts/cleandns
/scripts/rebuildnamedconf
Still not working, try this:
/scripts/rebuilddnsconfig
/scripts/fixdns
Basically DNS has about 5 files that need to all be in sync for named DNS to run.
I highly recommend running three servers with DNS so you [...]]]></description>
			<content:encoded><![CDATA[<p>Fixing DNS is a tricky thing, with cpanel there is a couple steps to try first.</p>
<p>DNS failed you are not sure why, try this first:</p>
<blockquote><p>/scripts/cleandns<br />
/scripts/rebuildnamedconf</p></blockquote>
<p>Still not working, try this:</p>
<blockquote><p>/scripts/rebuilddnsconfig<br />
/scripts/fixdns</p></blockquote>
<p>Basically DNS has about 5 files that need to all be in sync for named DNS to run.</p>
<p>I highly recommend running three servers with DNS so you have back ups if one servers fails. In this case you just transfer over the dns files and restart. Here is a list of the DNS files that need to be transferred.</p>
<blockquote><p>named.conf.cache</p>
<p>named.conf.zonedir.cache</p>
<p>named.conf</p>
<p>named.conf,v</p>
<p>named.conf_back</p>
<p>named.conf.fixrndc</p>
<p>named.conf.prefixrndc</p>
<p>named.conf.rpmsave</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/repair-dns-scripts-and-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a md5sum error when tranferring a cpanel account?</title>
		<link>http://www.ezlinuxadmin.com/2010/03/getting-a-md5sum-error-when-tranferring-a-cpanel-account/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/getting-a-md5sum-error-when-tranferring-a-cpanel-account/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 12:19:41 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Cpanel transfer error]]></category>
		<category><![CDATA[md5sum error]]></category>
		<category><![CDATA[upgrade perl]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=434</guid>
		<description><![CDATA[This usually means you need to upgrade Perl on the server. Here is a example of a md5sum error.
The remote server didn&#8217;t report a correct md5sum of the archive. Please ensure you selected the correct type of remote server.
To fix upgrade Perl as shown here:
http://www.ezlinuxadmin.com/2009/08/upgrading-perl-on-cpanel/
]]></description>
			<content:encoded><![CDATA[<p>This usually means you need to upgrade Perl on the server. Here is a example of a md5sum error.</p>
<blockquote><p>The remote server didn&#8217;t report a correct md5sum of the archive. Please ensure you selected the correct type of remote server.</p></blockquote>
<p>To fix upgrade Perl as shown here:</p>
<p><a href="http://www.ezlinuxadmin.com/2009/08/upgrading-perl-on-cpanel/">http://www.ezlinuxadmin.com/2009/08/upgrading-perl-on-cpanel/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/getting-a-md5sum-error-when-tranferring-a-cpanel-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My new favorite rsync command</title>
		<link>http://www.ezlinuxadmin.com/2010/03/my-new-favorite-rsync-command/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/my-new-favorite-rsync-command/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 12:04:33 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[rsync code]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=432</guid>
		<description><![CDATA[rsync -vae ssh 12.123.123.123:/home/dwhsbackup/daily/username/ /backup/cpbackup/daily2/username/ –bwlimit=10000 &#8211;exclude-from &#8216;/root/exclude.txt&#8217;
]]></description>
			<content:encoded><![CDATA[<blockquote><p>rsync -vae ssh 12.123.123.123:/home/dwhsbackup/daily/username/ /backup/cpbackup/daily2/username/ –bwlimit=10000 &#8211;exclude-from &#8216;/root/exclude.txt&#8217;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/my-new-favorite-rsync-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calm down rsync if it overloads your IO memory or CPU</title>
		<link>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/</link>
		<comments>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 11:57:14 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cheat Sheets]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[Linux Tricks]]></category>
		<category><![CDATA[limit io]]></category>
		<category><![CDATA[limit rsync]]></category>
		<category><![CDATA[rsync io]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=430</guid>
		<description><![CDATA[The trick is to limit I/O bandwidth for rsync.
The &#8211;bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:
rsync &#8211;delete &#8211;numeric-ids &#8211;relative &#8211;delete-excluded &#8211;bwlimit=10000 /path/to/source /path/to/dest/?
10 megs a second is plenty of speed and will keep the server running smoothly when your [...]]]></description>
			<content:encoded><![CDATA[<p>The trick is to limit I/O bandwidth for rsync.</p>
<p>The &#8211;bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter:</p>
<blockquote><p>rsync &#8211;delete &#8211;numeric-ids &#8211;relative &#8211;delete-excluded &#8211;bwlimit=10000 /path/to/source /path/to/dest/?</p></blockquote>
<p>10 megs a second is plenty of speed and will keep the server running smoothly when your grabbing allot of files off of it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/03/rsync-overloads-io-memory-cpu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Path to PHP CLI in CPanel</title>
		<link>http://www.ezlinuxadmin.com/2010/02/path-to-php-cli-in-cpanel/</link>
		<comments>http://www.ezlinuxadmin.com/2010/02/path-to-php-cli-in-cpanel/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 20:33:06 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Cpanel and WHM]]></category>
		<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[php cli]]></category>
		<category><![CDATA[php cli cpanel]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=414</guid>
		<description><![CDATA[PHP CLI is installed by default by CPanel and placed in:
/usr/local/bin
or
/usr/bin
]]></description>
			<content:encoded><![CDATA[<p>PHP CLI is installed by default by CPanel and placed in:</p>
<blockquote><p>/usr/local/bin</p></blockquote>
<p>or</p>
<blockquote><p>/usr/bin</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2010/02/path-to-php-cli-in-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FFMPEG from source</title>
		<link>http://www.ezlinuxadmin.com/2009/12/install-ffmpeg-from-source/</link>
		<comments>http://www.ezlinuxadmin.com/2009/12/install-ffmpeg-from-source/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 07:03:21 +0000</pubDate>
		<dc:creator>EZ linux</dc:creator>
				<category><![CDATA[Linux Software / Scripts]]></category>
		<category><![CDATA[ffmpeg source]]></category>

		<guid isPermaLink="false">http://www.ezlinuxadmin.com/?p=358</guid>
		<description><![CDATA[Do you prefer to manually install everything? Here is a article for you on installing FFMPEG on a Linux server.
For the automated people check this article out for FFMPEG Installation
FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library.
NOTE:
- This guide is designed for [...]]]></description>
			<content:encoded><![CDATA[<p>Do you prefer to manually install everything? Here is a article for you on installing FFMPEG on a Linux server.</p>
<p>For the automated people check this article out for <a href="http://www.ezlinuxadmin.com/2009/08/install-ffmpeg/">FFMPEG Installation</a></p>
<p><strong>FFmpeg</strong> is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library.</p>
<p><strong><span style="color: #ff0000;">NOTE</span></strong>:<br />
- This guide is designed for a <span onclick="ShowGlossaryItem('glossary_5', 'Linux is the kernel of an operating system. Linux was built on the Unix tradition. Linux was originally developed by Linus Torwalds of Finland, who currenctly owns the Linux trademark. Linux stands for Linus\' Unix.');" onmouseout="HideGlossaryItem('glossary_5');">Linux</span> <span id="glossary_5" style="border: 1px solid black; padding: 3px 7px; display: none; position: absolute; width: 250px; background-color: lightyellow; color: #000000; font-size: 12px; font-weight: normal;"><span>Linux is the kernel of an operating system. Linux was built on the Unix tradition. Linux was originally developed by Linus Torwalds of Finland, who currenctly owns the Linux trademark. Linux stands for Linus&#8217; Unix.</span></span> <strong>i386</strong> powered <span onclick="ShowGlossaryItem('glossary_6', 'A computer that provides a service to other computers on a network. An Archie server, for example, lets people on the Internet use Archie.');" onmouseout="HideGlossaryItem('glossary_6');">server</span> .</p>
<p>- If you experience any problems installing FFmpeg on your server and need help, we suggest you sign up for the <a title="xPress Plan" href="http://servertune.com/mgnt/xpress.php">xPress Plan</a>. Our engineers are ready to fix any installation problems you might have with your server.</p>
<p>To install FFmpeg from <strong>source</strong>, SSH to the server and run the commands below (in that order). Before you start working on this project, make sure the following binary packages are installed on your server:</p>
<blockquote><p>gcc, gcc4, gcc4-c++, gcc4-gfortran, gd, gd-devel, gmake, ImageMagick, ImageMagick-devel, libcpp, libgcc, libstdc++, make, ncurses, ncurses-devel, ruby, subversion</p></blockquote>
<p>If any of these packages are missing, install them using <strong><span onclick="ShowGlossaryItem('glossary_7', 'Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.');" onmouseout="HideGlossaryItem('glossary_7');">Yum</span> </strong>. For example:</p>
<ul type="square">
<li>/usr/bin/<span onclick="ShowGlossaryItem('glossary_8', 'Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.');" onmouseout="HideGlossaryItem('glossary_8');">yum</span> install <span style="color: #ff0000;"><em>PACKAGE</em></span></li>
</ul>
<p>- <span style="color: #ff0000;"><strong>Caution</strong></span><br />
The following binary packages are always updated with newer versions. You might experience technical issues if you <span onclick="ShowGlossaryItem('glossary_1', 'To retrieve a file from another machine, usually a host machine, to your machine.');" onmouseout="HideGlossaryItem('glossary_1');">download</span> a newer version for one or two of these applications.</p>
<p>Follow these steps (in that order):</p>
<ol>
<li>Let&#8217;s create a directory to do our work in:
<ul type="square">
<li>mkdir /usr/local/src</li>
<li>cd /usr/local/src</li>
</ul>
</li>
<li>Download source binary packages
<ul type="square">
<li>/usr/bin/wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz</li>
<li>/usr/bin/wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2</li>
<li>/usr/bin/wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.2.tar.bz2</li>
<li>/usr/bin/wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-ppc-20071007.tar.bz2</li>
<li>/usr/bin/wget http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.bz2</li>
<li>/usr/bin/wget http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz</li>
<li>/usr/bin/wget http://biznetnetworks.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2</li>
<li>/usr/bin/wget http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz</li>
<li>/usr/bin/wget http://www.sfr-fresh.com/unix/misc/lame-398-2.tar.gz</li>
<li>/usr/bin/wget http://downloads.xiph.org/releases/ogg/libogg-1.1.4.tar.gz</li>
<li>/usr/bin/wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2</li>
<li>/usr/bin/wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.2.tar.gz</li>
<li>/usr/bin/wget http://downloads.sourceforge.net/project/re2c/re2c/0.13.5/re2c-0.13.5.tar.gz</li>
<li>/usr/bin/wget http://download.m0k.org/handbrake/contrib/xvidcore-1.1.3.tar.gz</li>
<li>/usr/bin/wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2</li>
<li>/usr/bin/wget http://downloads.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20080324-2245.tar.bz2</li>
</ul>
</li>
<li>Extract source binary packages
<ul type="square">
<li>/bin/tar xzf a52dec-0.7.4.tar.gz</li>
<li>/bin/tar jxvf amrnb-7.0.0.2.tar.bz2</li>
<li>/bin/tar jxvf amrwb-7.0.0.2.tar.bz2</li>
<li>/bin/tar jxvf essential-ppc-20071007.tar.bz2</li>
<li>/bin/tar jxvf faac-1.28.tar.bz2</li>
<li>/bin/tar xzf faad2-2.7.tar.gz</li>
<li>/bin/tar jxvf ffmpeg-php-0.6.0.tbz2</li>
<li>/bin/tar zxvf flvtool2_1.0.5_rc6.tgz</li>
<li>/bin/tar xzf lame-398-2.tar.gz</li>
<li>/bin/tar xzf libogg-1.1.4.tar.gz</li>
<li>/bin/tar jxvf libtheora-1.1.1.tar.bz2</li>
<li>/bin/tar xzf libvorbis-1.2.2.tar.gz</li>
<li>/bin/tar xzf re2c-0.13.5.tar.gz</li>
<li>/bin/tar jxvf MPlayer-1.0rc2.tar.bz2</li>
<li>/bin/tar xzf xvidcore-1.1.3.tar.gz</li>
<li>/bin/tar jxvf x264-snapshot-20080324-2245.tar.bz2</li>
</ul>
</li>
<li>Create the codecs directory &amp; import them
<ul type="square">
<li>mkdir /usr/local/lib/codecs</li>
<li>mv /usr/local/src/essential-ppc-20071007/* /usr/local/lib/codecs</li>
<li>chmod -R 755 /usr/local/lib/codecs</li>
</ul>
</li>
<li>Install SVN/Ruby (this is for RedHat/CentOS v5.x)
<ul type="square">
<li>/usr/bin/<span onclick="ShowGlossaryItem('glossary_9', 'Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.');" onmouseout="HideGlossaryItem('glossary_9');">yum</span> install subversion</li>
<li>/usr/bin/<span onclick="ShowGlossaryItem('glossary_10', 'Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.');" onmouseout="HideGlossaryItem('glossary_10');">yum</span> install ruby<br />
OR (if you are using the cPanel <span onclick="ShowGlossaryItem('glossary_0', 'The Control Panel is an on-line interface, that allows users to change and update their Web sites.');" onmouseout="HideGlossaryItem('glossary_0');">control panel</span> )</p>
<ul type="circle">
<li>/scripts/installruby</li>
<li>/usr/local/cpanel/bin/ror_setup</li>
</ul>
</li>
<li>/usr/bin/<span onclick="ShowGlossaryItem('glossary_11', 'Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module interface.');" onmouseout="HideGlossaryItem('glossary_11');">yum</span> install ncurses-devel</li>
</ul>
</li>
<li>Compile and install FLVtool2
<ul type="square">
<li>cd /usr/local/src/flvtool2_1.0.5_rc6/</li>
<li>/usr/bin/ruby setup.rb config</li>
<li>/usr/bin/ruby setup.rb setup</li>
<li>/usr/bin/ruby setup.rb install</li>
</ul>
</li>
<li>Compile and install LAME
<ul type="square">
<li>cd /usr/local/src/lame-398-2</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install libOGG
<ul type="square">
<li>cd /usr/local/src/libogg-1.1.4</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
<li>PKG_CONFIG_PATH=/usr/local/lib/pkgconfig</li>
<li>export PKG_CONFIG_PATH</li>
</ul>
</li>
<li>Compile and install LibVorbis
<ul type="square">
<li>cd /usr/local/src/libvorbis-1.2.2</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install Libtheora
<ul type="square">
<li>cd /usr/local/src/libtheora-1.1.1</li>
<li>./configure &#8211;with-ogg-libraries=/usr/local/lib/</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install AMR<strong>NB</strong>
<ul type="square">
<li>cd /usr/local/src/amrnb-7.0.0.2</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install AMR<strong>WB</strong>
<ul type="square">
<li>cd /usr/local/src/amrwb-7.0.0.2</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install Liba52
<ul type="square">
<li>cd /usr/local/src/a52dec-0.7.4</li>
<li>./bootstrap</li>
<li>ARCh=&#8217;arch&#8217;</li>
<li>./configure &#8211;enable-shared</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install FAAC
<ul type="square">
<li>cd /usr/local/src/faac-1.28</li>
<li>./bootstrap</li>
<li>./configure &#8211;with-mp4v2</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install FAAD
<ul type="square">
<li>cd /usr/local/src/faad2-2.7</li>
<li>./configure &#8211;with-mpeg4ip</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install XVIDCore
<ul type="square">
<li>cd /usr/local/src/xvidcore/build/generic/</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Download the latest X264 Snapshot from the subversion
<ul type="square">
<li>cd /usr/local/src/x264-snapshot-20080324-2245</li>
<li>./configure &#8211;enable-shared</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install RE2C
<ul type="square">
<li>cd /usr/local/src/re2c-0.13.5</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
<li>cp -aP /usr/local/bin/re2c /usr/bin/</li>
</ul>
</li>
<li>Download the latest FFmpeg/MPlayer from the subversion
<ul type="square">
<li>/usr/bin/svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg -r15336</li>
<li>/usr/bin/svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer</li>
<li>cd /usr/local/src</li>
<li>/usr/bin/svn update</li>
</ul>
</li>
<li>Compile and install MPlayer
<ul type="square">
<li>cd /usr/local/src/mplayer</li>
<li>./configure</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Compile and install FFmpeg
<ul type="square">
<li>cd /usr/local/src/ffmpeg/<br />
This command is one single line:</li>
<li>./configure &#8211;enable-shared &#8211;enable-nonfree &#8211;enable-gpl &#8211;enable-pthreads &#8211;enable-liba52 &#8211;enable-libamr-nb &#8211;enable-libamr-wb &#8211;enable-libfaac &#8211;enable-libfaad &#8211;enable-libmp3lame &#8211;enable-libtheora &#8211;enable-libvorbis &#8211;enable-libx264 &#8211;enable-libxvid &#8211;enable-cross-compile</li>
<li>make</li>
<li>make install</li>
<li>export LD_LIBRARY_PATH=/usr/local/lib/</li>
</ul>
</li>
<li>Finalize the codec setups:<br />
(Make sure these libraries exist on your server in their respective directories. FYI: the number which comes after the extension *<strong>.so</strong> might differe from one server to another.)</p>
<ul type="square">
<li>ln -s /usr/local/lib/libavformat.so.52.18.0 /usr/lib/libavformat.so.50</li>
<li>ln -s /usr/local/lib/libavcodec.so.51.62.0 /usr/lib/libavcodec.so.51</li>
<li>ln -s /usr/local/lib/libavutil.so.49.7.0 /usr/lib/libavutil.so.49</li>
<li>ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0</li>
<li>/sbin/ldconfig</li>
</ul>
</li>
<li>Compile and install FFmpeg-Php
<ul type="square">
<li>cd /usr/local/src/ffmpeg-php-0.6.0/</li>
<li>/usr/bin/phpize</li>
<li>./configure</li>
<li>make</li>
<li>make install<br />
Check and see if ffmpeg-php module is saved in</li>
<li>ls -al /usr/local/lib/php/extensions/no-debug-non-zts-20060613/<strong>ffmpeg.so</strong></li>
</ul>
</li>
<li>Install FFmpeg-Php (make sure the local path to your php.ini is correct.)
<ul type="square">
<li>/bin/echo &#8216;extension=ffmpeg.so&#8217; &gt;&gt; /usr/local/lib/php.ini</li>
</ul>
</li>
<li>Restart Apache to load FFmpeg-Php (This is for RedHat/CentOS v5.x)
<ul type="square">
<li>/sbin/service httpd restart</li>
</ul>
</li>
</ol>
<p>Let&#8217;s see if FFmpeg is working. Run the following command:</p>
<ul type="square">
<li>php -r &#8216;phpinfo();&#8217; | grep ffmpeg</li>
</ul>
<p>If you get a few lines similar to the following:</p>
<blockquote><p>ffmpeg<br />
ffmpeg-php version =&gt; 0.6.0-svn<br />
ffmpeg-php built on =&gt; Dec  5 2009 15:31:45<br />
ffmpeg-php gd support  =&gt; enabled<br />
ffmpeg libavcodec version =&gt; Lavc51.62.0<br />
ffmpeg libavformat version =&gt; Lavf52.18.0<br />
ffmpeg swscaler =&gt; disabled<br />
ffmpeg.allow_persistent =&gt; 0 =&gt; 0<br />
ffmpeg.show_warnings =&gt; 0 =&gt; 0</p></blockquote>
<p>That means FFmpeg, FFmpeg-Php, MPlayer, MEncoder, FLV2tool, LAME MP3 encoder &amp; libOGG are working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ezlinuxadmin.com/2009/12/install-ffmpeg-from-source/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
