Samvera Hyrax is an open-source digital repository and scholarly communication platform, which is widely used in higher education institutions worldwide. POP! OS is a user-friendly Linux distribution that is based on Ubuntu. In this tutorial, we will show you how to install Samvera Hyrax on the latest version of POP! OS.
Before we proceed with the installation, please make sure that you have the following prerequisites:
Update the package index and upgrade the system packages by running the following command in the terminal:
sudo apt update && sudo apt upgrade
Install the required dependencies by running the following command:
sudo apt-get install -y openjdk-8-jdk libxml2-dev libxslt-dev imagemagick ghostscript redis-server libreoffice libreoffice-headless ffmpeg
Install Ruby and its dependencies by running the following commands:
sudo apt-get install -y ruby-full ruby-bundler ruby-dev zlib1g-dev liblzma-dev libmysqlclient-dev libpq-dev
gdebi libsqlite3-dev libxmlsec1-dev
Install MariaDB server and client by running the following command:
sudo apt-get install mariadb-server mariadb-client
Start the MariaDB service and configure it to start at boot time by running the following commands:
sudo systemctl start mariadb
sudo systemctl enable mariadb
Secure the MariaDB installation by running the following command:
sudo mysql_secure_installation
Create a new database and user for Samvera Hyrax by running the following commands:
sudo mysql -u root -p
CREATE DATABASE hyrax_production;
CREATE USER 'hyraxuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON hyrax_production.* TO 'hyraxuser'@'localhost';
FLUSH PRIVILEGES;
exit
Install Samvera Hyrax by running the following commands:
git clone https://github.com/samvera/hyrax.git
cd hyrax
bundle install
Configure the database connection by creating a configuration file by running the following command:
cp config/database.yml.erb config/database.yml
Open the database.yml file in a text editor and add the following lines:
production:
adapter: mysql2
database: hyrax_production
username: hyraxuser
password: password
host: localhost
encoding: utf8mb4
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
Initialize the database by running the following commands:
bundle exec rails db:migrate RAILS_ENV=production
bundle exec rails hyrax:default_admin_set:create RAILS_ENV=production
bundle exec rails hyrax:default_collection_types:create RAILS_ENV=production
bundle exec rails server -d -e production
In this tutorial, we have shown you how to install Samvera Hyrax on the latest version of POP! OS. We hope that this tutorial has helped you to successfully set up a digital repository and scholarly communication platform on your server.
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!