Installera Red5 på Debian

Latest versions installed with this tutorial:
Red5 1.0.0 RC2
Java 1.6.0_26
Ant 1.8.4

At least Debian 5 (Lenny) required:
cat /etc/debian_version

Checkout release:
cat /proc/version
uname - a
cat /etc/issue
cat /etc/debian_version

Make sure system can find all require dependencies from /etc/apt/sources.list:
deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main
deb http://ftp.us.debian.org/debian stable main non-free contrib
deb http://ftp.debian.org/debian/ squeeze-updates main
deb-src http://ftp.debian.org/debian/ squeeze-updates main
Comment any cd references with # if distribution cd is not inserted.

If system is not in English, enable that:
dpkg-reconfigure locales
export LANG=en_US.UTF-8

Update /etc/enviroment

You may need to reboot.

 

Uppdatering:
apt-get update

Installera Subversion:
apt-get -y install subversion

Install tools to build your own Debian packages:
apt-get -y install dpkg-dev debhelper dh-make devscripts fakeroot

Installera Java (accept sun license if applies):
apt-get -y install java-package
apt-get -y install sun-java6-jre
apt-get -y install sun-java6-jdk
java -version

Installera Apache Ant:
wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.4-bin.tar.gz
tar zxvf apache-ant-1.8.4-bin.tar.gz
mv apache-ant-1.8.4 /usr/local/ant
Exportera ANT_HOME = / usr/lokal/ant
/usr/local/ant/bin/ant -version

Download the latest development version of Red5:
SVN co http://red5.googlecode.com/svn/java/server/trunk red5-trunk

Run ant to build red5:
cd red5-trunk
/usr/local/ant/bin/ant

Deploy red5:
mkdir /usr/local/red5
cp -R dist/* /usr/local/red5/
cd /usr/local/red5
chmod 755 Red5.sh

Deploy your custom apps in/usr/local/red5/webapps .
I exemplet VideoWhisper Red5 RTMP application needed to run VideoWhisper solutions.

Start Red5 in background:
cd /usr/local/red5
./Red5.sh >> red5.log &

Verify the correct ports are being bound to:
netstat -ant

 

You need to restart red5 each time you add webapps to /usr/local/red5/webapps or change configuration or restart server.

Close Red5:
cd /usr/local/red5
./Red5-shutdown.sh

Or kill Red5 processes:
PS aux | grep red5
döda $process_id

Then start it again:
cd /usr/local/red5
./Red5.sh >> red5.log &

 

Can also deploy it as service to start automatically on server boot:

vi /etc/init.d/red5

#! /bin/sh
# put these contents at: /etc/init.d/red5
# change red5 directory path below as necessary
RED5_DIR=/usr/local/red5

Starta()
{
ECHO “Starting Red5 Service
sudo su root -ccd $RED5_DIR; ./Red5.sh > /var/log/red5.log &”
return
}

Stanna()
{
ECHO “Shutting down red5
sudo su root -c ‘killall red5 java
return
}

fallet “$1” i
Starta)
Starta
;;
Stanna)
Stanna
;;
Starta om)
Stanna
Starta
;;
*)
ECHO “Användning: {Starta|Stanna|Starta om}”
avsluta 1
;;
ESAC
avsluta $?

chmod +x /etc/init.d/red5

Installera Red5 på SUSE Linux

Först vet ditt system för att veta vad man ska installera.

Användning uname - a to see if you need to download 32 eller 64 BITS versioner.

Få SUSE release: cat /etc/SuSE-release

INSTALL JDK

Install latest JDK from http://java.sun.com/javase/downloads/index.jsp .

Use chmod a+x to make downloaded file executable and execute it.

Make sure latest version is used:

LN -s /usr/java/senaste /usr/lokal/jdk
LN -s
/usr/java/senaste/jre /usr/lokal/jre
RM /usr/bin/java

LN -s
/usr/java/senaste/bin/java /usr/bin/java
Exportera JAVA_HOME = / usr/java/senaste /


INSTALL SVN

Get SVN from: http://software.opensuse.org/search?baseproject=ALL&p=1&q=subversion

Install RPMs with: rpm -iv package.rpm

Install any dependencies as required. Search from http://software.opensuse.org/search .

INSTALL ANT

wget http://www.apache.org/dist/ant/binaries/apache-ant-1.8.0-bin.tar.gz
tar zxvf apache-ant-1.8.0-bin.tar.gz
mv apache-ant-1.8.0 /usr/local/ant

Konfigurera
Exportera ANT_HOME = / usr/lokal/ant
LN -s /usr/local/ant/bin/ant /usr/local/bin/ant

Ersätta gamla ant
RM /usr/bin/ant
LN -s /usr/local/ant/bin/ant /usr/bin/ant

Check ant version:
Ant – version


INSTALL Red5

Få senaste Red5 :
SVN co http://Red5.googlecode.com/SVN/Java/Server/trunk red5

Build Red5 :
CD red5
Ant förbereda
Ant dist

Move Red5:
CD ..
MV red5/opt/red5

OPERATE RED5

Starta Red5 (when need or on server reboot):
CD /opt/red5/dist
./Red5.sh > Start.log &

Install/update applications in the /opt/red5/dist/webapps folder . For changes to take effect, Red5 must be restarted:

1. Kontrollera om red5 körs:
PS aux | grep red5

2. Gå till dess mapp och stänga av red5:
CD /opt/red5/dist
./Red5-shutdown.sh

3. Se om det fortfarande är igång eller inte:
PS aux | grep red5

4. Starta om den, and also make it output the logs into a file of your choice:
./Red5.sh > Start.log &

5. Kontrollera att den är online igen:
PS aux | grep red5