Preparatory homework

The first thing that you should have to start with the training is a version of SeisComP3 running on your machine. To do this you are presented with two options. You can use an image from a virtual machine provided by GEOFON, which already has SeisComP3 installed on it (but not configured), or you deploy it on your computer.

Select only one of the two options presented in this chapter.

Option 1: VirtualBox installation

First, download and install VirtualBox if you do not have a native Linux on your laptop (see the chapter Download of Resources).

Then, install the VirtualBox image with SC3 preinstalled.

  1. Download the file from http://geofon.gfz-potsdam.de/training/SC3-Trieste.ova . The file has a size of about 3.9 GB. (MD5 sum: a4ccdbf9b78b497ac8a75b10e8875a85 SC3-Trieste.ova)
  2. Open the VirtualBox program
  3. Go to the menu File -> Import appliance
  4. Select the .ova file downloaded

This may take a few minutes. At this stage you should have a machine loaded into the machine list of the VirtualBox program. Select it from the list, and press “Start”.

Consult your instructor for the passwords for the virtual machine that you received. If the system becomes slow, feel free to increase the memory size or to add another disk to the VM.

Warning

The passwords used may be common to many virtual box images, and therefore may be known, or easily guessed, by others. Use this disk image only behind an institutional or corporarte firewall. You should not leave the passwords with their default values.

Note

The keyboard layout was configured to be “English”. To change it to your preferred language: open the Dash, type “keyboard”, open “Text entry”, add the layout you want and move it to the top.

This installation comes with a TEMPORARY license for SeisComP3. See Download and configure the SeisComP3 License file.

Option 2: SeisComP3 installation

Warning

These instructions have been tested on (L)Ubuntu 16.04.

Get your native or virtual (L)Ubuntu 16.04 ready

  • Start the (virtual) machine and open your home directory

  • Add a new user (This is not mandatory; you can install under an existing user directory. Creating a new user is recommended as it allows an easy cleanup of the system later simply by removing the new user if needed)

    sysop@ubuntu:~$ sudo adduser sysop
    sysop@ubuntu:~$ sudo addgroup admin
    sysop@ubuntu:~$ sudo usermod -a -G admin,adm,audio sysop
    
  • Check the size and the architecture:

    sysop@ubuntu:~$ df –h
    sysop@ubuntu:~$ uname -m
    

Download SeisComP3 binary package, maps and documentation

The MD5 checksums for these files are:

dc729bf78ff63176153eed738d4307f4  seiscomp3-jakarta-2014.248.01-ubuntu14.04-i686.tar.gz
d8887eb6d64dd7aad5339d96a00d6c7a  seiscomp3-jakarta-2014.248.01-ubuntu14.04-x86_64.tar.gz
d97396d19ac86f2a38676a6900a32dd1  seiscomp3-jakarta-2016.062-doc.tar.gz
faa9dbc5ae8e16e7c4c2ed113475c841  seiscomp3-jakarta-2016.161.01-ubuntu16.04-i686.tar.gz
a582947ce63e8d610a071a33cb38499a  seiscomp3-jakarta-2016.161.01-ubuntu16.04-x86_64.tar.gz
74740745736a93dc86641e4e888806c2  seiscomp3-seattle-maps.tar.gz

Download and configure the SeisComP3 License file

  • Create a directory with the name “license”

    sysop@ubuntu:~$ mkdir license
    sysop@ubuntu:~$ cd license
    
  • Download and save the license files (MD5 sum d129ee6901918c38e41873005307536e) to the “license” directory

    sysop@ubuntu:~$ tar -xf temporary-license.tar
    sysop@ubuntu:~$ cd ~
    sysop@ubuntu:~$ mkdir -p .seiscomp3/key
    sysop@ubuntu:~$ cp license/key/* .seiscomp3/key
    sysop@ubuntu:~$ rmdir license/key
    

This is a TEMPORARY license which may be used for some time after your training is complete. You may arrange a FREE license for non-commercial use at your institution by contacting us at geofon@gfz-potsdam.de . For details, see the README file, and http://www.seiscomp3.org .

Install all dependencies needed and prepare the environment

  • For Ubuntu 16.04 and Mint 18:

    sysop@ubuntu:~$ sudo apt-get update
    sysop@ubuntu:~$ sudo apt-get install libxml2 libboost-filesystem1.58.0
     libboost-iostreams1.58.0 libboost-thread1.58.0 libboost-program-options1.58.0
     libboost-regex1.58.0 libboost-signals1.58.0 libboost-system1.58.0 libssl1.0.0
     libncurses5 libmysqlclient20 libpython2.7 python-m2crypto mysql-server
     mysql-client libqtgui4 libqt4-xml
    
  • For Ubuntu 12.04 and 14.04:

    sysop@ubuntu:~$ seiscomp3/bin/seiscomp install-deps base mysql-server gui
    
  • For Mint 17:

    sysop@ubuntu:~$ sudo apt-get update
    sysop@ubuntu:~$ sudo apt-get install libxml2 libboost-filesystem1.54.0
     libboost-iostreams1.54.0 libboost-thread1.54.0 libboost-program-options1.54.0
     libboost-regex1.54.0 libboost-signals1.54.0 libboost-system1.54.0 libssl0.9.8
     libncurses5 libmysqlclient18 libpython2.7 python-m2crypto mysql-server
     mysql-client libqtgui4 libqt4-xml
    
  • Print the environment variables and copy them to the .bashrc

    sysop@ubuntu:~$ seiscomp3/bin/seiscomp print env
    export SEISCOMP_ROOT=/home/sysop/seiscomp3
    export PATH=/home/sysop/seiscomp3/bin:$PATH
    export LD_LIBRARY_PATH=/home/sysop/seiscomp3/lib:$LD_LIBRARY_PATH
    export PYTHONPATH=/home/sysop/seiscomp3/lib/python:$PYTHONPATH
    export MANPATH=/home/sysop/seiscomp3/share/man:$MANPATH
    export LC_ALL=C
    source /home/sysop/seiscomp3/share/shell-completion/seiscomp.bash
    
    sysop@ubuntu:~$ vi .bashrc
    
  • Reload the contents of .bashrc on your current environment

    sysop@ubuntu:~$ source ~/.bashrc
    

The MySQL SeisComP3 configuration

  • Create and add the following lines to the mysql seiscomp3.cnf file.

    sysop@ubuntu:~$ sudo vi /etc/mysql/conf.d/seiscomp3.cnf
    [mysqld]
    innodb_buffer_pool_size = 64M
    innodb_flush_log_at_trx_commit = 2
    
  • Restart mysql.

    sysop@ubuntu:~$ sudo service mysql restart
    mysql stop/waiting
    mysql start/running, process 5522
    

SeisComP3 setup and start Graphical User Interfaces (GUIs)

  • Run seiscomp setup and enter your preferred IDs and password. For the other fields, you can always accept the default values.

    sysop@ubuntu:~$ seiscomp setup
    

    You should enter an appropriate short name (without spaces) for Agency ID and Datacenter ID. These are used for Arclink and Seedlink, and in the information describing data model objects such as origins and events.

  • Enable at least the following modules from the command line. This can also be done from the scconfig GUI

    sysop@ubuntu:~$ seiscomp enable seedlink slarchive arclink scautopick scautoloc
     scamp scmag scevent fdsnws
    
  • Start the scconfig GUI

    sysop@ubuntu:~$ scconfig
    

If the application runs without problems you have correctly installed SeisComP3. Congratulations!

Hint

(Applicable to the 2016 Myanmar International Training Course only) You should get an updated cities file from GEOFON. Install it in ~/seiscomp3/share:

cd ~/seiscomp3/share
wget http://geofon.gfz-potsdam.de/training/cities.xml.gz
mv cities.xml cities.xml.2016.062
gzip -d cities.xml.gz

In case of problems

If, when you attempt to run a seiscomp command such as scconfig or scolv, you receive an error message like:

scconfig: command not found

then the most likely explanation is that you have not set your SeisComP environment variables correctly. If you have not installed SeisComP, see the top of this document. Otherwise, run the seiscomp command with the full path to where you installed. With the ‘print env’ option it will show commands you need to enter in your shell. If you installed in the usual way, as user sysop, this is likely to be in ~/seiscomp3/bin:

sysop@host:~$ ~/seiscomp3/bin/seiscomp print env
export SEISCOMP_ROOT=/home/sysop/seiscomp3
export PATH=/home/sysop/seiscomp3/bin:$PATH
export LD_LIBRARY_PATH=/home/sysop/seiscomp3/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/sysop/seiscomp3/lib/python:$PYTHONPATH
export MANPATH=/home/sysop/seiscomp3/share/man:$MANPATH
export LC_ALL=C
source /home/sysop/seiscomp3/share/shell-completion/seiscomp.bash

These seven lines are not actually run by the ‘seiscomp print env’ command; you need to cut and paste them into your shell to run them. You can also add these to your .bashrc, .profile, or similar file with commands to be run every time you log in.

You will find that by default SeisComP logs to files in ~/seiscomp3/var/log and ~/.seiscomp3. There are four levels of logging (1=ERROR, 2=WARNING, 3=INFO and 4=DEBUG). The level of logging can be adjusted from the default level of 2 in configuration files in ~/seiscomp3/etc/*.cfg by setting:

logging.level = 3

or in the GUI for each module. (Open the module configuration, then go to “global” and the “logging” subsection.)