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

This documentation has not been updated for Release 4.0.0 yet. Please see the one host (all-in-one) Manual Installation Instructions.

This documentation is for Release 3.2. For the Release 1 version of this page, see v.81. For the Release 2 version of this page, see v.87. For the Release 3.0-3.1 version of this page, see v.15.


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

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 “”, so name the machine this and enter it into /etc/hosts

# hostname
# cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4

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:

80HTTP (Avalon)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:

If you're connected over ssh, it might kick you off.

Save your script to /etc/sysconfig/, make it executable and run it.

chmod +x /etc/sysconfig/


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:

name=NUL Library Public RHEL repository

Install and place the NUL GPG key in the proper location:

curl -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


Install and start the httpd service.

yum install httpd
service httpd start

Add avalon user and create avalon directory.

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

Apache Passenger and Ruby

Change current user to avalon then install RVM and ruby 2.1.5.

su - avalon
curl -L | bash -s stable --ruby=2.1.5

Source the RVM shell (as avalon user)

source /home/avalon/.rvm/scripts/rvm

Install Passenger via Gem (as avalon user)

gem install passenger

Check to make sure passenger installed in the expected location (as avalon user)

$ passenger-config --root

Install Passenger apache module requirements (as root)

su - root
yum install curl-devel httpd httpd-devel apr-devel apr-util-devel

Build passenger for your version of Apache and Ruby (as avalon user)

su - avalon
passenger-install-apache2-module #copy the suggested Apache configuration file settings for later

Create an apache configuration file (as root)

su - root
vim /etc/httpd/conf.d/passenger.conf

Example contents of /etc/httpd/conf.d/passenger.conf:

LoadModule passenger_module /home/avalon/.rvm/gems/ruby-2.1.5/gems/passenger-4.0.56/buildout/apache2/
<IfModule passenger_module>
  PassengerRoot /home/avalon/.rvm/gems/ruby-2.1.5/gems/passenger-4.0.56
  PassengerDefaultRuby /home/avalon/.rvm/wrappers/ruby-2.1.5/ruby
  PassengerMaxPoolSize 30
  PassengerPoolIdleTime 300
  PassengerMaxInstancesPerApp 0
  PassengerMinInstances 3
  PassengerSpawnMethod smart-lv2

Apache security configuration

wget -O /usr/local/sbin/avalon_auth
chmod +x /usr/local/sbin/avalon_auth
wget -P /etc/httpd/conf.d/

Create a virtual host for avalon in /etc/httpd/conf.d/avalon.conf

wget -P /etc/httpd/conf.d/
vim /etc/httpd/conf.d/20-avalon.conf

Add this line to 20-avalon under the VirtualHost tag:

RailsEnv development

Restart apache.  With apache running, check passenger-status

/etc/init.d/httpd restart
su - avalon
which passenger-status
#> ~/.rvm/gems/ruby-2.1.5/bin/passenger-status


Grab Avalon code from github

cd ~
git clone git://
cd avalon
git checkout master #make sure you are in the master branch (should be by default)
mv public/* /var/www/avalon/public/
mv  * /var/www/avalon/

Configure Avalon 

Create /var/www/avalon/config/setup_load_paths.rb and add:

if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
     gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems')
     ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@global"
     require 'rvm'
     RVM.use_from_path! File.dirname(File.dirname(__FILE__))
   rescue LoadError
     raise "RVM gem is currently unavailable."
 # If you're not using Bundler at all, remove lines bellow
 ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
 require 'bundler/setup'
cd /var/www/avalon/config
cp authentication.yml.example authentication.yml

Configure database settings

vim database.yml

Replace database.yml with the correct values for your development environment

  adapter: mysql2
  host: localhost
  database: rails
  username: rails
  password: rails
  pool: 5
  timeout: 5000

Install the mysql2 adapter 

su - root
yum install mysql-devel
su - avalon
gem install activerecord-mysql2-adapter
gem install mysql2
su - root
vim /var/www/avalon/Gemfile

Add this line to the Gemfile

gem 'mysql2', '~>0.3.11'

If you are using mysql instead of sqllite (as is done throughout this document), then comment out the following lines in the Gemfile

#    gem 'activerecord-jdbcsqlite3-adapter'
#    gem 'jdbc-sqlite3'
#    gem 'sqlite3'

Run the bundle install

Install additional dependencies

yum install rubygem-json cmake

Run bundler

su - avalon
cd /var/www/avalon
gem update debugger-ruby_core_source
bundle install

Finish configuring Avalon

Edit /var/www/avalon/config/solr.yml

    url: http://localhost:8983/solr/

Edit /var/www/avalon/config/fedora.yml

    user: fedoraAdmin
    password: fedoraPassword

Create  /var/www/avalon/config/matterhorn.yml

  url: http://matterhorn_system_account:CHANGE_ME@localhost:8080/

Create  /var/www/avalon/config/avalon.yml and base it off of /var/www/avalon/config/avalon.yml.example. Consult the documentation to customize this file for your installation. 

    path: '/var/avalon/dropbox/'
    upload_uri: 'sftp://localhost/var/avalon/dropbox'
    username: 'test'
    password: 'test'
    notification_email_address: ''

Create the database using rake

su - avalon
cd /var/www/avalon
rake db:create

If you get an error message saying that you can't connect to the database, take a look at this post and follow some of the troubleshooting steps.

Run the database migrations

rake db:migrate

Set rails environment to development, if it has not defaulted to this. On the first line of /var/www/avalon/config/environment.rb make sure it says 'development'

ENV['RAILS_ENV'] ||= 'development'

Visit your new Avalon site!

You should be able to visit the webpage with just the hostname (ie http://localhost)

Click on "Sign in" in the upper right corner of the website main page. Set up a default identity with the following properties.


This is a known identity with administrative privileges.

Start delayed_job

As avalon run

cd /var/www/avalon/
bundle exec rake delayed_job:start

Delayed Job handles background jobs.  DelayedJob logs to log/delayed_job.log in the avalon directory. 

Using the System

You can find specific information about using the system in the Collection Manager's Guide. Upload items individually or via batch.  Sample content is available for your convenience.

Known Issues - a list of bugs, workarounds, and cautions.

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 httpd on



  • No labels