Page tree
Skip to end of metadata
Go to start of metadata

This documentation is not applicable for Avalon 4 and above. Please see the one host (all-in-one) Manual Installation Instructions for current versions.

This documentation is for Release 3.0.0. For the Release 1 version of this page, see v.81. For the Release 2 version of this page, see v.87.

 

Intended as guidance for production environments with different hosts for most tasks, these instructions provide a recipe for building only the Matterhorn 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 Red5 (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:

PortPurposeExternal?
8080HTTP (Matterhorn)Yes

 

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

FFmpeg

Installation prerequisites

Install prerequisite packages using yum and the NUL-public repository

yum install SDL-devel a52dec-devel bzip2-devel faad2-devel freetype-devel frei0r-plugins-devel \
	gsm-devel imlib2-devel lame-devel libdc1394-devel libraw1394-devel librtmp-devel libtheora-devel \
	libva-devel libfaac-devel libvdpau-devel libstdc++-devel libvorbis-devel libvpx-devel \
	mediainfo opencore-amr-devel opencv-devel openjpeg-devel openssl-devel schroedinger-devel \
	speex-devel texi2html vo-aacenc-devel x264-devel xvidcore-devel yasm zlib-devel

Install rpmdev-setuptree

yum install rpmdevtools

Install ffmpeg srpm

 

#rpmdev-setuptree
#rpm -ivh https://github.com/avalonmediasystem/avalon-installer/raw/master/files/ffmpeg/ffmpeg-1.2-59a.el6.src.rpm
Retrieving https://github.com/avalonmediasystem/avalon-installer/raw/master/files/ffmpeg/ffmpeg-1.2-59a.el6.src.rpm
   1:ffmpeg                 warning: user makerpm does not exist - using root
warning: group makerpm does not exist - using root
########################################### [100%]
warning: user makerpm does not exist - using root
warning: group makerpm does not exist - using root
Build ffmpeg binary as non-root and install as root
#rpmbuild -bb rpmbuild/SPECS/ffmpeg12.spec
#rpm -ivh /root/rpmbuild/RPMS/x86_64/ffmpeg-*.rpm

Matterhorn

Install Matterhorn

Create a user for Matterhorn and then install Matterhorn

useradd matterhorn

yum -y install java-1.6.0-sun

wget https://github.com/avalonmediasystem/avalon-felix/archive/1.4.x.tar.gz
tar xvf 1.4.x.tar.gz
mv avalon-felix-1.4.x /usr/local/matterhorn

wget https://raw.github.com/avalonmediasystem/config-files/master/matterhorn/matterhorn_init.sh
mv matterhorn_init.sh /etc/init.d/matterhorn

chmod +x /etc/init.d/matterhorn
chown -R matterhorn:matterhorn /usr/local/matterhorn

Add avalon user and create avalon directory.

 

useradd avalon
useradd red5
mkdir -p /var/www/avalon
chown -R avalon:avalon /var/www/avalon

 

Create and configure streaming directories.

 

mkdir -p /usr/local/red5/webapps/avalon/streams
mkdir /var/avalon
mkdir -p /var/www/avalon/public/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
 
mkdir /var/avalon/hls_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/

 

Configure Matterhorn

Download Matterhorn config and verify property values.

wget https://raw.github.com/avalonmediasystem/config-files/master/matterhorn/config.properties
vim config.properties 
Change the server url port from 18080 to 8080
org.opencastproject.server.url=http://localhost:8080

And verify the configuration of the streaming directories

org.opencastproject.streaming.directory=/var/avalon/rtmp_streams
org.opencastproject.hls.directory=/var/avalon/hls_streams

Move the config to the appropriate spot

mv config.properties /usr/local/matterhorn/etc/

Add matterhorn user to the avalon group.

usermod -G avalon matterhorn

Dropbox

groupadd -r dropbox
useradd -r avalondrop
usermod -G dropbox avalon
mkdir -p /var/avalon/dropbox
chown avalondrop:dropbox /var/avalon/dropbox
chmod 2775 /var/avalon/dropbox

Edit /etc/ssh/sshd_config

# override default of no subsystems
Subsystem sftp internal-sftp
 
# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# ForceCommand cvs server
Match Group dropbox
ChrootDirectory /var/avalon
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp

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 matterhorn on
  • No labels