Sep
13
2010
How to Install Red5 0.9.1 on CentOS 5
I run an unmoderated roleplaying chat, and I've been wanting to upgrade the chat software I'm using (currently Flash chat from Tufat.com) to something a little better. Most of the "better" packages require having a Flash server installed, but Adobe's is pretty expensive. There's an open-source alternative written in Java called Red5.
However, Red5 currently suffers from pretty bad documentation. So, here's a tutorial on how to install Red5 0.9.1 under CentOS 5.
- Get root access (I'm not sure if this step is really necessary, but it was in my case)
From the command prompt, execute:
sudo -i
- Install Java
From the command prompt, execute:
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
- Install Ant
From the command prompt, execute:
cd /usr/src
wget http://opensource.become.com/apache/ant/binaries/apache- ant-1.7.1-bin.tar.gz
tar zxvf apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1/ /usr/local/ant
- Export variables for Ant and Java
From the command prompt, execute:
export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/usr/local/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
echo 'export ANT_HOME=/usr/local/ant' >> /etc/bashrc
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc
- Download and install Red5 Server
From the command prompt, execute:
cd /usr/src
svn checkout http://red5.googlecode.com/ red5svn/java/server/trunk/
mv red5 /usr/local/
cd /usr/local/red5
ant prepare
ant distYou should see lots of output, and at the end it should say "Build successful." If you see some errors instead of that, it's probably because you don't have Java or Ant installed correctly. I'm not really experienced enough to give troubleshooting tips with that.
- (Optional) Edit Red5 config file
By default, the config sets Red5 up to bind to all IPs. If you don't want it to do that, edit red5/conf/red5.properties file, and anywhere you see the IP 0.0.0.0 replace it with your server's actual IP address. You can find this IP by executing this command:
/sbin/ifconfig eth0| grep 'inet addr:'
Then use the IP address listed directly after "inet addr:"
- Install Tomcat container
This is necessary to make it so that you can verify your installation and administer it via the web.- Create the directory red5/plugins.
- Go to http://www.red5.org/wiki/
,AppServer/JEEContainerPlugins download the pre-compiled Tomcat JAR and save it to red5/plugins - Look inside of that Tomcat JAR (you can rename it to .zip and unzip it if need be), extract the jee-container.xml file, replace your current red5/conf/jee-container.xml file with that one.
- Go to http://code.google.com/p/
red5/source/browse/#svn/ repository/tomcat