<?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 JeanChris Jean &#187; yum</title>
	<atom:link href="http://chrisjean.com/tag/yum/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisjean.com</link>
	<description>Linux, WordPress, programming, anime, and other stuff</description>
	<lastBuildDate>Tue, 08 May 2012 20:36:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>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>Chris Jean</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>
<p><span id="more-575"></span></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://apt.sw.be/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>32</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>Chris Jean</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><span id="more-485"></span></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>
	</channel>
</rss>

