This documentation has not been updated for Release 4.0.0 yet. Please see the one host (all-in-one) Manual Installation Instructions.
Intended as guidance for production environments with different hosts for most tasks, these instructions provide a recipe for building only the Red5 piece of an Avalon system from scratch on CentOS or Red Hat Enterprise Linux. Recipes for the other components for Avalon may be found here. Fedora (standalone), MySQL (standalone), Web (standalone), Solr (standalone), and Matterhorn (standalone).
Instructions for building every component on one host (all-in-on) please see here: Manual Installation Instructions.
Ready the Installation Environment
Install EPEL
rpm -ivh http://linux.mirrors.es.net/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
This package has libyaml-devel which is required by ruby and not provided by Redhat.
Make sure a valid hostname is resolvable
The default hostname is “avalon.dev”, so name the machine this and enter it into /etc/hosts
# hostname avalon.dev # cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 avalon.dev
Configure iptables
The Avalon Media System requires several ports to be open to client browsers.
Here are the port settings that will need to be configured:
Port | Purpose | External? |
---|---|---|
1935 | RTMP (red5) | Yes |
5080 | HTTP (red5) | No |
The preferred method is to create a shell script that will do the work for you. Here is an example script that you should look through and customize as needed: avalon-iptables-config.sh
If you're connected over ssh, it might kick you off.
Save your script to /etc/sysconfig/avalon-iptables-config.sh, make it executable and run it.
chmod +x /etc/sysconfig/avalon-iptables-config.sh /etc/sysconfig/avalon-iptables-config.sh
If you run into connection issues you can disable the iptables, by running "service iptables stop". This will completely drop your firewall. When finished troubleshooting run "service iptables start".
Disable SELinux
echo 0 > /selinux/enforce vim /etc/selinux/config #change the value of `SELINUX` from `enforcing` to `permissive`
Add the NUL repository
Create the NUL repository config file:
vim /etc/yum.repos.d/nul-public.repo
Append the following code:
[nul_public] name=NUL Library Public RHEL repository baseurl=http://yumrepo-public.library.northwestern.edu/x86_64 enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-nul cost=150
Install and place the NUL GPG key in the proper location:
curl http://yumrepo-public.library.northwestern.edu/RPM-GPG-KEY-nul -o /etc/pki/rpm-gpg/RPM-GPG-KEY-nul
Install development libraries and packages for building Ruby
yum groupinstall "Development Tools" yum install readline-devel zlib-devel libyaml-devel libffi-devel openssl-devel libxml2-devel libxslt-devel ant
Red5 Media Server
Red5 is an open source alternative to Adobe Media Server. If using the Adobe Media Server you can skip to the next step.
Create a red5 user.
useradd red5 groupadd avalon
Download and install Red5.
wget http://red5.org/downloads/red5/1_0_1/red5-1.0.1.tar.gz tar xvf red5-1.0.1.tar.gz mv red5-server-1.0 /usr/local/red5
Download the init script and add it to the init.d directory.
wget https://raw.github.com/avalonmediasystem/avalon-installer/master/modules/red5/templates/red5_init_script.erb -O red5_init_script.sh mv red5_init_script.sh /etc/rc.d/init.d/red5
Give Red5 permissions to the red5 directory and the init script.
chown -R red5:red5 /usr/local/red5 chmod +x /etc/rc.d/init.d/red5
Create and configure streaming directories.
mkdir -p /usr/local/red5/webapps/avalon/streams /var/avalon /var/www/avalon/public/streams /var/avalon/hls_streams chown red5:avalon /usr/local/red5/webapps/avalon/streams chmod 0775 /usr/local/red5/webapps/avalon/streams ln -s /usr/local/red5/webapps/avalon/streams /var/avalon/rtmp_streams chown root:root /var/avalon/hls_streams/ ln -s /var/avalon/hls_streams/ /var/www/avalon/public/streams chmod 0775 /var/avalon/hls_streams/
Red5 Avalon Security Webapp
cd /usr/local/red5/webapps wget https://github.com/avalonmediasystem/config-files/raw/master/red5/red5-avalon.tar.gz tar xvzf red5-avalon.tar.gz chown -R red5:red5 avalon/
Edit /usr/local/red5/webapps/avalon/WEB-INF/red5-web.properties
avalon.serverUrl=http://localhost/
Restart Red5
service red5 restart
If Red5 is installed and running you should be able to access http://avalon.dev:5080/
Restart SSH
service sshd restart
Restarting the Server
Before you restart your Avalon server, you'll want to make sure all of the services necessary to run Avalon will start automatically after the restart. Run these commands once and you should be set:
chkconfig --level 345 sshd on chkconfig --level 345 red5 on chkconfig --level 345 httpd on