Installation
Install system packages
SEEK requires running a database in tandem with it. Unless you're knowledgeable in other kinda of databases, such as PostgreSQL, it's recommended to install a MySQL or MySQL-compatible database. RHEL does not have MySQL server packaged, instead it has the compatible MariaDB packaged. Install MariaDB:
SEEK also requires the installation of a couple of development libraries. The following were taken from the SEEK installation documentation:
User and permissions
The SEEK documentation has references to seek
, apache
, and www-data
users. Due to SEEK, NExtSEEK, and the web server all needing access to many of the same files, we've opted to run SEEK as the web server user. In our case, that user is apache
.
The apache
user is already installed, but does not have a login shell. Run the following to give it a login shell:
Next, you'll want to make a directory for the SEEK application to be installed, and a home directory for the apache
user to install Ruby Gems in. It's likely that the home directory isn't necessary and that everything can be installed in the SEEK application directory, but the current installation is in two separate directories.
You should be able to change to the apache
user. If performing an installation of production SEEK, you'll want to make sure to set the following environment variable in the apache
user ~/.bashrc
or ~/.bash_profile
:
Getting SEEK
The entirety of this section should be run as the apache
user, unless otherwise specified.
Now you're ready to install SEEK. First, change into the application directory and clone the SEEK git repository. Make sure to change to the branch for the correct version of SEEK you are trying to install.
SEEK is a Ruby project that uses RubyGems for dependency management. The easiest way to install and manage multiple versions of Ruby is RVM. Install RVM by following the instructions at this link: https://rvm.io/rvm/install. Do not install RVM with ruby, either do development version or stable.
Once RVM is installed, use it to install the version of Ruby needed for SEEK. SEEK has a file that contains the necessary version of Ruby.
Once Ruby is finished installing, you can install bundler
, which will handle downloading and setting up much of SEEK.
Set the bundle configuration to be aware that it is installing for a deployment environment so it can pin versions, etc. before installing all the Ruby Gem dependencies.
Once bundle has installed the necessary Gems, have it pre-compile assets and generate a crontab with the cron jobs that SEEK needs to run effectively.
Now, install the Python dependencies that SEEK needs using pip
:
Installing Solr Search Indexer
The entirety of this section should be run as the service-account
user, or any user account with sudo
access, unless otherwise specified.
SEEK uses the Solr indexer for indexing searches. The way that the SEEK developers recommend installing Solr is through the seek-solr
container in conjunction with a container volume. The easiest way of doing this is by creating a Systemd service file that will let us easily start and stop the seek-solr
server.
First, create the service file with a descriptive name, such as seek-solr.service
:
Next, put the following information into the service file:
Once you've saved the file, reload the Systemd daemon so it can see changes to its service file, then enable the seek-solr
service at boot and start it. Once it starts, it should pull the seek-solr
image, create the seek-solr-data-volume
volume, and start the seek-solr
container, running at port 8983
.
Now, have SEEK re-index by running the following:
Setting up the Database
SEEK manages creating the necessary databases. You'll just need to supply the database user, the user's credentials, and the name of the database. You can do so by copying the given database configuration file and adjusting it with your information.
Once you've done this, you can start the database server and create the user with the credentials you specified in the configuration file:
Now, have SEEK run the database setup using the following command in the SEEK application directory as the apache
user:
Serving Over Apache with Passenger Phusion
The entirety of this section should be run as the apache
user unless otherwise specified.
SEEK uses Passenger Phusion to deploy itself over a web server. Passenger is packaged as a RubyGem, so can be installed using gem
. Install it and run the included programs that install the apache2 module and validate the installation.
One of these programs will output the httpd module code that needs to be included in the httpd configuration file for the SEEK site. Create the SEEK site configuration file and paste in the following information.
This configuration file is made for serving over HTTP. To serve the site with SSL encryption over HTTPS, the easiest method is to use Certbot. Install Certbot by following the instructions on the Certbot website.
Once you've installed Certbot, run the following to have it create a certificate for the SEEK website. Answer the queries to the best of your abilities.
Certbot will automatically create the httpd configuration file for serving SEEK over HTTPS. Now, you can enable and start the httpd server, then open the firewall to accept HTTP and HTTPS connections.
Visit https://<SERVER DOMAIN>
. If it doesn't work, it's likely because of SELinux. There are instructions here to get Passenger working with SELinux, but they didn't work for me so you can set SELinux to permissive to get around this. Do it at your own risk.
Installing SEEK workers
SEEK includes scripts to start and stop workers that do asynchronous tasks. To manage them easily, create a systemd
service file that manages them for you. Create the following file with the following contents:
Now, reload the systemd
daemon and start the workers. You can start, stop, restart, etc. the workers by using the systemctl start
, systemctl stop
, and systemctl restart
commands, respectively.
Postfix for emails
SEEK requires an SMTP server in order to send out emails. To run your own SMTP server that forwards emails to a relay host, you'll need to install the following packages and set the following postfix
configuration:
Once configured, enable postfix
and the SASL authentication service. Make sure to set the SMTP server accordingly in the SEEK server admin settings on the web interface.
Last updated