Help with Tomcat, Apache ANT, Subversion and Red5

FourMat

Active Member
Jun 10, 2004
36
0
156
Hi guys, I have a question about some of the software requirements involved in the installation of the Red5 Flash Media server.

1) I've figured out what I need to do to get Tomcat installed which will install the required Java software, but the standard installation instructions for Red 5 say that we need to have Apache ANT installed. Is this installed with Tomcat? Will I still need to install it manually?

2) With the standard WHM installation, is there a way to install Subversion, or is it installed by default?

Thanks...
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
Hi guys, I have a question about some of the software requirements involved in the installation of the Red5 Flash Media server.

1) I've figured out what I need to do to get Tomcat installed which will install the required Java software, but the standard installation instructions for Red 5 say that we need to have Apache ANT installed. Is this installed with Tomcat? Will I still need to install it manually?

2) With the standard WHM installation, is there a way to install Subversion, or is it installed by default?

Thanks...
When you install Tomcat support via EasyApache, Apache ANT is not installed.

cPanel/WHM does not come with integrated subversion (SVN) support at this time.
 

FourMat

Active Member
Jun 10, 2004
36
0
156
Yes, I did manage to get it working. I don't use it for what I wanted to because I found it to be somewhat unreliable on my setup. Not sure if it's me, or Red5. But I have been able to get it to serve up streaming video through several players.

Here is a document I created to remind myself how to do it when I set up a new server. I'm not sure if this is totally complete. I remember needing to do a bit of trial and error to dial it in:

Installation of Red 5 Server

- Install Tomcat through cPanel/WHM - will install Java's latest build version and apache ANT is not necessary

- Tomcat installed to /usr/local/jakarta/apache-tomcat-5.5.25

- Startup
/usr/sbin/stoptomcat
/usr/sbin/starttomcat
/scripts/restartsrv_tomcat

CATALINA_HOME = /usr/local/jakarta/tomcat
CATALINA_BASE = /usr/local/jakarta/tomcat
Java_HOME =

- For Tomcat, open firewall ports 8080, 9080
- For Red5 open firewall ports 1935, 8088, 5080, 1936
RTMP: 1935
RTMTP: 8088
HTTP SERVLET ENGINE PORT: 5080
DEBUG PROXY PORT; 1936

- To see if Red5 is listening; netstat -ntlp | grep 1935


Once installed goto yourserver.com to test tomcat


To install Red5 there are 2 methods:

Deploy the WAR file to the /usr/local/jakarta/apache-tomcat-5.5.25 folder
I had some problems with this as tomcat updated and was automatically changed to /usr/local/jakarta/apache-tomcat-5.5.27 folder and broke the WAR.
To View Videos:
Upload FLV files to the /streams directory ( /usr/local/jakarta/apache-tomcat-5.5.25/webapps/ROOT/streams
OR create a symlink from the /streams directory to the location of your videos folder in your clients account
ln -s source symlinklocation
eg.
ln -s /home/acctname/public_html/video acctname
creates the @acctname directory

Originally taken from this site: Installed Red5 0.8 RC3 with JDK 1.6.13 on Linux
Make Sure Tomcat is installed though we won't been using it. We only install it to get JRE/Java up to date and installed
SVN Should be installed.
Install Apache ANT
wget http://apache.mirror.transip.nl/ant/binaries/apache-ant-1.7.1-bin.tar.gz
tar zxvf apache-ant-1.7.1-bin.tar.gz
mv apache-ant-1.7.1 /usr/local/ant
export ANT_HOME=/usr/local/ant
ln -s /usr/local/ant/bin/ant /usr/local/bin/ant
Checked ant version:
ant –version
If this can’t find java, add a shortcut /usr/local/jdk/bin/java pointed to /usr/java/latest/bin/java
Install Red5
RED5 BUILD AND INSTALLATION
Then we downloaded Red5:
svn co red5 - Revision 4149: /java/server/trunk red5
Update1: This downloads latest Red5. On this installation (update1) Red5 0.9 was downloaded.
Built red5 :
cd red5
ant prepare
ant dist

Moved Red5 from home folder:
cd ..
mv red5 /opt/red5
Started Red5:
cd /opt/red5/dist
./red5.sh > start.log &
The > start.log is to have it output the logs in the file and & is to keep it running in the background.
Verified that Red5 was running:
ps aux | grep red5
This should report a long line with java and many options and this command. Check start.log if it failed to start.
We added these lines to to /etc/rc.d/rc.local so it starts on each server start:
cd /opt/red5/dist
/opt/red5/dist/red5.sh > restart.log &
Make sure your run it from the right folder. The one in /opt/red5 will not work – you must run it from /opt/red5/dist/ .
When Red5 is running you should be able to access http://your-server-domain-or-ip:5080/ .
If it works first thing go to http://your-server:5080/installer/and install admin. Then to http://your-server:5080/admin/register.html and register an username and password. Then you can check application statistics anytime from http://your-server:5080/admin/ with server ip and the registered username, password.
RED 5 RESTART
We do that everytime we add or update files in the /opt/red5/dist/webapps folder – where all applications should be installed.
Usually these should work and should be used each time you add a new application.
1. Check if red5 is running:
ps aux | grep red5
2. Go to its folder and shut red5 down:
cd /opt/red5/dist
./red5-shutdown.sh

3. See if it’s still running or not:
ps aux | grep red5
4. Restart it, and also make it output the logs into a file of your choice:
./red5.sh > start.log &
5. Make sure it’s back online:
ps aux | grep red5
We also noticed that red-shutdown.sh sometimes does not close it down to allow restart when webapps are added or updated. So we run ps aux | grep red5 to see process id (first number: PID) and then run kill process id if it’s still alive.
ALLOWING PORTS
iptables -A INPUT -p tcp -m tcp -—dport 3690 -j ACCEPT
iptables -A INPUT -p tcp -m tcp —-dport 5080 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -—dport 1935 -j ACCEPT
iptables -A INPUT -p tcp -m tcp —-dport 1936 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -—dport 8088 -j ACCEPT