How to Install Evergreen on Arch Linux

Evergreen is a powerful, open-source Integrated Library System (ILS) software designed for managing the operations of libraries. It allows libraries to keep track of their books, patrons, and circulation activities. In this tutorial, we will be installing Evergreen on Arch Linux.

Prerequisites

Step 1: Install Required Dependencies

Before installing Evergreen, we need to install its required dependencies. Run the following command to install the necessary packages:

sudo pacman -S curl bzip2 cmake make gcc perl-dbd-pg perl-algorithm-diff perl-config-general perl-crypt-ssleay perl-datetime perl-dbd-pg perl-dbd-sqlite perl-digest-sha1 perl-exception-class perl-file-copy-recursive perl-file-slurp perl-html-template perl-json perl-json-xs perl-ldap perl-list-moreutils perl-log-log4perl perl-lwp-useragent-determined perl-mime-tools perl-mogilefs-client-linux perl-moose perl-net-server perl-net-snmp perl-net-ssleay perl-pgsql perl-pod-pom-perl perl-regexp-common perl-schema-loader perl-spreadsheet-parseexcel perl-switch perl-template-tiny perl-term-readkey perl-test-differences perl-test-longstring perl-test-memory-cycle perl-test-mockmodule perl-test-parallel perl-test-simple perl-text-diff perl-text-quoted perl-time-modules perl-xml-libxml perl-xml-simple

Step 2: Install PostgreSQL

Evergreen requires a PostgreSQL database for storing its data. Run the following command to install PostgreSQL:

sudo pacman -S postgresql

Next, we need to initialize the PostgreSQL database cluster. Run the following command:

sudo su - postgres -c "initdb --locale en_US.UTF-8 -D '/var/lib/postgres/data'"

Start the PostgreSQL service and enable it to automatically start at boot time:

sudo systemctl start postgresql
sudo systemctl enable postgresql

Step 3: Create Database for Evergreen

Next, we need to create a database and a user for Evergreen. Run the following commands to create a new user and database:

sudo su - postgres
createuser -P evergreen
createdb -E UTF8 -O evergreen -T template0 evergreen

Step 4: Install Redis

Evergreen uses Redis as a message broker for communication between its components. Run the following command to install Redis:

sudo pacman -S redis

Start the Redis service and enable it to automatically start at boot time:

sudo systemctl start redis.service
sudo systemctl enable redis.service

Step 5: Install Evergreen

Now that we have installed all the dependencies required for Evergreen, we can proceed with its installation. Run the following commands to download and install Evergreen:

git clone git://git.evergreen-ils.org/Evergreen.git
cd Evergreen
git checkout -b 3.4 origin/3.4
git submodule init
git submodule update
./autogen.sh
./configure --prefix=/opt/evergreen --sysconfdir=/etc/evergreen
make
sudo make install

Step 6: Configure Evergreen

After installing Evergreen, we need to configure it to use the PostgreSQL and Redis servers that we set up earlier.

Create a new file at /etc/evergreen/opensrf_core.xml with the following content:

<?xml version="1.0"?>
<!DOCTYPE open-ils-config SYSTEM "/usr/share/doc/opensrf/ext/opensrf_config.dtd">
<open-ils-config>
  <db>
    <user>evergreen</user>
    <pass>password</pass>
    <dsn>dbi:Pg:dbname=evergreen</dsn>
    <max_handles>5</max_handles>
  </db>
  <osrf_message_broker>
    <broker_class>Redis</broker_class>
  </osrf_message_broker>
  <osrf_pcrud>
    <4>DEBUG</4>
    <7>DEBUG</7>
  </osrf_pcrud>
</open-ils-config>

Replace password with the password for the evergreen user we created earlier.

Create a new file at /etc/evergreen/open-ils.conf with the following content:

site_name = MyLibrary
opensrf_core_config_file = /etc/evergreen/opensrf_core.xml
opensrf_user = evergreen
opensrf_group = evergreen
opensrf_logfile = /var/log/evergreen/opensrf.log
autopurge = 1
purge_time = 04:30:00
purge_age = 14

Create a new file at /etc/evergreen/opensrf_core.xml with the following content:

/opt/evergreen/bin/pg_config

Step 7: Start Evergreen

Finally, we can start Evergreen by running the following commands:

sudo systemctl start opensrf.service
sudo systemctl enable opensrf.service
sudo systemctl start apache.service
sudo systemctl enable apache.service

You should now be able to access Evergreen by going to http://localhost/eg/opac/home.

Congratulations, you have successfully installed Evergreen on Arch Linux!

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!