Install Red5 1.0 on CentOS Latest

1. Install Java

# yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel

2. Install Ant

# cd /usr/local/src
# wget
# tar zxvf apache-ant-1.8.2-bin.tar.gz
# mv apache-ant-1.8.2 /usr/local/ant

3. Export path for Ant and Java

Make sure you have right paths (java, ant etc.) on your server, I have used 32-bits CentOS server … home path might be different on 64-bits or other server 😉

# 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/

Also add these lines in /etc/bashrc at last to available every-time logged in to SSH

4. Install SVN

# yum install subversion

5. Install RED5 Server

# cd /usr/local/src
# svn checkout red5
# mv red5 /usr/local/
# cd /usr/local/red5
# ant prepare
# ant dist

6. Copy Red5 files

# cp -r dist/conf /usr/local/red5

7. Test Run

# sh

ctrl + z

You need to allow port 5080 and 1935 to your server firewall.

# iptables -A INPUT -p tcp -m tcp --dport 5080 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 1935 -j ACCEPT

Red5 Server Status

# netstat -anp | grep 5080
# ps aux | grep red5

If you have CentOS 64-bits server and you are getting error like

– Buildfile: build.xml does not exist!
– Cannot allocate memory

You might need to checkout modified files
# cd /usr/local/src
# svn co red5

Build Failed (Life saver)
Cannot run program “chmod”: error=12, Cannot allocate memory

# export _JAVA_OPTIONS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’
# export ANT_OPTS=’-Xms32m -Xmx56m -Xss128k -XX:PermSize=32m -XX:MaxPermSize=64m’

Try solution here…

How to install Red5 Demos?

# cd /usr/local/red5/webapps/root
# svn checkout

Then go to

Please check all comments below for more help 😉

Published by

Sandeep Verma

I’m an Entrepreneur. I’m proud to work as Blogger, LAMP Programmer, Linux Admin, Web Consultant, Cloud Manager, Apps Developer, Searcher. Concentrate > Observe > Imagine > Launch