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

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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.

 

Recipe instructions for building your own Avalon setup from scratch on CentOS or Red Hat Enterprise Linux.

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?
80HTTP (Avalon)Yes
1935RTMP (red5)Yes
5080HTTP (red5)No
8983HTTP (Fedora/Solr)No
18080HTTP (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

Tomcat

Install Apache Tomcat with the nulrepo-public repository configured and enabled.

yum install tomcat
service tomcat start
vim /etc/tomcat/server.xml

on line 70, change the Tomcat connector port from 8080 to 8983:

<Connector port="8983" protocol="HTTP/1.1"

Add Tomcat manager user

By default, no user has access to the Tomcat Manager App. 

vim /etc/tomcat/tomcat-users.xml

Define a user in tomcat-users.xml with access to the manager-gui role. Below is a very basic example.

<tomcat-users>
  <role rolename="manager-gui"/>
  <user username="admin" password="tomcat" roles="manager-gui"/>
</tomcat-users>

Restart Tomcat

service tomcat restart

See if you can log in to the manager app at http://<server host name>:8983/manager/html

Try it out on your local machine and on another machine. If you can't reach the app from another machine, your iptables might need to be changed to allow access.

Solr

Avalon makes use of Solr through the Blacklight gem for faceting and relevance-based searching.

Download the solr tarball and unpack it

Download Solr from http://www.apache.org/dyn/closer.cgi/lucene/solr/4.2.0

wget http://archive.apache.org/dist/lucene/solr/4.2.0/solr-4.2.0.tgz
tar xvf solr-4.2.0.tgz
mv solr-4.2.0 /usr/local/solr
cd /usr/local/solr/dist/
cp solr-4.2.0.war /usr/share/tomcat/webapps/solr.war
mv solr-4.2.0.war /usr/local/solr/solr.war

Add XML configurations

Edit /etc/tomcat/Catalina/localhost/solr.xml and add

<Context docBase="/usr/local/solr/solr.war" debug="0" crossContext="true">
 <Environment name="solr/home" type="java.lang.String" value="/usr/local/solr" override="true"/>
</Context>

Edit /usr/local/solr/solr.xml and insert

<?xml version="1.0" encoding="UTF-8" ?>
  <solr persistent="true">
    <cores defaultCoreName="avalon" adminPath="/admin/cores" zkClientTimeout="${zkClientTimeout:15000}" hostPort="8983" hostContext="solr">
    <core instanceDir="avalon/" name="avalon"/>
  </cores>
</solr>

Download and Install Avalon specific Solr files from github

mkdir /usr/local/solr/lib
mv /usr/local/solr/dist/* /usr/local/solr/lib/
mv /usr/local/solr/contrib /usr/local/solr/lib/
 
wget https://github.com/avalonmediasystem/puppet-solr/archive/master.zip
unzip master
mv puppet-solr-master/files/avalon /usr/local/solr
chown -R tomcat7:tomcat /usr/local/solr/
chown -R tomcat7:tomcat /usr/local/tomcat
service tomcat restart

If you have successfully installed Solr you should be able to access the dashboard page at http://<server host name>:8983/solr

If you can't access the dashboard, check the tomcat logs in /usr/local/tomcat/logs/. Catalina.out and localhost.<date>.log usually provide the best information.

  • No labels