Installing Samvera Hyrax on OpenBSD
In this tutorial, we will guide you step-by-step through the process of installing Samvera Hyrax on OpenBSD. Samvera Hyrax is an open-source digital repository that is built on top of several other technologies, including Fedora, Solr, and Blacklight.
Prerequisites
Before we begin, make sure that you have the following prerequisites:
- A server running OpenBSD
- Ruby 2.7 or higher installed on your server
- Bundler gem installed on your server
- Git installed on your server
- PostgreSQL installed on your server
If you are missing any of these prerequisites, please install them before continuing.
Installation
Update your system packages:
$ sudo pkg_add -UuInstall nodejs:
$ sudo pkg_add -i nodeInstall the yarn package manager:
$ sudo pkg_add -i yarnCreate a new directory for your Hyrax instance:
$ mkdir my_hyrax_instance $ cd my_hyrax_instanceClone the Hyrax repository:
$ git clone https://github.com/samvera/hyrax.git .Install the required gems using Bundler:
$ bundle install --without development testCreate a new PostgreSQL user and database:
$ sudo su - postgres $ createdb hyrax_production $ psql # CREATE USER hyrax WITH PASSWORD 'password'; # ALTER DATABASE hyrax_production OWNER TO hyrax; # \q $ exitConfigure your environment variables:
$ export HYRAX_HOST='localhost:3000' $ export HYRAX_BASE_PATH='/' $ export DATABASE_URL='postgres://hyrax:password@localhost/hyrax_production' $ export SECRET_KEY_BASE=$(bin/rake secret)Run the database migration:
$ bin/rake db:migrate RAILS_ENV=productionSeed the database:
$ bin/rake hyrax:default_admin_set:create hyrax:default_collection_types:create hyrax:workflow:loadStart the web server:
$ bin/rails server -e productionVisit your Hyrax instance in your web browser by navigating to
http://localhost:3000.
Congratulations! You have successfully installed Samvera Hyrax on OpenBSD.