###############################################################################
#
Name : Mahavairocana
#
Author : Mahavairocana
#
QQ : 10353512
#
WeChat : shenlan-qianlan
#
Blog : http://www.cnblogs.com/Mahavairocana/
#
Description : You are welcome to reprint, or hyperlinks to indicate the
#
source of the article, as well as author
information.
###############################################################################
第一步 安装jdk [root@localhost ~]# mkdir -p /usr/java && cd /usr/java [root@localhost java]# wget http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-i586.rpm?AuthParam=1338380823_32740b93dd6532f01b895b7877de8092 [root@localhost java]# rpm -ivh jdk-7u4-linux-i586.rpm 第二步 安装ant [root@localhost java]# wget http://labs.renren.com/apache-mirror//ant/binaries/apache-ant-1.8.4-bin.tar.gz [root@localhost java]# tar xvf apache-ant-1.8.4-bin.tar.gz [root@localhost java]# mv apache-ant-1.8.4 /usr/local/ant [root@localhost java]# vi /etc/profile export ANT_HOME=/usr/local/ant export PATH=$PATH:$ANT_HOME/bin [root@localhost java]# source /etc/profile [root@localhost java]# ant -version Apache Ant(TM) version 1.8.4 compiled on May 22 2012 第三步 安装red5 [root@localhost java]# cd [root@localhost ~]# wget http://trac.red5.org/downloads/1_0/red5-1.0.0-RC1.tar.gz [root@localhost ~]# tar xvf red5-1.0.0-RC1.tar.gz [root@localhost ~]# mv red5-1.0.0 /usr/local/red5 [root@localhost ~]# cd /usr/local/red5/ 测试能否打开 [root@localhost red5]# ./red5.sh 如果最后一行为 Installer service created 就说明成功了,再打开这个页面看看 http://192.168.0.8:5080/demos/BallControl.swf 创建服务 [root@localhost red5]# vi /etc/init.d/red5 #!/bin/bash # For RedHat and cousins: # chkconfig: 2345 85 85 # description: Red5 flash streaming server # processname: red5 # Created By: Sohail Riaz (sohaileo@gmail.com) 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 [root@localhost red5]# chmod 755 /etc/init.d/red5 [root@localhost red5]# chkconfig --add red5 [root@localhost red5]# chkconfig red5 on 配置文件是 conf/red5.properties 默认demo位置 /usr/local/red5/webapps/root/demos