Quote:yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
INSTALL ANT
Quote:cd /root/tmpEXPORT VARIABLES FOR ANT AND JAVA
wget mirrors.aryanict.net/apache/ant/binaries/apache-ant-1.8.1-bin.tar.bz2
tar jxvf apache-ant-1.8.1-bin.tar.bz2
mv apache-ant-1.8.1 /usr/local/ant
Quote:export ANT_HOME=/usr/local/ant
export JAVA_HOME=/usr/lib/jvm/java
export PATH=$PATH:/usr/local/ant/bin
export CLASSPATH=.:$JAVA_HOME/lib/classes.zip
echo 'export ANT_HOME=/usr/local/ant' >> /etc/bashrc
echo 'export JAVA_HOME=/usr/lib/jvm/java' >> /etc/bashrc
echo 'export PATH=$PATH:/usr/local/ant/bin' >> /etc/bashrc
echo 'export CLASSPATH=.:$JAVA_HOME/lib/classes.zip' >> /etc/bashrc
INSTALL SVN
Quote:yum install perl-URI
yum install subversion
* if you got the error if not you can skip this step:
Install Error: Missing Dependency: perl(URI) >= 1.17 ...
Quote:wget http://yum.trixbox.org/centos/5/RPMS/perl-URI-1.35-3.noarch.rpmINSTALL RED5
rpm -i perl-URI-1.35-3.noarch.rpm
yum install subversion
Quote:svn co http://red5.googlecode.com/svn/java/server/tags/0_9_1/ red5*Red5 0.9 is recommended instead of latest trunk, as shown above
mv red5 /usr/local/
cd /usr/local/red5
ant prepare
ant dist
cp -r dist/conf .
Quote:chmod a+x red5.sh
./red5.sh &
Quote:vi /etc/init.d/red5paste the script below than save and close by pressing ESC than typing :wq
Code:
Quote:#!/bin/sh
# Startup script for Red5 flash streaming server on RedHat/CentOS (cPanel)
# chkconfig: 2345 95 55
# description: Red5 Flash Streaming Server
# processname: red5
PROG=red5
RED5_HOME=/usr/local/red5
DAEMON=$RED5_HOME/$PROG.sh
PIDFILE=/var/run/$PROG.pid
# Source function library
. /etc/rc.d/init.d/functions
[ -r /etc/sysconfig/red5 ] && . /etc/sysconfig/red5
RETVAL=0
case "$1" in
start)
echo -n $"Starting $PROG: "
cd $RED5_HOME
$DAEMON >/dev/null 2>/dev/null &
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo $! > $PIDFILE
touch /var/lock/subsys/$PROG
fi
[ $RETVAL -eq 0 ] && success $"$PROG startup" || failure $"$PROG startup"
echo
;;
stop)
echo -n $"Shutting down $PROG: "
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG
;;
restart)
$0 stop
$0 start
;;
status)
status $PROG -p $PIDFILE
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
RETVAL=1
esac
exit $RETVAL
Make it executable and execute:
Quote:Since this is unix land, we need to make sure this init script has permissions to actually be executed. Let’s do this! Do it using chmod, like this:
chmod +x /etc/init.d/red5
Now we should be able to start red5 by using this script. Give this a shot
/etc/init.d/red5 start
If your server responds by writing starting Red5: [ OK ], you’re golden. Let’s check the status!
/etc/init.d/red5 status
You should see something like
red5 (pid 11232) is running...
This means that the RED5 server is running on its own. We could close this terminal window and the RED5 server would stay up and running. That’s looking mighty good, right!?
However, whenever we reboot the VPS, the RED5 server won’t start by itself…yet. You know where I’m going with this, right?
In order for RED5 to start when the server boots, we need to do some chkconfig magic.
First we need to add the RED5 service to chkconfig:
chkconfig --add red5
Now we need to tell chkconfig that red5 should start asap when booting:
chkconfig red5 on
That should do it… Red5 is installed, you have a simple way of restarting the RED5 service and it starts as soon as possible whenever the server starts. I’d say that’s all we need. Let’s have a little applause for yourself. You did it! You have RED5 running on your server! Now go and have fun with it :)
You are done, check if Red5 is running by accessing http://YOUR_SERVER_IP:5080
WHM -> ConfigServer Security&Firewall -> [Firewall Disable]
If this solves the problem, you must configure csf to accept connections on these ports ( http://www.configserver.com/cp/csf.html ).
If you need any assistance please send an email to "support@aryanict.com" we will be happy to help you.