Chapter 12. Server Operations and Maintenance

Abstract

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
Security
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 osrf_ctl.sh script located in the openils/bin directory.

Note

The osrf_ctl.sh command must be run as the opensrf user.

To view help on osrf_ctl.sh and get all of its options, run:

osrf_ctl.sh -h

To start Evergreen, run:

osrf_ctl.sh -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.

Note

If you receive the error message: osrf_ctl.sh: 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/System.pm 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:

osrf_ctl.sh -l -a start_router

will only start the router service.

Caution

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:

osrf_ctl.sh -l -a start_router
osrf_ctl.sh -l -a start_perl
osrf_ctl.sh -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:

osrf_ctl.sh -l -a stop_all

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

To restart Evergreen, run:

osrf_ctl.sh -l -a restart_all