This howto was provided by Jake Hilton. If you see any errors please let him know so that they can be corrected. These instructions are generic enough to work on many different linux operating systems.
The following steps will install the development (trunk) version of red5.
Before beginning this make sure you are running these commands as root.
chmod 755 jdk-1_6_0
and then execute it.
./jdk-1_6_0
or something similar. Then once it’s done you just copy the contents of the folder it made and put them in /usr/java/jdk1.6.0
JAVA_HOME=/usr/java/jdk1.6.0
and the second way.
export JAVA_HOME=’/usr/java/jdk1.6.0′
svn co http://red5.googlecode.com/svn/java/server/trunk red5-trunk
That will create a folder in your current directory called red5-trunk.
/usr/ant/bin/ant
That will build the project on your machine.
mkdir /opt/red5
cp -R red5-trunk/dist/* /opt/red5/
chown -R red5 /opt/red5
chmod 755 red5.sh
sh red5.sh &
or
./red5.sh &
. This will start the red5 service manually. For a start and stop script look at the “Extra info” below.
netstat -ant
and verify the correct ports are being bound to. You may need to edit the red5.properties file in the /opt/red5/conf directory if you can’t connect to your server from an external location. Try to connect to the server before you modify the properties file because you may be able to connect to it with no problems.
cd /etc/init.d/ touch red5 chmod 755 red5 vi red5
then when you are in the red5 file push “i” to start inserting into that file and then put this code in by copying it and then pasting it with a right click of the mouse:
#! /bin/sh
#
# Author: Jake Hilton <red5@jakehilton.com>
# /etc/init.d/red5
#
# Check for missing file
RED5_DIR=/opt/red5
test -x $RED5_DIR/red5.sh || exit 5
case "$1" in
start)
echo -n "Starting Red5 Service"
echo -n " "
cd $RED5_DIR
su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
sleep 2
;;
stop)
echo -n "Shutting down red5"
echo -n " "
su -s /bin/bash -c "killall -q -u red5 java" red5
sleep 2
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;
esac
Then you can simply start, stop, and restart red5 from that script by typing:
/etc/init.d/red5 start /etc/init.d/red5 stop /etc/init.d/red5 restart