gpt4 book ai didi

linux - 如何在我的linux centos机器上使用maven通过ssh安装red5媒体服务器?

转载 作者:太空宇宙 更新时间:2023-11-04 03:38:34 26 4
gpt4 key购买 nike

嗨,我已经安装了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 version: 1.7.0_79, vendor: Oracle Corporation

Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.79.x86_64/jre

Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "2.6.32-431.23.3.el6.x86_64", arch: "amd64", family: "unix"

最佳答案

对于Java 1.7,我不知道是否兼容,Red5 很旧,需要认真更新。我正在 CentOS 7、1GB RAM 和 Java 1.6 上运行 Red5 服务器 (0.8.0)。

预安装;

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 Media Server

来源:https://forum.ovh.com/showthread.php?83099-TUTO-Installer-serveur-RTMP-(Flash-Server)-avec-Red5

关于linux - 如何在我的linux centos机器上使用maven通过ssh安装red5媒体服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30682288/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com