How to Install Samvera Hyrax on Manjaro
Samvera Hyrax is an open-source digital content management system that allows institutions to easily create digital repositories. Here's a step-by-step guide to installing Samvera Hyrax on your Manjaro system.
Prerequisites
Before we begin, you will need:
- A Manjaro machine with root privileges
- Ruby version 2.7 or higher
Installation
Install the necessary dependencies by running the command below:
sudo pacman -S git nodejs npmInstall the PostgreSQL database server and the development headers:
sudo pacman -S postgresql postgresql-libs postgresql-libs-staticCreate a new database role and database for Hyrax:
sudo -iu postgres createuser -d -P hyrax createdb --owner=hyrax hyrax_development exitInstall the RVM (Ruby Version Manager) and Ruby dependencies:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB curl -sSL https://get.rvm.io | bash -s stable --ruby source /etc/profile.d/rvm.sh rvm install 2.7.2 rvm use 2.7.2 --default gem install bundler railsClone the Hyrax repository:
git clone https://github.com/samvera/hyrax.git cd hyraxInstall all gem dependencies using Bundler:
bundle installInitialize the Hyrax application:
rails hyrax:installConfigure the database by editing the
config/database.ymlfile:default: &default adapter: postgresql encoding: unicode database: hyrax_development pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> username: hyrax password: <%= ENV['HYRAX_DATABASE_PASSWORD'] %> host: localhost development: <<: *default test: <<: *default database: hyrax_testReplace the
passwordvalue with the one you set when creating the hyrax database role.Prepare the database by running the following commands:
rails db:migrate rails hyrax:default_collection_types:create rails hyrax:workflow:loadStart the Hyrax server:
rails server
You can now access the Hyrax application by navigating to http://localhost:3000 in your browser.
Conclusion
Congratulations! You have successfully installed Samvera Hyrax on your Manjaro system. You can now start building your digital repository with Hyrax.