Samvera Hyrax is an open-source digital repository platform used by libraries, archives, and museums for managing and providing access to digital collections. In this tutorial, we will guide you through the steps to install Samvera Hyrax on Fedora CoreOS Latest.
Before we proceed with the installation, make sure you have the following:
First, we need to install the dependencies required for Samvera Hyrax. Open a terminal and update the system package list:
sudo dnf update
Once the update process is complete, install the required dependencies:
sudo dnf install -y postgresql-server redis solr httpd
This will install Postgresql for the database, Redis for caching, Apache Solr for search, and Apache HTTP server for serving your application.
Next, we need to configure the postgresql database. Start by initializing the database and enabling the service:
sudo postgresql-setup initdb
sudo systemctl enable postgresql.service
Next, start the postgresql service and create a new user and database for Samvera Hyrax:
sudo systemctl start postgresql.service
sudo -u postgres createuser -P hyrax
sudo -u postgres createdb -O hyrax hyrax
Now, we need to configure Apache Solr for the search feature in Samvera Hyrax. Start by copying the sample configuration files:
sudo cp -R /opt/solr/server/solr/configsets/_default /opt/solr/server/solr/configsets/hyrax
Next, edit the managed-schema
file and add the following at the top:
<field name="_version_" type="plong" indexed="true" stored="true"/>
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="primary_title" type="text_en" multiValued="false" />
Save the changes and start the solr service:
sudo systemctl daemon-reload
sudo systemctl enable solr.service
sudo systemctl start solr.service
We are now ready to install Samvera Hyrax. Start by creating a new directory for your application:
sudo mkdir /var/www/hyrax
sudo chown -R $USER:$USER /var/www/hyrax
Next, clone the hyrax codebase into the /var/www/hyrax
directory:
git clone https://github.com/samvera/hyrax.git /var/www/hyrax
Switch to the latest release:
cd /var/www/hyrax
git tag
git checkout tags/<latest-release>
Install the required gems:
bundle install --deployment --without development test
Copy the example configuration files:
cp config/database.yml.example config/database.yml
cp config/fedora.yml.example config/fedora.yml
cp config/blacklight.yml.example config/blacklight.yml
cp config/hyrax.yml.example config/hyrax.yml
Configure the database.yml
file with the following:
default: &default
adapter: postgresql
encoding: unicode
database: hyrax
pool: 5
username: hyrax
password: <your_password>
host: localhost
port: 5432
Configure the fedora.yml
file with the following:
development:
url: http://localhost:8983/fedora
user: fedoraAdmin
password: fedoraAdmin
base_path: /fcrepo/rest
Configure the hyrax.yml
file with the following:
IIIF_SERVER_URL: "http://localhost:8182/iiif/2"
IIIF_IMAGE_ENDPOINT : "/images/v2"
IIIF_MANIFEST_ENDPOINT: "/manifests/"
IIIF_SEQUENCE_ENDPOINT: "/sequences/"
IIIF_CANVAS_ENDPOINT: "/canvases/"
Run database migration and seed the admin user:
bundle exec rails db:migrate
bundle exec rails hyrax:default_admin_set:create
bundle exec rails hyrax:default_collection_types:create
bundle exec rails hyrax:workflow:load
Start the application:
bundle exec rails server
Samvera Hyrax should now be running on http://localhost:3000
.
We need to configure Apache to serve the application. Create a new configuration file for hyrax:
sudo nano /etc/httpd/conf.d/hyrax.conf
Add the following configuration:
<VirtualHost *:80>
ServerName hostname.com
ProxyPreserveHost On
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
Replace hostname.com
with your server domain name. Save the file and restart Apache:
sudo systemctl enable httpd.service
sudo systemctl restart httpd.service
You can now access your Samvera Hyrax application on your server's domain name.
In this tutorial, we walked you through the steps to install Samvera Hyrax on Fedora CoreOS Latest. You can now customize your application based on your requirements and start managing your digital collections.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!