This documentation is for Release 6.3. For documentation on previous releases, please select from the options below.
These instructions provide a recipe for building your own all-in-one Avalon system from scratch on CentOS or Red Hat Enterprise Linux, version 6.x is supported, 7.x will be supported soon. Please note that while an all-in-one installation as outlined here is certainly suitable for testing and demos, a single, all-in-one, server may not be suitable for production environments.
Ready the Installation Environment
Make sure a valid hostname is resolvable
The default hostname is “avalon.dev”, so name the machine this and enter it into
The Avalon Media System requires several ports to be open to client browsers.
Here are the port settings that will need to be configured:
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.
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".
You may have to disable SELinux completely if there's Passenger installation problem
vim /etc/selinux/config #change the value of `SELINUX` to `disabled`
This package has libyaml-devel which is required by ruby and not provided by Redhat.
Add the Avalon repository
Create the Avalon repository config file:
Append the following code:
Install and place the Avalon GPG key in the proper location:
Install development libraries and packages for building Ruby
Install Java 8
Fedora Commons Repository
Fedora runs as a webapp in Tomcat
Install Apache Tomcat
Add Tomcat manager user
By default, no user has access to the Tomcat Manager App. Define a user in
/etc/tomcat/tomcat-users.xml with access to the manager-gui role. Below is a very basic example.
Configure Tomcat for Fedora
Append the following to
Download and run the fcrepo installer
See if you can access Fedora's REST interface at http://<server host name>:8984/fedora4/rest
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. If Fedora is not up, check the tomcat logs in /var/log/tomcat/. Catalina.out and localhost.<date>.log usually provide the best information.
Avalon makes use of Solr through the Blacklight gem for faceting and relevance-based searching.
Download the solr tarball and run the installation script
Download Solr from http://archive.apache.org/dist/lucene/solr/
By default, the script extracts the distribution archive into
/opt, configures Solr to write files into
/var/solr, and runs Solr as the
solr user. Follow the linked guide if you wish to change these defaults.
Create Avalon core for Solr
If you have successfully installed Solr you should be able to access the dashboard page at http://<server host name>:8983/solr
Instructions on how to manually start/stop Solr: https://cwiki.apache.org/confluence/display/solr/Running+Solr
MariaDB is now the default database system for CentOS/RHEL7. Feel free to change Mysql below to MariaDB
Avalon uses MySQL for storing search queries, user data and roles, and as a back end for asynchronously sending requests to Matterhorn.
Install MySQL server
Create databases and users
Enter the mysql monitor
Create a database for the Avalon web application and add a user to it
Check your work and exit
See documentation for your version of MySQL Server for detailed syntax (http://dev.mysql.com/doc/refman/5.1/en/create-database.html )
Media Streaming Server
Red5 is no longer the default streaming server for Avalon 6.3. With the upgrade to MediaElementjs 4, we now rely completely on HLS.
By default, Avalon prechunks HLS artifacts that can be served by any webserver, see: Matterhorn's distribute-hls workflow. For development, this may suffice because a dedicated streaming server isn't necessary, however many consider prechunking inflexible and inconvenient.
For production environments, an HLS-enabled server like Wowza, Adobe Media System (commercial) or Nginx + the HLS module (open-source) can take an mp4 created from distribute-streaming and stream it on the fly. Then prechunking can be disabled by commenting out the
distribute-hls operation. Instructions for setting up Nginx will follow soon.
Install prerequisite packages using yum and the Avalon repository (note: mediainfo is pinned to 0.7.61-1 because of a bug with time fragment formatting in most recent version 0.7.87-1 in epel):
Install ffmpeg srpm
The following commands need to run under a user other than root. Change to another user to continue.
Run the ffmpeg installer
Log back in as root and finish the install.
You can also build a more modern ffmpeg from source, but not all versions work. Version 3.1 is known to work - check out the release/3.1 branch and build from there. If your modern ffmpeg uses fdk_aac instead of libfaac, adjust the Matterhorn etc/encoding/avalon.properties accordingly.
Install and start the httpd service.
With newer httpd you may need to in /etc/httpd/conf.d/10-mod_rewrite.conf, replace RewriteLock line with Mutex sem
Create a user for Matterhorn and then install Matterhorn
Add avalon user and create avalon directory.
Create and configure the media_path (upload) and streaming directories.
Download Matterhorn config and verify property values.
And verify the configuration of the streaming directories
Also check in
Move the config to the appropriate spot
Add matterhorn user to the avalon group.
Optional, but recommended to avoid problems with batch ingest: Change number of processes available to matterhorn user, cleaning up work dir and using external DB.
Apache Passenger and Ruby
Change current user to avalon then install RVM and ruby 2.4.1
Source the RVM shell (as avalon user) or close the terminal and open it back up.
Install Passenger via Gem (as avalon user)
Check to make sure passenger installed in the expected location (as avalon user)
Install Passenger apache module requirements (as root)
Build passenger for your version of Apache and Ruby (as avalon user)
Create an apache configuration file (as root)
Example contents of /etc/httpd/conf.d/passenger.conf, which may need to be changed based off of the current version of ruby and passenger:
Apache security configuration
Create a virtual host for avalon in /etc/httpd/conf.d/avalon.conf
In 20-avalon.conf add this line inside the VirtualHost tag:
If using SSL, the following fix should be added to address BEAST, POODLE, RC4 issues (after the
Restart apache. With apache running, check passenger-status
Grab Avalon code from github
New Config gem
As of 6.3, Avalon is using the flexible and increasingly popular Config gem. Default settings for Avalon can be selectively overwritten by putting custom ones in
If using vim with default settings and pasting the the code below, it will automatically comment out the last line. To prevent that, enable paste using the command :set paste and then use just ctrl+shift+v instead of going into insert mode.
Create /var/www/avalon/config/setup_load_paths.rb and add:
Configure database settings
Replace database.yml with the correct values for your production environment
Install the mysql2 adapter
Run the bundle install
Finish configuring Avalon
Edit /var/www/avalon/config/solr.yml and /var/www/avalon/config/blacklight.yml
Avalon config file
Avalon settings now live in /var/www/avalon/config/settings.yml. The default values should be sufficient to start with.
They can be selectively overwritten by creating a settings/<environment>.yml, or by using environment variables. Consult the config gem doc to understand how it works, or Avalon's documentation to customize this file for your installation.
Change the secrets.yml file:
grab the output of rake secret and add it to secrets.yml where instructed.
More information: Configuration Files#config/secrets.yml
Create the database using rake
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
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'
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.
Redis & Resque
Avalon uses Resque for background processing, which relies Redis as its key-value store.
Resque logs to log/resque.log in the avalon directory.
To restart rescue, simple kill its two processes (`ps aux | grep resque`) and run the above commands again.
To manually start a batch ingest job, run as avalon user
this will translate content in
schedule.rb to cron job syntax. Once verified, run the following to write job to crontab
You should get the cron job automatically if you were deploying from Capistrano.
Using the System
You can find specific information about using the system in the Collection Manager's Guide. Sample content is available for your convenience. Upload new items individually or by batch directly via SFTP using the avalondrop account you created above.
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: