Chapter 12. Server Operations and Maintenance


This chapter deals with basic server operations such as starting and stopping Evergreen as well wall security, backing up and troubleshooting Evergreen.

Table of Contents

Starting, Stopping and Restarting
Backing Up
Managing Log Files
Installing PostgreSQL from Source
Configuring PostgreSQL

Starting, Stopping and Restarting

Occasionally, you may need to restart Evergreen. It is imperative that you understand the basic commands to stop and start the Evergreen server. You can start and stop Evergreen from the command line of the server using the script located in the openils/bin directory.


The command must be run as the opensrf user.

To view help on and get all of its options, run: -h

To start Evergreen, run: -l -a start_all

The -l flag is used to indicate that Evergreen is configured to use localhost as the host. If you have configured opensrf.xml to use your real hostname, do not use the -l flag. The -a option is required and indicates the action of the command. In this case start_all.


If you receive the error message: command not found, then your environment variable PATH does not include the /openils/bin directory. You can set it using the following command:

export PATH=$PATH:/openils/bin

If you receive the error message Can't locate OpenSRF/ in @INC … BEGIN failed–compilation aborted, then your environment variable PERL5LIB does not include the /openils/lib/perl5 directory. You can set it using the following command:

export PERL5LIB=$PERL5LIB:/openils/lib/perl5

It is also possible to start a specific service. For example: -l -a start_router

will only start the router service.


If you decide to start each service individually, you need to start them in a specific order for Evergreen to start correctly. Run the commands in this exact order: -l -a start_router -l -a start_perl -l -a start_c

After starting or restarting Evergreen, it is also necessary to restart the Apache web server for the OPAC to work correctly.

To stop Evergreen, run: -l -a stop_all

As with starting, you can choose to stop services individually.

To restart Evergreen, run: -l -a restart_all