# Red5 0.6.3
# ==========
# Prerequisites:
# Apache Ant
cd
test -f installed/red5-0.6.3.tar.gz &&
mv installed/red5-0.6.3.tar.gz .
test ! -f red5-0.6.3.tar.gz &&
wget http://dl.fancycode.com/red5/0.6.3/src/red5-0.6.3.tar.gz
# Remove old versions, extract it into /usr/local with a /usr/local/red5
# symlink pointing to it
find /usr/local -maxdepth 1 -type d -name "red5-*" -exec rm -r {} \;
test -L /usr/local/red5 && rm /usr/local/red5
tar xzv -C /usr/local -f red5-0.6.3.tar.gz
ln -s /usr/local/red5-0.6.3 /usr/local/red5
# Go into the newly extracted Red5 directory
cd /usr/local/red5
# When you su, your PATH probably won't include $ANT_HOME/bin any more, so
# re-source it:
test -x /etc/profile.d/ant.sh && . /etc/profile.d/ant.sh
# Make sure Ant is in your PATH by running this:
ant -version
# Make sure the $JAVA_HOME environment variable is set:
# (if not run '. /etc/profile.d/j2sdk.sh' or just set it)
echo $JAVA_HOME
# Set the JAVA_VERSION environment variable if it's not already set:
# (if you don't have JDK 1.6.x_xx installed, don't put 1.6)
test -z "$JAVA_VERSION" && JAVA_VERSION=1.6
echo $JAVA_VERSION
## Build and start the Red5 server running on port 1935:
#ant server
# Build it using Apache ant:
ant
# To shut it down:
# (you can add the 2nd line to /etc/rc.d/rc.6)
chmod 700 /usr/local/red5/red5-shutdown.sh
( cd /usr/local/red5 ; ./red5-shutdown.sh )
# Open up /etc/rc.d/rc.local and put these lines in there, or
# create a new init-script to start it on boot-up:
if [ -d /usr/local/red5 ]; then
echo "Starting Red5 server..."
( cd /usr/local/red5 ; ./red5.sh > ./red5.log 2>&1 & )
fi
# Once you start it up, you can check out the default setup
# by going to http://localhost:5080/