This howto was provided by Jake Hilton. If you see any errors please let him know so that they can be corrected. This was recently updated to reflect the new version of opensuse which is 10.2. These instructions are generic enough to work on many different linux operating systems.
The following are steps used to get Red5 running on SUSE Linux 10.2. This is the development version of red5.
Before beginning this make sure you are running these commands as root.
You can create a red5 user to run this under if you dont plan on using any ports below 1000. If you need red5 to bind to ports below 1000 you need to run it as root. With the red5 user disallow login access and make the red5 user part of the root group.
Make sure you have downloaded and installed the latest JDK from java.sun.com
For this tutorial just download the .bin file. All you need to do is change the permissions of that bin file to 755 with
chmod 755 jdk-1_6_0
and then execute it.
or something similar. Then once its done you just copy the contents of the folder it made and put them in /usr/java/jdk1.6.0
Then set your JAVA_HOME variable. It may have to be set two different ways. First way:
and the second way.
Install Apache Ant 1.7. You may have to download that as well. Install the binary for it.
Download and unzip the file. Then copy the contents to a directory, something like /usr/ant. Then set your ANT_HOME variable. If it doesnt work then dont worry about it. We will not be using that pointer in this tutorial.
Once java and ant are all set up you simply pull the latest trunk for red5 to your box.
svn co http://svn1.cvsdude.com/osflash/red5/java/server/trunk red5-trunk
That will create a folder in your current directory called red5-trunk.
Navigate to the red5-trunk directory and run
That will build the project on your machine.
At this point you will need to create a red5 directory in the opt directory.
Then you will want to copy the contents of the dist(distribution) folder to /opt/red5 like so
cp -R red5-trunk/dist/* /opt/red5/
We need to fix the permissions on the /opt/red5 directory like so:
chown -R red5 /opt/red5
In addition we need need to fix the permissions on the red5.sh file like so:
chmod 755 red5.sh
To run the server you have a few options using the red5.sh file. Navigate to /opt/red5 to make sure you are in the proper location. Then run the server by either running
sh red5.sh &
This will start the red5 service manually. For a start and stop script look at the "Extra info" below.
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 cant 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.
Extra info: The version compiled from source does not come with a start/stop script. I have put together one that will work with this how-to. If you run red5 as a different user this script will have to be tweaked. To put this script on your system do the following logged in as root:
chmod 755 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:
# Author: Jake Hilton <[email protected]>
# Check for missing file
test -x $RED5_DIR/red5.sh || exit 5
case "" in
echo -n "Starting Red5 Service"
echo -n " "
su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
echo -n "Shutting down red5"
echo -n " "
su -s /bin/bash -c "killall -q -u red5 java" red5
## Stop the service and regardless of whether it was
## running or not, start it again.
Then you can simply start, stop, and restart red5 from that script by typing: