Samvera Hyrax is an open-source digital repository management system used to create, manage, and preserve digital collections. In this tutorial, we will go through the process of installing Samvera Hyrax on Debian latest.
Before we begin, ensure you have the following:
First, we need to install some dependencies that are required for Samvera Hyrax. Run the following command to install them:
sudo apt-get update
sudo apt-get install build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev libpq-dev libsqlite3-dev git curl zip unzip
You can install RVM to manage your Ruby versions. Run the following command to install RVM:
curl -sSL https://get.rvm.io | bash -s stable
After installing RVM, you need to activate it by running the following command:
source /etc/profile.d/rvm.sh
Next, install Ruby version 2.6 or higher by running the following command:
rvm install 2.6.3
After installing Ruby, set it as the default by running:
rvm use 2.6.3 --default
Install Node.js by running the following command:
sudo apt-get install nodejs
Install Yarn by running:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Install ImageMagick with the following command:
sudo apt-get install imagemagick
Now, it's time to install Samvera Hyrax. Run the following command to install it:
gem install hyrax
You need to generate the hyrax initializer by running:
rails generate hyrax:install
This will create the Hyrax initializer files in the config/initializers/hyrax.rb
directory.
You can choose either SQLite or PostgreSQL for the database. In this case, we will use SQLite. To configure the database, run the following commands:
echo 'production:
adapter: sqlite3
encoding: unicode
database: db/production.sqlite3
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000' > config/database.yml
After that, run the following command to create the database:
RAILS_ENV=production bundle exec rake db:create
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake hyrax:default_collection_types:create
RAILS_ENV=production bundle exec rake hyrax:workflow:load
Finally, start the server with the following command:
RAILS_ENV=production bundle exec rails server -d
You can then access Samvera Hyrax by going to http://localhost:3000
in your web browser.
In this tutorial, you learned how to install Samvera Hyrax on Debian latest. You now have a working digital repository management system that can be used to create, manage, and preserve 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!