wiki:sysadminImportantCommands

Important Commands

Stop sequence for carbon and protostar

  1. On protostar, as the opensrf user, stop the OpenSRF C and Perl services:
    osrf_ctl.sh -a stop_c
    osrf_ctl.sh -a stop_perl
    
  2. On carbon, as the opensrf user, stop the OpenSRF C, Perl, and router services:
    osrf_ctl.sh -a stop_c
    osrf_ctl.sh -a stop_perl
    osrf_ctl.sh -a stop_router
    
  3. Shut down protostar and carbon from the OS.

Start sequence for carbon and protostar

  1. On carbon, as the opensrf user, start the OpenSRF router and Perl services:
    osrf_ctl.sh -a start_router
    osrf_ctl.sh -a start_perl
    
  2. On protostar, as the opensrf user, start the OpenSRF Perl and C services:
    osrf_ctl.sh -a start_perl
    osrf_ctl.sh -a start_c
    
  3. On carbon, as the opensrf user, start the OpenSRF C services:
    osrf_ctl.sh -a start_c
    
  4. On protostar, as the root user, start the Apache service:
    /etc/init.d/apache2 start
    
  5. Start the reporter service (see below)
  1. Start Z39.50 server (see below)
  1. Start the SIP service (see below)

Starting the reporter daemon - clark-kent.pl

To start the reporter daemon, run the following commands on protostar:

sudo su - opensrf
rm /tmp/reporter-LOCK
clark-kent.pl --daemon --conc 2

Starting the Z39.50 server

To start the Z39.50 server, run the following commands on protostar:

sudo su - lauadmin
cd /home/lauadmin/z3950_server
sh run_zserver

TODO: Fix this so it's not running under the LU account!

Starting / stopping / restarting SIP

To start SIP, run the following commands on carbon:

oils_ctl.sh -d /var/local/run -s /openils/conf/oils_sip.xml -a start_sip

Restarting Syslog

Occasionally, syslog will stop running, and Big Brother will send out errors like the following:

[9295013]  starburst.procs red Tue Jan 26 23:42:20 EST 2010 Some processes are in error

&red syslog-ng >=1 - not running, requires at least 1
&red /var/log/remote/prod/2010/01/27/osrferror.log has vanished

&red /var/log/remote/sys/starburst/2010/01/27/syslog.log has vanished

In a case like this, restarting syslog on starburst and creating the file(s) that have vanished will stop the errors. Also, it may be wise to give the created file(s) the same permissions as the other files in the same directory. You need to do this as root because you will otherwise not be able to access the syslog directories. To do this (remember to replace the file name/path with the one you are replacing!):

sudo su -
/etc/init.d/syslog-ng restart
touch /var/log/remote/prod/2010/01/27/osrferror.log
chown root:adm /var/log/remote/prod/2010/01/27/osrferror.log
chmod 640 /var/log/remote/prod/2010/01/27/osrferror.log
exit

Stopping / starting / restarting all services of a given kind

osrf_ctl.sh -a <action>_<kind>

where action is:

  • start
  • stop
  • restart

and kind is (in order of dependencies):

  • router (run only on carbon)
  • perl (run on carbon and then on protostar)
  • c (run on carbon and then on protostar)
  • all (don't use this in production)

Stopping / starting / restarting individual Perl services

/openils/bin/opensrf-perl.pl --pid /var/local/run/ --service open-ils.storage --action restart --config /openils/conf/opensrf_core.xml

... where restart can be stop, start, or restart.

Evergreen

Stopping / starting / restarting Apache

sudo /etc/init.d/apache2 <action>

where action is:

  • start
  • stop
  • restart

Postgres

The Staff Client in Linux LaunchingTheStaffClientinLinux Subversion
scp - Secure Copy

Last modified 10 years ago Last modified on Jan 24, 2013, 11:25:02 AM