您好我已经安装了java,maven并设置了java和maven所需的所有环境变量,
只需要有关如何从源代码构建red5的指导
请看这https://github.com/Red5/red5-server#build-from-source
我的规格:
Apache Maven 3.2.2(45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T09:51:42-04:00)Maven home: /usr/local/apache-maven/apache-maven-3.2.2
Java版本:1.7.0_79,供应商:Oracle Corporation
Java home:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79.x86_64/jre
默认语言环境:en_US,平台编码:UTF-8操作系统名称:“linux”, 版本:“2.6.32-431.23.3.el6.x86_64”,arch:“amd64”,family:“unix”
答案 0 :(得分:0)
对于Java 1.7,我不知道是否兼容,Red5是旧的,需要认真更新。我在CentOS 7上运行Red5服务器(0.8.0),1GB Ram,使用Java 1.6。
预安装;
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
cd /usr/local/src
wget http://apache.cs.utah.edu//ant/binaries/apache-ant-1.8.2-bin.tar.gz
tar zxvf apache-ant-1.8.2-bin.tar.gz
mv apache-ant-1.8.2 /usr/local/ant
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
yum install subversion
Red5安装;
cd /usr/local/
svn export http://red5.googlecode.com/svn/java/server/tags/0_8_0/
mv 0_8_0 /usr/local/red5
cd red5
ant prepare
ant dist
用于运行Red5;
cd /usr/local/red5/dist
sh red5.sh
如果您收到有关JAVA内存的错误;
export _JAVA_OPTIONS="-Xms32m -Xmx128m"
自动运行的脚本;
#!/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/dist
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: "
export _JAVA_OPTIONS="-Xms32m -Xmx128m"
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
享受您的RED5 Flash媒体服务器
来源:https://forum.ovh.com/showthread.php?83099-TUTO-Installer-serveur-RTMP-(Flash-Server)-avec-Red5