<?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>Chris Jean&#039;s Blog &#187; CentOS</title>
	<atom:link href="http://chrisjean.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Mon, 30 Aug 2010 16:30:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Convert DOS-Formatted Files to Unix-Format in Ubuntu and CentOS</title>
		<link>http://chrisjean.com/2009/03/08/convert-dos-formatted-files-to-unix-format-in-ubuntu-and-centos/</link>
		<comments>http://chrisjean.com/2009/03/08/convert-dos-formatted-files-to-unix-format-in-ubuntu-and-centos/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 06:00:37 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[Mastering The Command Line]]></category>
		<category><![CDATA[newline]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[unix2dos]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1297</guid>
		<description><![CDATA[Have you ever seen a bunch of ^M characters in a text file? This odd character at the end of a line can also be represented as a Ctrl+M or &#60;CTRL&#62;M. You don&#8217;t know what it is, and you want it to go away. Today, I&#8217;ll help you understand what that odd ^M character is, [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Have you ever seen a bunch of ^M characters in a text file? This odd character at the end of a line can also be represented as a Ctrl+M or &lt;CTRL&gt;M. You don&#8217;t know what it is, and you want it to go away.</p>
<p>Today, I&#8217;ll help you understand what that odd ^M character is, why it is in some of your documents, and how to get rid of them.</p>

<h3>All About the Newline</h3>
<p>In text documents, lines are separated by what is called a <a href="http://en.wikipedia.org/wiki/Newline" target="_blank">newlin</a>e (also known as a line break or end of line). Different operating systems have different character codes that represent this newline.</p>
<p>For example:</p>
<ul>
<li>DOS-based systems, including Windows, as well as a number of other, older non-Unix OSes use a carriage return (CR) character followed by a line feed (LF) character.</li>
<li>Commodore and the old Apple OSes before OS X used a CR character. Since OS X+ is based partly on BSD, which is in turn based on Unix, the new Apple OSes use the Unix newline method described below.</li>
<li>Unix and its derivatives (Linux, BSD, and others) all use the single LF character to represent a newline.</li>
</ul>
<p>So what does all of this mean to you? It means that text documents that come from a Windows system won&#8217;t always play nice in Linux. The converse is true however. If you create a text file in Linux, many programs will fail to recognize the single LF as a newline and will render the document without any line breaks.</p>
<h3>dos2unix and unix2dos to the Rescue</h3>
<p>Fortunately, there are a couple of very easy to use programs that make dealing with this file format mess much easier. They are dos2unix and unix2dos.</p>
<p>These programs basically do exactly what their name implies: dos2unix takes a file and converts all DOS-style newlines to Unix-style newlines. unix2dos takes a file and converts all Unix-style newlines to DOS-stlye newlines.</p>
<p>I put Ubuntu and CentOS in the title because I&#8217;m going to give instructions for installing these programs on each of these distros. Why just these two? They are the two that I work with most often and are representative of the lion&#8217;s share of what people are using these days. If you need help with a different distro, please let me know in a comment.</p>
<h3>Installing dos2unix and unix2dos in Ubuntu</h3>
<p>There aren&#8217;t any dos2unix or unix2dos packages that can be found in Synaptic; howver, there is a packages that will install them for you. Simply open up Synaptic and install the tofrodos package. If you are like me and prefer to do this from the command line, you can run the following command:</p>
<div class="code">sudo apt-get install tofrodos</div>
<p>That&#8217;s all there is to it. Not only will dos2unix and unix2dos install, but alias programs fromdos and todos will be installed as well. These additional programs work in the same manner, so it&#8217;s purely a matter of preference which ones you use.</p>
<h3>Installing dos2unix and unix2dos in CentOS</h3>
<p>I really thought that I had to install these in CentOS, but amazingly, the programs are already installed by default. I tested this in a Virtual Machine fresh install, and the programs were there on the first boot.</p>
<p>So, CentOS users, you&#8217;re already good to go.</p>
<h3>Using dos2unix</h3>
<p>Fortunately, using these programs couldn&#8217;t be easier.</p>
<p>Let&#8217;s say that you are in a Terminal (Applications &gt; Accessories &gt; Terminal) viewing text files. Maybe you just downloaded a new WordPress plugin and you are reading the readme.txt file. It doesn&#8217;t really matter. However, there is a problem. The readme.txt file has a bunch of ^M characters at the end of each line, and it&#8217;s really distracting.</p>
<p>Simply exit out of the editor you are currently in, since the file will be modified, and run the following command:</p>
<div class="code">dos2unix readme.txt</div>
<p>If there are multiple files, you can specify each one with a space separating each. For example:</p>
<div class="code">dos2unix readme.txt install.txt *.php</div>
<p>The program doesn&#8217;t produce any output. Simply reopen your text file and look at all the beautiful non-existant ^M&#8217;s.</p>
<h3>Using unix2dos</h3>
<p>The unix2dos program has the exact same syntax as dos2unix. However, I thought it might be helpful to describe a situation in which you might need to use it.</p>
<p>You&#8217;re working on a project. You&#8217;ve just sent out your batch of files, and another member on the project complains that you are being a jerk and remove all the newlines in your text files. This other member is most likely using a Windows application that doesn&#8217;t understand the Unix newline format. Rather than getting into a format war, it&#8217;s typically better and quicker to simply convert your text files to a DOS/Windows format.</p>
<p>If you have a folder full of files that all need to be converted, simply run:</p>
<div class="code">unix2dos *</div>
<p>Now you can send these new files to your project group and hopefully avoid any more unproductive drama.</p>
<h3>File Formats in Vi</h3>
<p>If you happen to use Vi, you can change Vi back and forth between DOS and Unix modes for newlines with a simple command. &#8220;:set ff=dos&#8221; sets the editor to use DOS newline encoding and will save the file in a DOS-encoded format. &#8220;:set ff=unix&#8221; sets the editor use Unix newlines and will save the file in a Unix format.</p>
<p>Note that changing the format to dos from unix will always work as expected. This is because any file that contains just LF characters for new lines will be converted to CRLF while lines that already end in CRLF will be left as is.</p>
<p>If your Vi config defaults to a unix format and you open a DOS file, you will see the ^M characters. You can either use the dos2unix conversion utility first or change Vi first to the dos format and then to unix.</p>
<p>If you&#8217;d like Vi to default to DOS or Unix formating each time you start a new Vi session, you can add the setting to your ~/.vimrc file. In that file, either add &#8220;set ff=dos&#8221; or &#8220;set ff=unix&#8221; depending on your needs. Note the lack of the colon, :, in the .vimrc entries.</p>
<p>For more information on the ff or fileformat setting in Vi, check out the <a href="http://www.vim.org/htmldoc/options.html#%27fileformat%27" target="_blank">official documentation</a>.</p>
<h3>Closing Thoughts</h3>
<p>Maybe one day we won&#8217;t have to worry about these types of things. For now however, it&#8217;s good to know the tools that make these problems easily manageable.</p>
<p>BTW, <a href="http://en.wikipedia.org/wiki/Daylight_saving_time" target="_blank">Happy Daylight Savings Day</a> everyone. I hope you enjoyed the loss of an hour of sleep. <img src='http://chrisjean.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/03/08/convert-dos-formatted-files-to-unix-format-in-ubuntu-and-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Timezone in CentOS</title>
		<link>http://chrisjean.com/2009/03/03/change-timezone-in-centos/</link>
		<comments>http://chrisjean.com/2009/03/03/change-timezone-in-centos/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 06:00:52 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Mastering The Command Line]]></category>
		<category><![CDATA[Timezone]]></category>
		<category><![CDATA[zoneinfo]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1228</guid>
		<description><![CDATA[You just got your new CentOS dedicated server, and you notice that times in your logs aren&#8217;t quite right. You check the time from the command line (run &#8220;date&#8221;), and find that the timezone is set to US Eastern or some other timezone. How do you get this changed? Unfortunately, this is not an easy [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>You just got your new CentOS dedicated server, and you notice that times in your logs aren&#8217;t quite right. You check the time from the command line (run &#8220;date&#8221;), and find that the timezone is set to US Eastern or some other timezone. How do you get this changed?</p>
<p>Unfortunately, this is not an easy thing to figure out. Fortunately though, it&#8217;s not hard to do with the right directions.</p>

<p><em>Please note that you have to have root access to be able to make the changes detailed below.</em></p>
<p>There are a series of time zone files located at /usr/share/zoneinfo. Select the appropriate named timezone for your location. For my location, Oklahoma, USA, I actually have two that I can select from: America/Chicago or US/Central. Make note of the appropriate folder and file for your timezone.</p>
<p>The active timezone used on your system is in the /etc/localtime file. The default will vary depending on your server host but often seems to be EST or EDT (depending on the time of year you are checking). We simply need to replace this file with the file we selected in the previous step.</p>
<p>Now, I say replace, but I actually recommend creating a link to the pertinent file rather than actually making a copy. Let me explain the reasoning for this quickly.</p>
<p>A crucial part of the timezone shift calculations is the daylight savings calculations. Many people don&#8217;t realize this, but the daylight savings days were changed in 2007. When this change happened, all servers needed to be updated with new zoneinfo files.</p>
<p>If your server has an automated process to update these files when daylight savings calculations change, your /usr/share/zoneinfo files will be updated but the /etc/localtime file will not be. So, if you simply made a copy of the file, you&#8217;ll have to know when these updates come out and manually copy the file over. If you create a link, everything will take care of itself.</p>
<p>Enough of the banter. On with the show.</p>
<p>First, make a backup of the existing localtime file. It&#8217;s always good practice to make backups of original config files.</p>
<div class="code">mv /etc/localtime /etc/localtime.bak</div>
<p>Next, create the link:</p>
<div class="code">ln -s /usr/share/zoneinfo/<strong>America/Chicago</strong> /etc/localtime</div>
<p>Make sure to replace &#8220;America/Chicago&#8221; with the directory (if your zone has one) and filename of the timezone you wish to use.</p>
<p>Now you just need to test your change. Run &#8220;date&#8221; from the command line, and ensure that the appropriate time, date, and timezone are reported.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/03/03/change-timezone-in-centos/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Generating MIME Type in PHP is not Magic</title>
		<link>http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/</link>
		<comments>http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 17:24:04 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fileinfo]]></category>
		<category><![CDATA[Hostgator]]></category>
		<category><![CDATA[MIME]]></category>
		<category><![CDATA[mime_content_type]]></category>
		<category><![CDATA[PECL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=1031</guid>
		<description><![CDATA[Sorry about the late post everyone. I had a long week and went to bed before making sure a post was queued. Hopefully you&#8217;ll forgive me. I&#8217;m working on a project where I needed to generate a MIME type given a file name. Not only did I need to create a solution that worked, I [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Sorry about the late post everyone. I had a long week and went to bed before making sure a post was queued. Hopefully you&#8217;ll forgive me. <img src='http://chrisjean.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;m working on a project where I needed to generate a <a href="http://en.wikipedia.org/wiki/MIME" target="_blank">MIME type</a> given a file name. Not only did I need to create a solution that worked, I also needed the solution to be compatible with PHP 4/5 and not require any additional software to be installed on the host. I thought this would be a simple matter of finding a PHP function that does this. Unfortunately, things were not as simple as this.</p>

<h3>Problems with finfo_open</h3>
<p>I found a very helpful <a href="http://www.jellyandcustard.com/2006/01/19/php-mime-types-and-fileinfo/" target="_blank">PHP, Mime Types and Fileinfo</a> post on <a href="http://www.jellyandcustard.com/" target="_blank">Jelly and Custard</a>. The &#8220;Mime Types in PHP 4.x&#8221; seemed to be exactly what I wanted. I quickly tried it out on my server, and it failed instantly with the following error:</p>
<div class="code">PHP Fatal error: Call to undefined function finfo_open() in &#8230;.</div>
<p>Since I have PHP 5.2.6 running on my dev server, I was very confused since the post said that this was a &#8220;PHP 4.x&#8221; solution. I pulled up the PHP doc on the <a href="http://us.php.net/finfo_open" target="_blank"><code>finfo_open</code></a> function and was very surprised to see that the function is a PHP 5.3.0+ function. Fortunately, my version of PHP was just before this so that I could actually catch the error.</p>
<p>Turns out that the Jelly and Custard post points to another post, <a href="http://www.jellyandcustard.com/2006/01/19/installing-pecl-modules/" target="_blank">Installing PECL Modules</a>, where instructions are given for installing the <a href="http://pecl.php.net/package/Fileinfo" target="_blank">Fileinfo PECL Package</a>. Installing this package allows versions prior to 5.3.0 to use the <code>finfo_*</code> functions via <a href="http://pecl.php.net" target="_blank">PECL</a>.</p>
<p>This is not what I want. I&#8217;m working toward a solution that doesn&#8217;t require the installation of any additional software, and so far I&#8217;ve only seen solutions that require this. There has to be a better way.</p>
<h3>Problems with mime_content_type</h3>
<p>I then found the <a href="http://us.php.net/mime_content_type" target="_blank"><code>mime_content_type</code></a> function. This looks better. However, PHP has marked this function as <a href="http://en.wikipedia.org/wiki/Deprecation" target="_blank">deprecated</a> due to the PECL Fileinfo package. Relying on a deprecated function has numerous problems: it may throw warnings if used on versions of PHP that know the function is deprecated, most likely won&#8217;t receive any updates in the future, and could possibly be removed from future versions of PHP.</p>
<p>In addition to the deprecated issue, the <code>mime_content_type</code> function is laced with problems. In order to use the function the PHP on your system must have been built with the &#8220;<code>--with-mime-magic</code>&#8221; option. The function also relies upon the &#8220;mime_magic.magicfile&#8221; ini configuration to tell it where to find the magic file used to detect the MIME type of the file. This magic file may or may not exist/may or may not be readable.</p>
<h3>Initial Testing</h3>
<p><span class="option">These problems led to interesting results when I tested it on my CentOS dedicated and Hostgator servers.</span></p>
<p>On my CentOS 5.2 dedicated server, I have PHP 5.2.6. The PHP build on this server was not built with the &#8220;<code>--with-mime-magic</code>&#8221; option, so it doesn&#8217;t have access to the <code>mime_content_type</code> function at all. In addition to this, since the version is just before 5.3 and I haven&#8217;t installed the Fileinfo PECL package, my dedicated server does not have access to either of the official PHP solutions without installing additional software.</p>
<p>On my Hostgator shared server, I have access to PHP 5.2.8. Unlike my dedicated server, this server&#8217;s PHP build was built with the &#8220;<code>--with-mime-magic</code>&#8221; option. &#8220;This is great,&#8221; I thought. I ran a test, and the <code><code>mime_content_type</code></code> function did indeed exist. Like my CentOS server, my Hostgator server does not have the Fileinfo PECL package and does not have PHP 5.3, so the <code>finfo_*</code> functions are no go.</p>
<p>I did some more testing on my Hostgator server and was disappointed to find that the <code>mime_content_type</code> function exists yet is completely worthless. I tested file after file ranging from simple text files, to HTML documents, to a variety of image types. Every single test failed to produce a MIME type. When I say &#8220;failed&#8221;, I don&#8217;t mean that the program crashed with an error. The failure was worse than this, it simply returned an empty string to every single request.</p>
<p>I found that my Hostgator server&#8217;s PHP is set up to use the &#8220;/usr/local/apache/conf/magic&#8221; file to do it&#8217;s MIME magic. However, this file is not able to be read by my user. This means that the version of PHP might as well not have been built with the &#8220;<code>--with-mime-magic</code>&#8221; option at all.</p>
<p>It seems clear to me by now that there will not be an easy solution to this problem.</p>
<h3>Final Solution</h3>
<p>What I need is a solution that will first try to use the Fileinfo functions since they are the current standard. It will then fall back to using the <code>mime_content_type</code> function if and only if the function exists. Since the function is deprecated and PHP versions don&#8217;t actually package the replacement functions natively until 5.3.0, I need to also protect the code against conditions where neither Fileinfo nor <code>mime_content_type</code> are available. The final fallback will be manually generating the MIME type based upon an array match.</p>
<p>Using the fallback is not desirable since I probably won&#8217;t be updating the MIME types in the array very often, if at all. However, having it is better than having the code completely fail for common, present day MIME types. Hopefully, the conditions necessary to rely upon this fallback will become more and more rare as time goes on.</p>
<p>In addition to checking for the existence of the functions I&#8217;ll try to use, I need to make sure that the methods tried actually produce results. If a method fails to produce a non-empty value, I&#8217;ll move on to the next method.</p>
<h3>The Code</h3>
<p>I got the original idea for this code from a <a href="http://us.php.net/manual/en/function.mime-content-type.php#87856" target="_blank">comment by svogal</a> on the PHP doc site. I modified it to match my desired final solution.</p>
<p>The code is far to large to post here. You can download it <a href="http://chrisjean.com/wp-content/uploads/2009/02/mime_type_lib.zip" target="_blank">here</a>.</p>
<p>The array that I built for the mime types is quite large. Since I have a /etc/mime.types file (which is standard in most distros and provided by the <a href="http://en.wikipedia.org/wiki/Mailcap" target="_blank">mailcap</a> package), I simply used it to generate my array. I quickly built a Perl script that parses through the mime.types file and outputs a file containing the PHP code to create the array. This script makes it easy for me to update the array any time the mime.types file is updated.</p>
<p>You can download my Perl script <a href="http://chrisjean.com/wp-content/uploads/2009/02/generatemimetypes" target="_blank">here</a>. Simply run &#8220;perl generateMimeTypes&#8221; from the command line to build the array. The array code is put in a file called mime_type_var.code.</p>
<h3>Examples</h3>
<h4>Simple Use</h4>
<p>The code is fairly simple to use. Simply include or require the code in your own script and then call the get_file_mime_type function  by passing the file&#8217;s path as the parameter.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">require</span><span class="br0">&#40;</span> <span class="st0">&#8216;mime_type_lib.php&#8217;</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="re0">$mime_type</span> = get_file_mime_type<span class="br0">&#40;</span> <span class="st0">&#8216;/home/user/public_html/image.jpg&#8217;</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;$mime_type<span class="es0">\n</span>&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
<p>This produces the following output:</p>
<div class="code">image/jpeg</div>
<p>Note that PHP&#8217;s more advanced functions have the ability to dig into the content of the file to identify the MIME type, so if your system can make use of those functions and the file is not a JPEG image, the results could vary.</p>
<h4>Using the debug Parameter</h4>
<p>I&#8217;ve also provided a debug parameter that allows you to also get information on what method was used to get the MIME type. This may be helpful if you need to determine how sure you are that the detected MIME type is accurate. When the debug parameter is used, an associative array will be returned with a <code>mime_type</code> key and a <code>method</code> key.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw1">require</span><span class="br0">&#40;</span> <span class="st0">&#8216;mime_type_lib.php&#8217;</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="re0">$data</span> = get_file_mime_type<span class="br0">&#40;</span> <span class="st0">&#8216;/home/user/public_html/image.jpg&#8217;</span>, <span class="kw2">true</span> <span class="br0">&#41;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;MIME Type: ${data['mime_type']}<span class="es0">\n</span>&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Method: ${data['method']}<span class="es0">\n</span>&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
<p>This produces the following output:</p>
<div class="code">MIME Type: image/jpeg<br />
Method: from_array</div>
<p>The possible methods are: fileinfo, <code>mime_content_type</code>, from_array, and last_resort. The first two should be self-explanitory. from_array means that the resulting MIME type was pulled from the array built into the function. last_resort means that the type could not be identified which results in a generic MIME type of &#8220;application/octet-stream&#8221; being used.</p>
<h3>Conclusion</h3>
<p>Frankly, I&#8217;m disappointed in the solutions provided by PHP to detect MIME types. I have access to a very stable, highly-regarded shared host and an extremely powerful, up-to-date dedicated host, neither of which have the ability to use either of the PHP solutions to detect MIME types without adding additional software.</p>
<p>I don&#8217;t remember which version of PHP my dedicated box started with, but I did upgrade to 5.1.6 using the standard repository back in October. I was only able to update to 5.2.6 by using the <a href="http://www.jasonlitka.com/yum-repository/" target="_blank">Utter Ramblings repository</a> by <a href="http://www.jasonlitka.com/" target="_blank">Jason Litka</a>. True, I could compile and install 5.3 or the PECL package myself, but I produce software for people who don&#8217;t have a clue what a compiler is, let alone what repositories or PECL extensions are.</p>
<p>It&#8217;s things like this that make development a pain. I could always just be a jerk of a developer, have the line &#8220;requires PHP 5.3+&#8221;, and tell all people that can&#8217;t run the software to check the requirements. However, I think that my job is to make the end-user&#8217;s life easier, not more complicated.</p>
<p>Hopefully others that have had woes dealing with this situation can make use of my code, and we can all just wait a few years until the majority of hosts have a PHP version that supports these calls natively.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Unicode Support on CentOS 5.2 with PHP and PCRE</title>
		<link>http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/</link>
		<comments>http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 06:00:32 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[PCRE]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[Unicode]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=820</guid>
		<description><![CDATA[Yesterday, I talked about how to get the most out of running regular expressions in PHP. The reason that I needed to dig in deep on regular expression syntax with PHP is because I needed to write some regular expressions that deal with Unicode characters. After much reading, I believed that I knew everything that [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p><a href="http://chrisjean.com/2009/01/30/php-regular-expression-syntax-references/" target="_blank">Yesterday</a>, I talked about how to get the most out of running regular expressions in PHP. The reason that I needed to dig in deep on regular expression syntax with PHP is because I needed to write some regular expressions that deal with Unicode characters.</p>
<p>After much reading, I believed that I knew everything that I needed. I started writing some regex strings and testing the code. Unfortunately, every time I ran a test with a string that contained Unicode characters, the match failed. When I removed the Unicode characters from the string and tested again, it would work. I was baffled.</p>

<h3>Finding the Problem</h3>
<p>I had the regex testing characters (&#8216;\X&#8217;, &#8216;\pL&#8217;, etc) inside of a character class, such as &#8216;[\X-]&#8216;, since I was creating a regex to test for domains. I wrote a really simple rule by simply looking for &#8216;/^\X$/&#8217; and testing the regex with a single Unicode character. Amazingly, having the &#8216;\X&#8217; outside of the square brackets changed everything as I now received the following very concerning warning:</p>
<div class="code">PHP Warning:  preg_match(): Compilation failed: support for \P, \p, and \X has not been compiled at offset 2 in wp-content/plugins/dnsyogi/testunicode.php on line 4</div>
<p>Since PHP uses the PCRE engine to run regular expressions, I started to dig into it. I found out that I could query PCRE directly. I ended up with something very similar:</p>
<div class="code">$ pcregrep &#8216;/\X*/u&#8217; character.txt<br />
pcregrep: Error in command-line regex at offset 2: support for \P, \p, and \X has not been compiled</div>
<p>It looked like the error was coming from PCRE itself. I searched around for a while thinking that I could simply install a new package using yum. I hoped to find something like pcre-utf8, pcre-unicode, php-pcre-unicode, or something to make it simple and quick to add this support since I much prefer using package management tools rather than compiling and installing from source.</p>
<p>Unfortunately, no such package exists. This support is something that must be an option that PCRE is compiled with, and my CentOS repository only has packages that don&#8217;t include that support. After much digging around, I found that this isn&#8217;t necessarily CentOS&#8217;s fault as this package has carried over from the RHEL (Red Hat Enterprice Linux) side of things.</p>
<p>A great way of checking to see if this is an issue on your system is by running the following:</p>
<pre style="padding-left: 30px;">$ pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  No Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack</pre>
<p>This is the output that I received. Notice the &#8220;UTF-8 support&#8221; and the &#8220;No Unicode properties support&#8221; lines. This means that PRCE was compiled with the &#8220;&#8211;enable-utf8&#8243; configure option which allows PCRE to recognize and work with UTF-8 encoded strings. However, it wasn&#8217;t compiled with the &#8220;&#8211;enable-unicode-properties&#8221; configure option which works in conjunction with the enable-utf8 option to add support for the &#8216;\p&#8217;, &#8216;\P&#8217;, and &#8216;\X&#8217; character classes.</p>
<p>This seems to have been an oversight when the rpm file was first put together. Fortunately, there is a way to fix it.</p>
<h3>Fixing the Problem</h3>
<p>Since I&#8217;m sure that many of you are like me and would rather not manually compile and install software outside of the package management system, the solution is to update the rpm to have the option that it needs and install it.</p>
<p>I had never done this before. Fortunately, I found a very helpful guide that details this process out very nicely: <a href="http://bradthemad.org/tech/notes/patching_rpms.php" target="_blank">How to patch and rebuild an RPM package</a>.</p>
<p>I have provided the new rpm file that I have built at the bottom of this post. If you don&#8217;t care about all this jibber-jabber, you can skip down there and grab the file. However, if you would like to learn how to address this issue yourself or have a system that my file will not support, please read on to see how I rebuilt the rpm with the new option.</p>
<h3>Rebuilding the rpm</h3>
<ol>
<li>The first thing I did is set up my ~/.rpmmacros file and src/rpm folder structure as detailed in the Setup section of <a href="http://bradthemad.org/tech/notes/patching_rpms.php" target="_blank">the guide</a> that I&#8217;m following. I&#8217;ll simply refer you over there as it doesn&#8217;t need repeating here.</li>
<li>I needed to grab the source rpm for the current version of PCRE on my platform. I&#8217;m on CentOS 5.2 with version 6.6 of PCRE. I found the matching source rpm file (pcre-6.6-2.el5_1.7.src.rpm) <a href="http://mirrors.kernel.org/centos/5.2/os/SRPMS/pcre-6.6-2.el5_1.7.src.rpm" target="_blank">here</a>.</li>
<li>I then installed the source rpm in order to gain access to its files:
<pre style="padding-left: 30px;">$ rpm -ivh pcre-6.6-2.el5_1.7.src.rpm</pre>
<p>This put the necessary files into my ~/src/rpm/SOURCES and ~/src/rpm/SPECS folders.</li>
<li>I opened up the ~/src/rpm/SPECS/pcre.spec file and found the following line:
<pre style="padding-left: 30px;">%configure --enable-utf8</pre>
<p>I changed it to include the Unicode properties option:</p>
<pre style="padding-left: 30px;">%configure --enable-utf8 --enable-unicode-properties</pre>
<p>I then saved and closed the file.</li>
<li>This is the only change that I needed to make. So, now it is time to build the new rpm file. I simply ran the following to build it:
<pre style="padding-left: 30px;">$ rpmbuild -ba ~/src/rpm/SPECS/pcre.spec</pre>
<p>Toward the end of the large amount of output, I received the following:</p>
<pre style="padding-left: 30px;">Wrote: ~/src/rpm/SRPMS/pcre-6.6-2.7.src.rpm
Wrote: ~/src/rpm/RPMS/x86_64/pcre-6.6-2.7.x86_64.rpm
Wrote: ~/src/rpm/RPMS/x86_64/pcre-devel-6.6-2.7.x86_64.rpm
Wrote: ~/src/rpm/RPMS/x86_64/pcre-debuginfo-6.6-2.7.x86_64.rpm</pre>
<p>This tells me exactly where I can find my new source rpm and rpm files.</li>
</ol>
<h3>Updated rpm File for CentOS 5.2 64-bit</h3>
<p>If you are running a 64-bit version of CentOS 5.2, the following file should work for you. If you have a different architecture, Linux distro, or encounter any errors when trying to install this file, then you should follow the instructions above to build an rpm that is suitable for your distribution.</p>
<p><a href="http://chrisjean.com/wp-content/uploads/2009/01/pcre-66-27x86_64.rpm" target="_blank">pcre-6.6-2.7.x86_64.rpm</a> &#8211; PCRE 6.6 for CentOS 5.2 64-bit</p>
<div class="post-notice" style="margin-bottom:10px;">Thanks <a href="http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/comment-page-1/#comment-1144">Robin</a> for providing a 32-bit version: <a href="http://chrisjean.com/wp-content/uploads/2009/01/pcre-6.6-2.7.i386.rpm">pcre-6.6-2.7.i386.rpm</a></div>
<h3>Installing New rpm</h3>
<p>Now that I have my new rpm file, I just need to install it. Since I already have a pcre package installed, I need to tell the rpm command to update rather than install. The following command does this for me:</p>
<pre style="padding-left: 30px;"># rpm -Uvh ~/src/rpm/RPMS/x86_64/pcre-6.6-2.7.x86_64.rpm</pre>
<p>Notice that I need to be root to run this command.</p>
<p>Finally, to verify that everything worked, I ran the pcrecheck program again:</p>
<pre style="padding-left: 30px;">$ pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
  UTF-8 support
  Unicode properties support
  Newline character is LF
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack</pre>
<p>Looks good.</p>
<p>Finally, time to move on with life.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/31/unicode-support-on-centos-52-with-php-and-pcre/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Adding SSL Support to Apache on CentOS</title>
		<link>http://chrisjean.com/2009/01/14/adding-ssl-support-to-apache-on-centos/</link>
		<comments>http://chrisjean.com/2009/01/14/adding-ssl-support-to-apache-on-centos/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 19:16:38 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=588</guid>
		<description><![CDATA[This is going to turn into another one of my &#8220;I love package management&#8221; posts. When I first starting managing Linux servers with Apache, adding a new module to Apache required going back to the source code, remembering the configure parameters you compiled Apache with last time, configuring Apache again with the same parameters plus [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>This is going to turn into another one of my &#8220;I love <a href="http://en.wikipedia.org/wiki/Package_management_system" target="_blank">package management</a>&#8221; posts. When I first starting managing Linux servers with <a href="http://www.apache.org/" target="_blank">Apache</a>, adding a new module to Apache required going back to the source code, remembering the configure parameters you compiled Apache with last time, configuring Apache again with the same parameters plus whatever changes need to be made, compiling, testing, and then installing. It took hours. Now, it takes a few minutes to add something like <a href="http://www.modssl.org/" target="_blank">mod_ssl</a> support to Apache without having to compile anything.</p>

<h3>Installing</h3>
<p>Once again, my server is running <a href="http://www.centos.org/" target="_blank">CentOS</a> x64 5.2, and I&#8217;m using <a href="http://fedoraproject.org/wiki/Tools/yum" target="_blank">yum</a> to do package management. Thus, the following instruction may need to be modified for your specific system.</p>
<p>I first need to install the mod_ssl library.</p>
<p><code style="padding-left:20px;">yum install mod_ssl</code></p>
<p>If you are using a different package manager, such as <a href="http://www.debian.org/doc/manuals/apt-howto/" target="_blank">apt</a>, you can run a similar command. The important part is that you can easily install mod_ssl with your package manager rather than having to recompile Apache.</p>
<h3>Configuring Apache</h3>
<p>There are a variety of different ways to configure Apache to load the necessary SSL options. Also, these options may need to be changed or tweaked for your setup. That said, here is how I configured my server.</p>
<p>My httpd.conf includes all the files from conf.d/*.conf. I took advantage of this and created a conf.d/ssl.conf file. My ssl.conf file contains the following:</p>
<div style="padding-left:20px;">
<pre>LoadModule ssl_module modules/mod_ssl.so
Listen 443

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

SSLPassPhraseDialog  builtin

SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300

SSLMutex default

SSLRandomSeed startup file:/dev/urandom  512
SSLRandomSeed connect builtin

SSLCryptoDevice builtin
ServerName ssl.domain.com

DocumentRoot /home/site/html

ScriptAlias /cgi-bin /home/site/cgi-bin

SSLEngine on

SSLProtocol all -SSLv2

SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

SSLCertificateFile /etc/httpd/conf/ssl/ssl.crt/ssl.domain.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl/ssl.key/ssl.domain.com.key
SSLCertificateChainFile /etc/httpd/conf/ssl/ssl.crt/godaddy_intermediate_bundle.crt

SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0

CustomLog /home/site/logs/access.log combined</pre>
</div>
<p>The two lines at the top are extremely important. The first line actually loads the mod_ssl module. The second line tells the server to listen on port 443 (the default port for SSL and allows access using https).</p>
<p>Notice the SSLCertificateChainFile directive. This loads the chain certificate that was given to me by <a href="http://www.godaddy.com/gdshop/ssl" target="_blank">GoDaddy</a>, the SSL provider I used. If you don&#8217;t load your provider&#8217;s chain file properly (if necessary), your SSL will not function.</p>
<p>I also have a <a title="Sample ssl.conf file" href="http://chrisjean.com/wp-content/uploads/2009/01/ssl.conf" target="_blank">sample file</a> that you can use to create your own ssl.conf file. It contains comments that can help you understand all the options.</p>
<p>Once you&#8217;ve made your config changes, you need to ask Apache if everything is set up correctly. You can do so by running the following command:</p>
<p><code style="padding-left:20px;">service httpd configtest</code></p>
<p>Unless that command commands back with &#8220;Syntax OK&#8221;, you have a problem. Unless you know what the error means and how to fix it, the best thing to do is to copy the error and search for it in Google. That will be the quickest way of finding a solution.</p>
<p>For example, if I remove that first line in my ssl.conf, mod_ssl won&#8217;t load and I get the following error if I test my config:</p>
<div style="padding-left:20px;"><code>Syntax error on line 8 of /etc/httpd/conf.d/ssl.conf:<br />
Invalid command 'SSLPassPhraseDialog', perhaps misspelled or defined by a module not included in the server configuration</code></div>
<p>Searching around for &#8220;Invalid command &#8216;SSLPassPhraseDialog&#8217;&#8221; produces some results that indicate that the mod_ssl module isn&#8217;t loaded correctly.</p>
<p>Another common error message is:</p>
<div style="padding-left:20px;"><code>httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.d/ssl.conf: Can't locate API module structure `mod_ssl' in file /etc/httpd/modules/mod_ssl.so: /etc/httpd/modules/mod_ssl.so: undefined symbol: mod_ssl</code></div>
<p>This is a common mistake where you try to load the mod_ssl module in the old Apache 1 config method rather than the new Apache 2 method. The old method looks like:</p>
<p><code style="padding-left:20px;">LoadModule mod_ssl modules/mod_ssl.so</code></p>
<p>The correct config line would be:</p>
<p><code style="padding-left:20px;">LoadModule ssl_module modules/mod_ssl.so</code></p>
<h3>Configure Firewall</h3>
<p>Now that you have Apache configured, it&#8217;s time to open up port 443 on your firewall. I&#8217;m using iptables, so my instructions will be specific to it.</p>
<p>The easiest way to open up the port immediately is to run the following:</p>
<div style="padding-left:20px;"><code>iptables -A INPUT -p tcp -m tcp --dport https -j ACCEPT</code></div>
<p>This will immediately open up that port on your system. However, this change is only temporary, and a restart of <a href="http://www.netfilter.org/" target="_blank">iptables</a> or of your server will remove this rule.</p>
<p>Making the rule permanent on your system is completely dependent upon your own personal setup. I have seen hundreds of different ways that people have set up their persistent firewall rules. I like to create a service that makes it easy to load, clear, and reload my firewall rules. Firewall management is beyond the scope of this topic, so I will do a firewall post and then link to it so that you can see how I manage my own firewall rules.</p>
<p>Now all that is left is to enjoy your new secure site.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/14/adding-ssl-support-to-apache-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install FFmpeg and ffmpeg-php on CentOS Easily</title>
		<link>http://chrisjean.com/2009/01/13/install-ffmpeg-and-ffmpeg-php-on-centos-easily/</link>
		<comments>http://chrisjean.com/2009/01/13/install-ffmpeg-and-ffmpeg-php-on-centos-easily/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 23:59:13 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DAG]]></category>
		<category><![CDATA[FFmpeg]]></category>
		<category><![CDATA[ffmpeg-php]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=575</guid>
		<description><![CDATA[FFmpeg is an amazing collection of open-source tools that can record and stream video and audio. However, it can also transcode video and audio (convert the files to different formats), and that is what has me so excited. There&#8217;s also a great PHP package called ffmpeg-php that allows for easy use of FFmpeg from inside [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p><a href="http://ffmpeg.mplayerhq.hu/" target="_blank">FFmpeg</a> is an amazing collection of open-source tools that can record and stream video and audio. However, it can also transcode video and audio (convert the files to different formats), and that is what has me so excited. There&#8217;s also a great <a href="http://php.net/" target="_blank">PHP</a> package called <a href="http://ffmpeg-php.sourceforge.net/" target="_blank">ffmpeg-php</a> that allows for easy use of FFmpeg from inside PHP scripts. Today, I&#8217;m going to see if I can&#8217;t help you get both of these set up on your system.</p>
<p>Admittedly, it&#8217;s been a while since I&#8217;ve tried to install FFmpeg, about two years. I recently thought up some ideas on how I&#8217;d like to use FFmpeg, so I thought it was time to give it a try yet again. Today, I&#8217;m proud to say that installing FFmpeg is so much easier to install compared to the past, that I dare say it&#8217;s simple.</p>
<p>Here is my experience with installing FFmpeg on my server and how to fix the pitfalls that I encountered.</p>

<h3>Preface</h3>
<p>Note that I did all the following steps on a <a href="http://www.centos.org/" target="_blank">CentOS</a> server. The specific version is CentOS x64 5.2.</p>
<p>These instructions can work for other distros with little or no modifications, but some distros will be completely different. For example, the <a href="http://dag.wieers.com/rpm/" target="_blank">DAG RPM Repository</a> that I&#8217;m using (more info below) has support for the following distros: <a href="http://www.redhat.com/" target="_blank">Red Hat Enterprise Linux</a>, <a href="http://fedoraproject.org/" target="_blank">Fedora Core</a>, <a href="http://us.fixstars.com/products/ydl/" target="_blank">Yellow Dog Linux</a>, <a href="http://auroralinux.org/" target="_blank">Aurora Linux</a>, <a href="http://www.centos.org/" target="_blank">CentOS</a>, <a href="https://www.scientificlinux.org/" target="_blank">Scientific Linux</a> (they really need to get a verified SSL cert), <a href="http://www.taolinux.org/" target="_blank">TaoLinux</a>, <a href="http://whiteboxlinux.org/" target="_blank">WhiteBox Linux</a>, <a href="http://www.lineox.net/" target="_blank">Lineox</a>, and <a href="http://www.blagblagblag.org/" target="_blank">BLAG</a>. Other distros will need to use a different repository.</p>
<p>If you successfully get FFmpeg running on another distro, please comment your changes here and I&#8217;ll update the post (and make sure you get credit of course).</p>
<p>Also note that I experienced some bumps in the road while installing everything. While many of you may not experience these issues, I found it important to document these problems and how I fixed them in case you encounter them.</p>
<h3>Preparing</h3>
<p>The first thing that you need to do is set up the <a href="http://dag.wieers.com/rpm/" target="_blank">DAG repository</a>. This repository is an actively-maintained repository that provides a staggering number of packages with current or near current builds. Adding this repository is a great way to run the latest offerings of many packages.</p>
<p>Adding the DAG repository is simple. I&#8217;m using <a href="http://fedoraproject.org/wiki/Tools/yum" target="_blank">yum</a>, so I did the following to add the repository:</p>
<ol>
<li>Create and open a new file called <strong>/etc/yum.repos.d/dag.repo</strong>. I ran &#8220;<strong><code>vi /etc/yum.repos.d/dag.repo</code></strong>&#8220;.</li>
<li>Add the following text to the file:
<div style="padding-left:20px;"><code>[dag]<br />
name=DAG RPM Repository<br />
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag<br />
gpgcheck=1<br />
enabled=1</code></div>
</li>
<li>Finally, save and close the file.</li>
</ol>
<p>In order to successfully use the DAG repository with tools such as yum, you need to add <a href="http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt" target="_blank">DAG&#8217;s GPG key</a>. Failure to do so will result in an error like the following:</p>
<div style="padding-left:20px;"><code>warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 6b8d79e6<br />
Public key for faac.x86_64.1.26-1.el5.rf.rpm is not installed</code></div>
<p>In order to add the GPG key for DAG, run the following:</p>
<div style="padding-left:20px;"><code>rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt</code></div>
<p>The <a href="http://dag.wieers.com/rpm/FAQ.php#B1" target="_blank">DAG: Frequently Asked Questions</a> page has additional instructions on how to get the repository loaded and working on your distro.</p>
<p>Now that DAG is setup, it&#8217;s a good idea to update all your packages.</p>
<div style="padding-left:20px;"><code>yum update</code></div>
<p>Depending on the packages you currently have installed, this could potentially upgrade, install, or replace numerous packages that may or may not be very important to you. Make sure you carefully look through that list and do any necessary preparations before telling yum that it can go ahead.</p>
<p>For example, yum told me that it was going to replace my current <a href="http://dev.mysql.com/" target="_blank">MySQL</a> interface library for <a href="http://www.perl.org/" target="_blank">Perl</a> with a new one. I added to my check list a note to verify that my Perl code functioned correctly after the install.</p>
<p>I ran into another hitch when I told yum to go ahead with the update. It informed me that my current version of <a href="http://subversion.tigris.org/" target="_blank">Subversion</a> conflicted with the new version it wanted to install. When this happens, you need to remove the old package before proceeding. This time, I made backups of all of my repositories and my <strong>/etc/sysconfig/svnserve</strong> file before proceeding just in case. I then removed Subversion &#8220;<strong><code>yum remove subversion</code></strong>&#8220;, ran the update process &#8220;<strong><code>yum update</code></strong>&#8220;, and installed Subversion again &#8220;<strong><code>yum install subversion</code></strong>&#8220;.</p>
<h3>Installing &#8211; FFmpeg</h3>
<p>Now you are ready to install FFmpeg with yum. I wanted to install all the available FFmpeg packages, so I first asked yum what was available.</p>
<div style="padding-left:20px;"><code>yum search ffmpeg</code></div>
<p>Searching through the results, I found that three packages need to be installed: ffmpeg, ffmpeg-devel, and ffmpeg-libpostproc.</p>
<div style="padding-left:20px;"><code>yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc</code></div>
<p><em>Note: If you install ffmpeg-libpostproc, the entire FFmpeg software library changes from the LGPL license to the GPL license.</em></p>
<p>After a couple of minutes, the packages and the packages that they depend on were installed.</p>
<p>I simply ran &#8220;<strong><code>ffmpeg</code></strong>&#8221; from the command line, and I took the lack of threatening error or warning messages as a good sign that things were working.</p>
<h3>Preparing for ffmpeg-php</h3>
<p>I often work with programs through command line calls in code, but I wanted something more robust this time, so I looked around and found <a href="http://ffmpeg-php.sourceforge.net/" target="_blank">ffmpeg-php</a>. Based on the <a href="http://ffmpeg-php.sourceforge.net/doc/api/" target="_blank">API</a>, it looks to be a great tool to interface PHP and FFmpeg.</p>
<p>There are four things that are required to successfully install and run ffmpeg-php; they are:</p>
<ul>
<li>ffmpeg-0.4.9_pre1 or higher</li>
<li>php-4.3.0 or higher</li>
<li>gd-2.0 or higher</li>
<li>php-devel</li>
</ul>
<p>PHP and FFmpeg should be good to go since at the time of this writing, DAG has PHP version 5.1.6 and FFmpeg version 0.4.9. <a href="http://www.boutell.com/gd/" target="_blank">GD</a> and php-devel can be easily installed by running the following yum command:</p>
<div style="padding-left:20px;"><code>yum install php-gd php-devel</code></div>
<p>In case you are wondering what php-devel is for, it installs the <a href="http://php.mirrors.ilisys.com.au/manual/en/install.pecl.phpize.php" target="_blank">phpize</a> program which is used to install ffmpeg-php.</p>
<h3>Installing ffmpeg-php</h3>
<p>Now we are ready to install ffmpeg-php. This can be done in six easy steps:</p>
<ol>
<li>Download the <a href="http://sourceforge.net/project/showfiles.php?group_id=122353&amp;package_id=133626" target="_blank">latest ffmpeg-php release</a></li>
<li>Extract the archive:<br />
<code>tar -xjf ffmpeg-php-X.x.x.tbz2</code></li>
<li><code>cd ffmpeg-php-X.x.x/</code></li>
<li><code>phpize</code></li>
<li><code>./configure &amp;&amp; make</code></li>
<li><code>sudo make install</code></li>
</ol>
<h3>Finishing Thoughts</h3>
<p>This may seem like a lot of work when I earlier described this process as &#8220;simple,&#8221; but trust me that this is a thousand times easier than when I first tried installing FFmpeg. I think I spent three hours working on installing FFmpeg just to find out that it didn&#8217;t work the first time I tried.</p>
<p>Time and time again, package management has proven to be an extremely powerful tool. While I know the value of manually configuring and compiling code, the ease of simply using a package manager can reduce the time needed to install and manage software from hours or days to minutes.</p>
<p>I&#8217;m glad to see that FFmpeg has benefited from the use of these package managers and great repositories like the DAG RPM Repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/13/install-ffmpeg-and-ffmpeg-php-on-centos-easily/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Trouble with Ubersmith, Ioncube, and mb_internal_encoding</title>
		<link>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/</link>
		<comments>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 21:00:20 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips 'n Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Ioncube]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubersmith]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=485</guid>
		<description><![CDATA[Today I&#8217;m installing Ubersmith, a billing system solution, on a server to test it out. I have to say that Ubersmith has a more complex installation process than I&#8217;m used to these days. I guess that I&#8217;ve been spoiled. Here&#8217;s a quick word about what I&#8217;m running. My test server is a dedicated system running [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>Today I&#8217;m installing <a href="http://www.ubersmith.com/" target="_blank">Ubersmith</a>, a billing system solution, on a server to test it out. I have to say that Ubersmith has a more complex installation process than I&#8217;m used to these days. I guess that I&#8217;ve been spoiled.</p>
<p>Here&#8217;s a quick word about what I&#8217;m running. My test server is a dedicated system running <a href="http://www.centos.org/" target="_blank">CentOS</a> 5.2 64-bit. The software setup is nothing special as most of the packages are straight from the repository.</p>
<p>I loaded the release files on the server, untarred them, and proceeded to read the instructions. Everything looked to be straight-forward. I quickly got down to the part about installing Ioncube. That&#8217;s when the trouble started.</p>

<p>I followed the instructions for getting Ioncube loaded, quickly modified my php.ini file, and restarted Apache. I then tried to access the site and got nothing. I looked at the logs and found that Ioncube wasn&#8217;t loading while reporting the following error:</p>
<div style="padding-left:30px;"><code>Failed loading /usr/local/ioncube/ioncube_loader_lin_5.1.so:  /usr/local/ioncube/ioncube_loader_lin_5.1.so: wrong ELF class: ELFCLASS32</code></div>
<p>Frankly, I had no idea what that meant. A bit of searching later, I find that I apparently have the wrong Ioncube loader. That didn&#8217;t make any sense since I loaded the exact loader that the ioncube-loader-helper.php program told me to use. I had a hunch that I knew what the problem was and decided to check it out. Yup, Ioncube Loader has 32-bit and 64-bit versions, the problem has to be that the Ubersmith code came with the 32-bit code. I downloaded a Linux (x86-64) archive from <a href="http://www.ioncube.com/loaders.php" target="_blank">the Ioncube Loader packages</a> page, loaded it up, restarted Apache again, and got Ioncube to load properly.</p>
<p>Ioncube was now loaded, but the page still didn&#8217;t render. Looking at the logs, I found this wonderful gem:</p>
<div style="padding-left:30px;"><code>PHP Fatal error:  Call to undefined function mb_internal_encoding() in /home/site/html/include/i18n.boot.php on line 15</code></div>
<p>My first thought was, &#8220;great, the software is broken.&#8221; A quick google later, I found that <code><a href="http://us2.php.net/manual/en/function.mb-internal-encoding.php" target="_blank">mb_internal_encoding</a></code> is part of PHP, but it is not a defaultly included option. I looked around at how to activate or add it, and everyone was going on about needing to recompile PHP. I&#8217;ve compiled everything from simple command-line tools to Apache2, but I always prefer using repository releases as it makes maintenance that much easier, so I was very upset to see that I needed to compile PHP with a new set of options just to run this software.</p>
<p>I was about to give up on Ubersmith altogether when I remembered how many amazing things package management can do. I ran &#8220;<strong><code>yum search mbstring</code></strong>&#8221; and found that there was a package called <code>php-mbstring</code> ready and waiting for me to install it. I ran &#8220;<strong><code>yum install mbstring</code></strong>&#8220;, restarted Apache, and finally the Ubersmith setup wizard was ready for me.</p>
<p>So, there are a few key pieces of wisdom that I have learned from my experience with installing Ubersmith:</p>
<ol>
<li>Don&#8217;t trust that the installation documents/tools give you all the information you need. Ubersmith made a bad assumption that all systems will only require the 32-bit Ioncube while not making any notes that people on 64-bit platforms need to download new software. Ioncube&#8217;s installation helper neglected to check to see if the Ioncube files I had were built to work on my platform, and just like Ubersmith, the helper made no attempt to notify me that I may require different files depending on whether my platform is 32-bit or 64-bit.</li>
<li>Never trust that the third-party software packaged with another piece of software is the correct software for your system. If something breaks, first replace that packaged software with software freshly downloaded from the developer&#8217;s site.</li>
<li>When references say to compile your own software to get something to work, always remember to try using the package management tools first.</li>
</ol>
<p>As I continued on the setup path, this wisdom had immediate use. The setup wizard indicated that two PHP extensions were missing: Mcrypt and XML-RPC. I immediately ran &#8220;<strong><code>yum search mcrypt</code></strong>&#8221; and &#8220;<strong><code>yum search xmlrpc</code></strong>&#8221; which returned positive results. I then ran &#8220;<strong><code>yum install php-mcrypt</code></strong>&#8221; and &#8220;<strong><code>yum install php-xmlrpc</code></strong>&#8221; and was golden. Just think if I had decided on compiling my own version of PHP earlier, I would have finally finished, gotten it working, and then had to do it all over again when I ran the setup and hit this snag. Thank you <a href="http://fedoraproject.org/wiki/Tools/yum" target="_blank">yum</a>.</p>
<p>One thing that I have a gripe about is Ioncube&#8217;s navigation structure. I went to their site looking for download links for Ioncube Loader, and could not find them anywhere. I ended asking Google where I could find Ioncube Loader, and like a good little Google, it was right on the first try. I then tried again to find that page in the nav and found it under <strong>Products &gt; Free Loaders for Encoded Files</strong>. I&#8217;m probably just daft, but I skipped right over that stuff because I was skimming the left side of the nav looking for something that started with &#8220;Ioncube &#8230;&#8221; not &#8220;Free &#8230;&#8221; At the very least, put links on the encoder pages that point to the loader page and say, &#8220;Looking for Ioncube Loader? Click here.&#8221;&lt;/rant&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2009/01/06/trouble-with-ubersmith-ioncube-and-mb_internal_encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Distro Tests</title>
		<link>http://chrisjean.com/2008/08/07/linux-distro-tests/</link>
		<comments>http://chrisjean.com/2008/08/07/linux-distro-tests/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 23:50:36 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Distro]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux Mint]]></category>
		<category><![CDATA[Mandriva]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Sabayon]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=264</guid>
		<description><![CDATA[I&#8217;ve poked around with some distros over the last few days. They&#8217;ve all been Live Distros running in VMWare. Some of the Distros ran very well like this (Fedora, Mandriva, openSUSE, and Ubuntu), but others failed miserably in one way or another (Linux Mint, Sabayon). Unfortunately, CentOS cannot be installed from a Live CD, so [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>I&#8217;ve poked around with some distros over the last few days. They&#8217;ve all been Live Distros running in <a href="http://www.vmware.com/" target="_blank">VMWare</a>. Some of the Distros ran very well like this (Fedora, Mandriva, openSUSE, and Ubuntu), but others failed miserably in one way or another (Linux Mint, Sabayon). Unfortunately, CentOS cannot be installed from a Live CD, so I was unable to test out its installer in VMWare.</p>

<h3>Starting Over</h3>
<p>I realized that running all these Distros in a Live environment and in VMWare may be unfair. So I&#8217;m going to start from scratch, and do all the processes by directly running each Live Distro on the machine directly. This time, I&#8217;ve created a list of tasks to do in each Distro. I&#8217;ll make notes as I try to do each step for each Distro.</p>
<h3>Test Basics</h3>
<p>I will run each Distro through as much of the list as I can (some Distros may not be able to do certain tests). For each item, I will record how easy it is for me to complete (five-point scale), how well errors or potential problems are reported (five-point scale), and make general notes about the process.</p>
<h3>Live Distro Test</h3>
<p>The idea for this test is to get a good idea of how much functionality each Distro can provide without having to be installed. I&#8217;ll be looking for the best out of box experience. Unless the Distro provides a clear way to allow the task to work, I won&#8217;t make any changes to the installation. Since this is a live run of the Distro, making a bunch of changes each time just to do a task would be very unproductive.</p>
<ul>
<li>Boot to GUI desktop. This will test how easily the Distro deals with a dynamic mix of hardware and how well it auto-configures itself.</li>
<li>Test keyboard buttons. I&#8217;ll press the non-standard, Microsoft-specific and media keys) on my keyboard and see how many of them are recognized by the Distro.</li>
<li>Run Firefox and load <a href="http://google.com/" target="_blank">Google</a>.  This will test for automatic discovery and connection to the network. The internet connection will be handled by the router, so connection to the network should be sufficient.</li>
<li>While Firefox is still open, I&#8217;ll test to see if my additional mouse buttons are recognized and mapped to the back and forward functions of the browser.</li>
<li>Mount the existing NTFS drives.
<ul>
<li>Copy files back and forth.</li>
<li>Test loading media from an NTFS drive.</li>
</ul>
</li>
<li>Play an audio CD. This will test the ability to auto-load an audio disk. It will also test whether or not the sound card was correctly identified and appropriate drivers were loaded for it.</li>
<li>Play a DVD movie. Similar to the audio CD test, this test will test whether the Distro can automatically load a movie when popped in, how well the audio works, and how smoothly it renders the video. I expect at least a couple Distros to fail this test due to the DVD decoders being proprietary.</li>
<li>I&#8217;d like to find out how well the automatic mounting of USB drives works, so I&#8217;ll connect a USB flash drive and a USB hard drive. I&#8217;ll then move and copy files around to get a good feel for the performance.</li>
<li>Play audio files. I&#8217;ll test the playback ability for mp3 and wma. I might also test Vorbis and FLAC. This will be yet another test of the sound playback and will test codec decoder ability.</li>
<li>Play video files. I&#8217;ll assemble a collection of video files with different encoding schemes and test them out. This will test the sound playback, smoothness of video rendering, and decoder ability.</li>
<li>Load Firefox and visit some sites.
<ul>
<li>First I&#8217;ll visit <a href="http://homestarrunner.com/" target="_blank">homestarrunner.com</a> and watch the intro video. This will be a good test to check for Flash support.</li>
<li>Next I&#8217;ll go to the <a href="http://rvb.roosterteeth.com/" target="_blank">Red vs. Blue</a> site and check out their latest video. These videos are much more intense than the Home Star Runner ones and will be a better test of the performance of the Flash video.</li>
<li>For the final stop on the Flash tour, I&#8217;ll load up <a href="http://newgrounds.com/" target="_blank">Newgrounds.com</a> and play a game. This will be another good Flash performance check.</li>
<li>I&#8217;ll then log into my Gmail account, and check my messages, send a message, and do some basic browsing around. This should work smoothly, but I&#8217;d like to check just to make sure.</li>
<li><a href="http://www.gametrailers.com/" target="_blank">Gametrailers.com</a> has content in Flash, QuickTime, and Windows Media formats, so I&#8217;ll stop there next and check out a game trailer in the different formats. I don&#8217;t expect any of the Distros to render QuickTime or Windows Media videos, but I&#8217;d love to know if any of them can.</li>
<li>A final test is to go to <a href="http://www.apple.com/trailers/" target="_blank">Apple&#8217;s Movie Trailers</a> site and try to watch a movie preview in high quality. Once again, I don&#8217;t expect any Distro to do this without any tweaking, but I&#8217;d love to know if any can.</li>
</ul>
</li>
<li>SSH into another box. I don&#8217;t expect any Distro to have a problem with this, but I&#8217;d love to know if any do.</li>
<li>Load up <a href="http://www.openoffice.org/product/writer.html" target="_blank">OpenOffice Writer</a>, add some text, and try to send the file as an email attachment. I&#8217;d love to know the different approaches each Distro has to sending an email without a configured Email client.</li>
<li>Run the <a href="http://unigine.com/download/" target="_blank">Unigine demo</a> as a benchmark for 3D rendering.</li>
</ul>
<h3>Installation Test</h3>
<p>After testing out how well the Live Distro works, it&#8217;s time to get to business and install to the disk. This process will be done through each Distro&#8217;s live installer (except CentOS which will be installed from the DVD due to not having a live installer). This test doesn&#8217;t have any steps and each installation will be done with most of the options left as default.</p>
<h3>Using the Installed Distro</h3>
<p>Unlike my process for the Live Distro, if the task fails, I&#8217;ll try my best to make changes that will result in successfully running the task.</p>
<ul>
<li>Update all packages.</li>
<li>Run through all the Live Distro steps again. This will check for any enhancements that came from package upgrades or potential differences between the live and installed versions.</li>
<li>Connect my USB printer. I&#8217;d like to see if any Distro will automatically configure the printer.
<ul>
<li>Install the printer, if necessary.</li>
<li>Print out a document with images.</li>
</ul>
</li>
<li>Connect my camera via USB.</li>
<li>Install and test Ventrilo.</li>
<li>Install Wine.
<ul>
<li>Install and test Steam.</li>
<li>Install and test Team Fortress 2.</li>
<li>Install and test Crimson Editor.</li>
</ul>
</li>
<li>Get the fancy Compiz/Beryl desktop stuff working. I&#8217;m not sure if I will actually use such a desktop, but I would like to see what it takes to get each Distro to do it.</li>
</ul>
<h3>Distros to be Tested</h3>
<p>I&#8217;ve made a couple of additions to my list. The list of Distros I want to test are as follows:</p>
<ul>
<li><a href="http://centos.org/" target="_blank">CentOS 5.2</a></li>
<li><a href="http://fedoraproject.org/" target="_blank">Fedora 9</a></li>
<li><a href="http://linuxmint.com/" target="_blank">Linux Mint</a></li>
<li><a href="http://www.mandriva.com/" target="_blank">Mandriva</a></li>
<li><a href="http://opensuse.org/" target="_blank">openSUSE</a></li>
<li><a href="http://www.sabayonlinux.org/" target="_blank">Sabayon</a></li>
<li><a href="http://ubuntu.com/" target="_blank">Ubuntu</a></li>
</ul>
<h3>Final Thoughts</h3>
<p>In the end, I&#8217;d like to get a good feeling for what some of the major Linux Distros are capable of and how easy they are to work with. From the results of my tests, I plan to select my favorite and start using it as my primary desktop for a while.</p>
<p>I&#8217;ll post my reviews as I progress through the tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/08/07/linux-distro-tests/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Initial Linux Distro Selections</title>
		<link>http://chrisjean.com/2008/08/04/initial-linux-distro-selections/</link>
		<comments>http://chrisjean.com/2008/08/04/initial-linux-distro-selections/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 18:59:46 +0000</pubDate>
		<dc:creator>gaarai</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Random Ramblings]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Distro]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[Sabayon]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://gaarai.com/?p=252</guid>
		<description><![CDATA[As I talked about in my Time to Switch to Linux post, I&#8217;m ready to finally migrate away from Windows and into Linux. The biggest question for me is which Distro do I want to start with. Me being a lover of lists, I have a few criteria that I want the Distro that I [...]]]></description>
			<content:encoded><![CDATA[<!-- filtered -->
<p>As I talked about in my <a href="http://chrisjean.com/2008/07/31/time-to-switch-to-linux/">Time to Switch to Linux post</a>, I&#8217;m ready to finally migrate away from Windows and into Linux.  The biggest question for me is which <a href="http://en.wikipedia.org/wiki/Linux_distribution" target="_blank">Distro</a> do I want to start with. Me being a lover of lists, I have a few criteria that I want the Distro that I select to meet:</p>

<h3>Desired Functionality</h3>
<ul>
<li>Be relatively easy to install. I don&#8217;t need something so easy that my Grandmother could do it, but I also don&#8217;t want to be over-burdened with dozens of packages to install just to get the initial installation working properly.</li>
<li>Have a clean and easy GUI. I think <a href="http://www.beryl-project.org/" target="_blank">Beryl/Compiz</a> is really slick, but I really don&#8217;t think I need to be messing with all that stuff when I just want to start off with something that is functional.</li>
<li>Be compatible with my current hardware. I know that hardware support in the major Distros has seen vast improvements in recent years. I just want to know that I can still make full use of my <a href="http://www.microsoft.com/hardware/mouseandkeyboard/productdetails.aspx?pid=043" target="_blank">Microsoft Natural Ergonomic 4000</a> keyboard and my <a href="http://www.logitech.com/index.cfm/mice_pointers/mice/devices/187&amp;cl=us,en" target="_blank">Logitech MX 518</a> mouse. For example, I want to use all of the buttons on my mouse (buttons 4 and 5 should already function for or be easily mapable to forward and back in the browser) and be able to easily map the Windows-specific keys on my keyboard to functions in the UI or key combinations. Just having this functionality alone will do a lot to help me ease my transition.</li>
<li>Easy hotkey assignments. I love having quick access to programs by hitting some key+key combination. I use <a href="http://www.autohotkey.com/" target="_blank">AutoHotkey</a> on my Windows systems to hotkey all the programs I use frequently, I&#8217;d love to be able to easily mirror the functionality on Linux.</li>
<li>Have an active and thriving community for support/troubleshooting reasons.</li>
<li>Be able to support some of my Windows programs if possible. In particular, <a href="http://www.google.com/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Forange.half-life2.com%2Ftf2.html&amp;ei=oS6XSMelCaf8igHXpOm3Cg&amp;usg=AFQjCNE2rKvwVxavIbG1qTa_nh1-FMjpUA&amp;sig2=V-XOrpsF3rmkqf46KCRYsg" target="_blank">Team Fortress 2</a> and <a href="http://www.ventrilo.com/" target="_blank">Ventrilo</a> as I&#8217;m a member of the <a href="http://edgegamers.org/" target="_blank">EGO gaming clan</a> and don&#8217;t want to give that up for an operating system. I&#8217;m sure I can have some of the Linux-running members help me with getting this set up.</li>
</ul>
<p>After browsing around <a href="http://distrowatch.com/" target="_blank">DistroWatch</a> for a while, I have found a few Distros have grabbed my attention more than the others.</p>
<h3>Ubuntu<a href="http://www.ubuntu.com/" target="_blank"></a></h3>
<p>I have been an <a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> fan for a long time now. I ordered one of the original release disks that they offered years ago and was instantly impressed. My understanding is that they&#8217;ve come a long way since then. My only reservation is the lack of support for non-open-source software, such as proprietary nVidia drivers or proprietary codecs. This probably isn&#8217;t a big deal as plenty of people have guides about adding such things.</p>
<h3>Sabayon</h3>
<p>Another one of the Distros I checked out a while back when I first started playing with the idea of running Linux at home, <a href="http://www.sabayonlinux.org/" target="_blank">Sabayon</a> is looking good to be my final choice. While I&#8217;m not too familiar with <a href="http://en.wikipedia.org/wiki/Gentoo_Linux" target="_blank">Gentoo</a>, the Distro which Sabayon is built off of, Sabayon does have some interesting stuff going for it. I&#8217;m most interested in how they try to ease installation and use of many cutting edge features, such as enhanced proprietary driver support, and their unique packaging system <a href="http://en.wikipedia.org/wiki/SabayonLinux#Features" target="_blank">Entropy</a>.</p>
<h3>openSUSE</h3>
<p>I don&#8217;t personally have much experience with <a href="http://www.opensuse.org/" target="_blank">openSUSE</a>, but I have read many good reviews and recommendations about it. My biggest reservation is I don&#8217;t like what I&#8217;ve read about Novell and Microsoft and how it relates to openSUSE.</p>
<h3>Fedora</h3>
<p>Most of my experience with Linux comes from <a href="http://www.redhat.com/rhel/" target="_blank">Red Hat EL</a>. <a href="http://fedoraproject.org/" target="_blank">Fedora</a> is a Distro that is spun off of the main releases of RHEL, so it will have much in common. Maybe it would be best if I stick with a platform that has a similar foundation which could ease my changeover.</p>
<h3>CentOS</h3>
<p>My personal webserver runs <a href="http://www.centos.org/" target="_blank">CentOS</a>, and I really like it, sometimes even more than Red Hat EL. I really like using <a href="http://en.wikipedia.org/wiki/Yellow_dog_Updater%2C_Modified" target="_blank">yum</a> as it makes updates extremely easy. Hopefully the desktop version will be able to hold up to the results I&#8217;ve experienced from the server version.</p>
<h3>Conclusion</h3>
<p>So those are the options that I&#8217;m currently looking at. Fortunately, all the distros I&#8217;ve decided to explore more have <a href="http://en.wikipedia.org/wiki/Live_CD" target="_blank">Live Distros</a> available. This will make it easy for me to &#8220;try before I buy&#8221;. In other words, I can try out a basic version of the Distro without having commit to an installation of it first.</p>
<p>Updates will be coming with my impression of each distro and my final selection.</p>
]]></content:encoded>
			<wfw:commentRss>http://chrisjean.com/2008/08/04/initial-linux-distro-selections/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
