Recipe instructions for building your own Avalon setup from scratch on CentOS or Red Hat Enterprise Linux.
Ready the Installation Environment
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
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
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".
Add the NUL repository
Create the NUL repository config file:
Append the following code:
Install and place the NUL GPG key in the proper location:
Install development libraries and packages for building Ruby
Install Apache Tomcat with the nulrepo-public repository configured and enabled.
on line 70, change the Tomcat connector port from 8080 to 8983:
Add Tomcat manager user
By default, no user has access to the Tomcat Manager App.
Define a user in tomcat-users.xml with access to the manager-gui role. Below is a very basic example.
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.
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
Add XML configurations
Edit /usr/local/tomcat/conf/Catalina/localhost/solr.xml and add
Edit /usr/local/solr/solr.xml and insert
Download and Install Avalon specific Solr files from github
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.
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 Fedora Commons Repository software and add a user to it
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 )
Fedora Commons Repository
Download and run the fcrepo installer
Use the following values in place of defaults
Fedora home directory
Fedora administrator password
Fedora server host
Fedora application server context
Authentication requirement for API-A
SSL required for API-A
SSL required for API-M
Tomcat home directory
Tomcat HTTP port
Tomcat shutdown port
Tomcat Secure HTTP port
MySQL JDBC driver
Accept remaining defaults then add permissions for Tomcat and restart Tomcat
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.
Download and install Red5.
Download the init script and add it to the init.d directory.
Give Red5 permissions to the red5 directory and the init script.
Install prerequisite packages using yum and the NUL-public repository
Install ffmpeg srpm
The following commands need to run under a user other than root. Change to the red5 user to continue.
Run the ffmpeg installer
Log back in as root and finish the install.
Install and start the httpd service.
Create a user for Matterhorn and then install Matterhorn
Add avalon user and create avalon directory.
Create and configure streaming directories.
Download Matterhorn config and verify property values.
Change the server url port from 18080 to 8080
And verify the configuration of the streaming directories
Move the config to the appropriate spot
Add matterhorn user to the avalon group.
Apache Passenger and Ruby
Change current user to avalon then install RVM and ruby 1.9.3.
Source the RVM shell (as avalon user)
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
Add this line to 20-avalon under the VirtualHost tag:
Restart apache. With apache running, check passenger-status
Grab Avalon code from github
Create /var/www/avalon/config/setup_load_paths.rb and add:
Configure database settings
Replace database.yml with the correct values for your development environment
Install the mysql2 adapter
Add this line to the Gemfile
If you are using mysql instead of sqllite (as is done throughout this document), then comment out the following lines in the Gemfile
Run the bundle install
Finish configuring Avalon
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.
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.
As avalon run
Delayed Job handles background jobs. DelayedJob logs to log/delayed_job.log in the avalon directory.
Red5 Avalon Security Webapp
If Red5 is installed and running you should be able to access http://avalon.dev:5080/
Using the System
You can find specific information about using the system in the Collection Manager's Guide. Upload items individually or via batch. Batch demo content is available for your convenience, which includes the media files and an excel document necessary to run a batch. You can submit a 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: