<?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>Dazzle Software &#187; RED5</title>
	<atom:link href="http://blog.dazzlecms.com/category/servers/red5/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dazzlecms.com</link>
	<description>The net&#039;s largest script collection and resource web portal</description>
	<lastBuildDate>Sat, 26 Nov 2011 12:13:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How To Install RED5 Server on Centos 5.4</title>
		<link>http://dazzlesoftware.ca/tutorials/Entry/how-to-install-red5-media-server-10-on-linux.html</link>
		<comments>http://dazzlesoftware.ca/tutorials/Entry/how-to-install-red5-media-server-10-on-linux.html#comments</comments>
		<pubDate>Sat, 24 Apr 2010 23:15:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Frontpage]]></category>
		<category><![CDATA[RED5]]></category>

		<guid isPermaLink="false">http://blog.dazzlecms.com/?p=42</guid>
		<description><![CDATA[How To Install RED5 Server on Centos 5.4 In this how to i will describe how to install RED5 server on Centos 5.4.x This how to can be used to install RED5 server on Centos 4 and Fedora 8 – 11 as well. RED5 is open source flash server written in java supports streaming audio/video, [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>
<div>
<div>
<h1>How To Install RED5 Server on Centos 5.4</h1>
</div>
</div>
</li>
</ul>
<p>In this how to i will describe how to install RED5 server on Centos 5.4.x This how to can be used to install RED5 server on Centos 4 and Fedora 8 – 11 as well. RED5 is open source flash server written in java supports streaming audio/video, recording client streams, shared objects, live stream publishing etc.</p>
<h3>1) Download and Install Java</h3>
<p>RED5 server depends on Java. CentOS 5.4 comes with OpenJDK 1.6 and install it using yum.</p>
<blockquote><p>yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-src</p></blockquote>
<h3>2) Download and Install Ant (Apache Project)</h3>
<p>Ant will need to compile RED5 server code. Ant comes in binary form, so just download and install it in /usr/local directory.</p>
<blockquote><p>cd /usr/src<br />
wget http://apache.sunsite.ualberta.ca/ant/binaries/apache-ant-1.8.0-bin.tar.bz2<br />
tar jxvf apache-ant-1.8.0-bin.tar.bz2<br />
mv apache-ant-1.8.0 /usr/local/ant</p></blockquote>
<h3>3) Export Variables for Ant and Java</h3>
<blockquote><p>export ANT_HOME=/usr/local/ant<br />
export JAVA_HOME=/usr/lib/jvm/java<br />
export PATH=$PATH:/usr/local/ant/bin<br />
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip</p></blockquote>
<p>Also export these variables in /etc/bashrc to become available for every user login or for any terminal opens.</p>
<blockquote><p>echo ‘export ANT_HOME=/usr/local/ant’ &gt;&gt; /etc/bashrc<br />
echo ‘export JAVA_HOME=/usr/lib/jvm/java’ &gt;&gt; /etc/bashrc<br />
echo ‘export PATH=$PATH:/usr/local/ant/bin’ &gt;&gt; /etc/bashrc<br />
echo ‘export CLASSPATH=.:$JAVA_HOME/lib/classes.zip’ &gt;&gt; /etc/bashrc</p></blockquote>
<h3>4) Download and Install RED5 Server</h3>
<p>Here the latest version available for RED5 is 0.9 on site but download from google code using svn as the tarball of 0.9 on site is missing some of the files.</p>
<blockquote><p>cd /usr/src<br />
svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5<br />
mv red5 /usr/local/<br />
cd /usr/local/red5<br />
ant prepare<br />
ant dist</p></blockquote>
<p>you will see a ton of lines, but you should get at last</p>
<p><strong>BUILD SUCCESSFUL</strong></p>
<p>that’s mean its install and now copy the conf directory from dist/ and test the red5 installation.</p>
<blockquote><p>cp -r dist/conf .<br />
./red5.sh</p></blockquote>
<p>If it shows Installer service created in the last then everything is fine here, press ctrl+c and move to next step to create init script.</p>
<h3>5) Init Script</h3>
<p>Now we will create init script for red5 to start, stop and restart easily.</p>
<blockquote><p>vi /etc/init.d/red5</p></blockquote>
<p>The init script code below:</p>
<blockquote><p>#!/bin/sh<br />
# For RedHat and cousins:<br />
# chkconfig: 2345 85 85<br />
# description: Red5 flash streaming server<br />
# processname: red5</p>
<p>PROG=red5<br />
RED5_HOME=/usr/local/red5<br />
DAEMON=$RED5_HOME/$PROG.sh<br />
PIDFILE=/var/run/$PROG.pid</p>
<p># Source function library<br />
. /etc/rc.d/init.d/functions</p>
<p>[ -r /etc/sysconfig/red5 ] &amp;&amp; . /etc/sysconfig/red5</p>
<p>RETVAL=0</p>
<p>case “$1″ in<br />
start)<br />
echo -n $”Starting $PROG: ”<br />
cd $RED5_HOME<br />
$DAEMON &gt;/dev/null 2&gt;/dev/null &amp;<br />
RETVAL=$?<br />
if [ $RETVAL -eq 0 ]; then<br />
echo $! &gt; $PIDFILE<br />
touch /var/lock/subsys/$PROG</p>
<p>fi<br />
[ $RETVAL -eq 0 ] &amp;&amp; success $”$PROG startup” || failure $”$PROG startup”<br />
echo<br />
;;<br />
stop)<br />
echo -n $”Shutting down $PROG: ”<br />
killproc -p $PIDFILE<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/$PROG<br />
;;<br />
restart)<br />
$0 stop<br />
$0 start<br />
;;<br />
status)<br />
status $PROG -p $PIDFILE<br />
RETVAL=$?<br />
;;<br />
*)<br />
echo $”Usage: $0 {start|stop|restart|status}”<br />
RETVAL=1<br />
esac</p>
<p>exit $RETVAL</p></blockquote>
<p>Now start the service</p>
<blockquote><p>/etc/init.d/red5 start</p></blockquote>
<p>check status</p>
<blockquote><p>/etc/init.d/red5 status<br />
red5 (pid  XXXXX) is running…</p></blockquote>
<p>again you can do stop, restart.</p>
<h3>6) Test</h3>
<p>Now test the RED5 installation by opening following URL in browser</p>
<p>http://yourip:5080/</p>
<p>you will see red5 page like this</p>
<p><img title="red5_11" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_11.jpeg" alt="red5_11" width="450" height="269" /></p>
<p>and demos can be find here.</p>
<p>http://yourip:5080/demos/</p>
<p><img title="red5_21" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_21.jpeg" alt="red5_21" width="400" height="239" /></p>
<p>You can use simple port tester tool that determines which ports the Flash Player is able to connect through to the Red5 server. Put your server address or IP in HOST when using port tester. You should get SUCCESS on RTMP or port 1935. If not please check your firewall.</p>
<p>http://yourip:5080/demos/port_tester.html</p>
<p><img title="red5_3" src="http://www.sohailriaz.com/wp-content/uploads/2009/08/red5_3.jpeg" alt="red5_3" width="400" height="239" /></p>
<h3>7) ISSUE</h3>
<p>When you run ./red5.sh, it will show you <strong>Installer service created</strong>. Thats mean everything runs fine and red5 server is up. But if you went to port_tester.swf using demos above or your application shows connections FAILS, this is an issue of RTMPT and RTMPTS. You can see it by running</p>
<blockquote><p>/usr/local/red5/red5.sh</p>
<p>output trancated</p>
<p>[INFO] [main] org.red5.server.tomcat.TomcatLoader – RTMPT server bean was not found<br />
[INFO] [main] org.red5.server.tomcat.TomcatLoader – RTMPS server bean was not found</p>
<p>output truncated</p></blockquote>
<p>If you see this you have to uncomment the RTMPT and RTMPTS TomcatLoader in<strong>/usr/local/red5/conf/red5-core.xml</strong></p>
<blockquote><p>vi /usr/local/red5/conf/red5-core.xml</p></blockquote>
<p>Search for a lines</p>
<blockquote><p>&lt;!– RTMPT –&gt;<br />
&lt;!–<br />
&lt;bean id=”rtmpt.server” class=”org.red5.server.net.rtmpt.TomcatRTMPTLoader” init-method=”init” lazy-init=”true”&gt;</p></blockquote>
<p>Remove the &lt;!– from start of &lt;bean and –&gt; from end of &lt;/bean&gt;</p>
<p>Same goes for RTMPS</p>
<blockquote><p>&lt;!– RTMPS –&gt;<br />
&lt;!–<br />
&lt;bean id=”rtmps.server” class=”org.red5.server.net.rtmps.TomcatRTMPSLoader” init-method=”init” lazy-init=”true”&gt;</p></blockquote>
<p>Remove the &lt;!– from start of &lt;bean and –&gt; from end of &lt;/bean&gt;</p>
<p>Restart the red5 services and connection fails problem will be fixed.</p>
<p>If you any question please use comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://dazzlesoftware.ca/tutorials/Entry/how-to-install-red5-media-server-10-on-linux.html/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>

