Red5 for Debian
===============

Packaging
---------
Red5 debian package is divided into:
- libred5-java: contains jar which can be used to embed Red5
- red5-doc: contains Javadoc API and other documentations about Red5
- red5-server: contains configuration and init script for Red5

Directories
-----------
This debian package installs red5 into /usr/share/red5/
The configuration of the server is in /etc/red5/
Webapps can be deployed by placing them in /var/lib/red5/webapps/
(linked from /usr/share/red5/webapps)
Logs can be found in /var/log/red5/

Documentation
-------------
- Javadoc API is in /usr/share/doc/red5/api/index.html
- Red5 Reference Manual is in /usr/share/doc/red5/html/index.html

Startup
-------
You can customize Red5 startup parameters by editing /etc/default/red5-server file.
For example, you can set JAVA_OPTS=-Xmx512m for applications with extended memory needs.

Ports
-----
By default, Red5 open the following ports :
- 5080 (HTTP port - embedded Tomcat)
- 1935 (RTMP port)
- 8443 (RTMPS port)
- 9980 (JMX port - admin and shutdown)

You can edit port mapping in /etc/red5/red5.properties

Demos / Installer
-----------------
Debian "red5-server" package doesn't contains /demos or /installer webapps.
Please note that /installer and /demos webapps are for demonstration purpose
only and should never be installed on a public red5 server
(no security at all in those applications).
Furthermore, they contains non-free stuffs :
- *.swf binary-only (Flash Player) files
- *.flv movies trailers like Avatar / Toy Story 3

As root, you can install /demos (SWF files) and /installer webapp, by issuing :
 # wget http://wiki.red5.org/downloads/1_0/red5-1.0.0-RC2.zip
 # mkdir red5/; cd red5;
 # unzip ../red5-1.0.0-RC2.zip
 # cp -R webapps/root/demos /var/lib/red5/webapps/root/demos
 # cp -R webapps/installer /var/lib/red5/webapps/installer
 # find /var/lib/red5/webapps/ -type d -exec chown _red5 {} \;
 # cd ..
 # rm -rf red5*
 # /etc/init.d/red5-server restart

Then, you can point your favorite browser to
<http://127.0.0.1:5080/installer/>
and install demos of your choice (Java application's parts).

NB: If you only got a 404 or 500 error page, this is because you try to access
installer by remote access (ie. disabled by default).
If you want to enable remote access to installer, you can edit
  /var/lib/red5/webapps/installer/WEB-INF/red5-web.properties
and change value of
  webapp.virtualHosts=localhost, localhost:5080
to 
  webapp.virtualHosts=*
After installing some application, you should revert this back to keep your
server secure.
