How to Install Samvera Hyrax on POP! OS Latest
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.
Prerequisites
Before we proceed with the installation, please make sure that you have the following prerequisites:
- A server running POP! OS Latest
- Access to the terminal or command-line interface of the server
- A user account with sudo rights
Installation
Update the package index and upgrade the system packages by running the following command in the terminal:
sudo apt update && sudo apt upgradeInstall 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 ffmpegInstall 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-devInstall MariaDB server and client by running the following command:
sudo apt-get install mariadb-server mariadb-clientStart the MariaDB service and configure it to start at boot time by running the following commands:
sudo systemctl start mariadb sudo systemctl enable mariadbSecure the MariaDB installation by running the following command:
sudo mysql_secure_installationCreate a new database and user for Samvera Hyrax by running the following commands:
sudo mysql -u root -pCREATE DATABASE hyrax_production;CREATE USER 'hyraxuser'@'localhost' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON hyrax_production.* TO 'hyraxuser'@'localhost';FLUSH PRIVILEGES;exitInstall Samvera Hyrax by running the following commands:
git clone https://github.com/samvera/hyrax.git cd hyrax bundle installConfigure the database connection by creating a configuration file by running the following command:
cp config/database.yml.erb config/database.ymlOpen 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: 5000Initialize 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
- Start the Samvera Hyrax server by running the following commands:
bundle exec rails server -d -e production
- Finally, open the web browser and enter http://localhost:3000/ in the address bar to access the Samvera Hyrax web interface.
Conclusion
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.