1) Install java
1 |
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel |
2) Install ant (apache project)
1 2 3 4 |
cd /usr/src wget http://opensource.become.com/apache/ant/binaries/apache-ant-1.8.1-bin.tar.gz tar zxvf apache-ant-1.8.1-bin.tar.gz mv apache-ant-1.7.1/ /usr/local/ant |
3) Export veriables for Java and ant
1 2 3 4 |
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 |
By running commands
1 2 3 4 |
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 |
4) Install RED5 server
1 2 3 4 5 6 |
cd /usr/src svn checkout http://red5.googlecode.com/svn/java/server/trunk/ red5 mv red5 /usr/local/ cd /usr/local/red5 ant prepare ant dist |
1 2 3 4 5 |
If you get any error while running "ant prepare", then first confirm ant version by running ant -version command, and make sure it is showing ant version 1.8.1, if it is showing some older version then it might be installed via yum, run yum install, and logout, then login to load /etc/bashrc, and then again check ant version. |
you will see a ton of lines, but you should get at last
1 |
<strong>BUILD SUCCESSFUL</strong> |
that’s mean its install and now copy the conf directory from dist/ and test the red5 installation.
1 2 |
cp -r dist/conf . ./red5.sh |
If it shows Installer service created in the last then everything is fine here, press ctrl+c and move to next step to create init script.
5) Install init script
1 |
vi /etc/init.d/red5 |
Copy paste following code in it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
#!/bin/sh # For RedHat and cousins: # chkconfig: 2345 85 85 # 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 <em>case “$1″ in start) echo -n $”Starting $PROG: ” $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 </em> |
6) Now start service
1 2 |
<em> # /etc/init.d/red5 start </em> |
Check status
1 2 3 |
<em>/etc/init.d/red5 status red5 (pid XXXXX) is running… </em> |
7) Test
Now test the RED5 installation by opening following URL in browser
1 2 |
<em>http://yourip:5080/ </em> |
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.