A lot of stuff and things…

How To: Install Red5 Media Server

Here we go!
Check for subversion, if not installed

yum install subversion

Make sure you have java. If you don’t, you should, else go get it.

Next, install Apache ANT

cd /opt/
tar -zxf apache-ant-1.7.1-bin.tar.gz
rm apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1/ ant
export ANT_HOME=/opt/ant
ln -s /opt/ant/bin/ant /usr/bin/ant
ant -v

good good…

Now for red5, while still in /opt/

svn co red5

Depending on your server setup:

cat /usr/sbin/starttomcat

Grab the JAVA_HOME from here, as long as java’s working, and do:

export JAVA_HOME=/usr/local/jdk

Your path may vary.
now ant

export ANT_HOME=/opt/ant/

Now you should still be in /opt but anyways

cd /opt/red5/
/opt/ant/bin/ant prepare
/opt/ant/bin/ant dist

This will more than likely take a few minutes
Make sure ports 5080 and 1935 are opened up.

Now lets make a startup script!

touch /etc/init.d/red5
chmod 755 /etc/init.d/red5

Cool it’s made. Now add the following to it:

# red5
# chkconfig: 2345 95 55
# description: red5  server startup script

# Source function library.
if [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
echo "Could not find functions file, your system may be broken"
exit 1

# Source networking configuration.
if [ -f "/etc/sysconfig/network" ] ; then
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
# Start daemons.
echo -n "Starting red5: "
cd /opt/red5/dist/; sh 2 >/dev/null &
touch /var/lock/subsys/red5
# Stop daemons.
echo -n "Shutting down red5: "
cd /opt/red5/dist/; sh 2 >/dev/null
rm -f /var/lock/subsys/red5
echo "Usage: red5 {start|stop}"
exit 1

exit 0

Now do:

service red5 start

and visit you.r.IP.ADDRESS:5080 and you should see this baby rollin!


Next Post

Previous Post

Leave a Reply

© 2017

Theme by Anders Norén