You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

432 lines
23 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>Installation on Ubuntu &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
<script type="text/javascript" src="../../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<link rel="shortcut icon" href="../../_static/favicon.ico"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Upgrading SeisComP" href="upgrading.html" />
<link rel="prev" title="Tutorials" href="../tutorials.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">5.3.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="upgrading.html" title="Upgrading SeisComP"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../tutorials.html" title="Tutorials"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../tutorials.html" accesskey="U">Tutorials</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<div class="section" id="installation-on-ubuntu">
<span id="tutorials-postinstall"></span><h1>Installation on Ubuntu<a class="headerlink" href="#installation-on-ubuntu" title="Permalink to this headline"></a></h1>
<p>You will …</p>
<ul class="simple">
<li><p>Make a basic <cite>SeisComP</cite> installation</p></li>
</ul>
<p>Pre-requisites for this tutorial:</p>
<ul class="simple">
<li><p>Internet access</p></li>
</ul>
<p>Afterwards/Results/Outcomes:</p>
<ul class="simple">
<li><p>Run a <cite>SeisComP</cite> executable</p></li>
<li><p>Run a <cite>SeisComP</cite> GUI program</p></li>
</ul>
<p>Time range estimate:</p>
<ul class="simple">
<li><p>10-15 minutes</p></li>
</ul>
<p>Related tutorial(s):</p>
<ul class="simple">
<li><p><a class="reference internal" href="upgrading.html#tutorials-upgrade"><span class="std std-ref">Upgrading SeisComP</span></a></p></li>
<li><p><a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">Add a new station</span></a></p></li>
<li><p><a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">Add real-time stations from GEOFON</span></a></p></li>
</ul>
<hr class="docutils" />
<p>You may install <cite>SeisComP</cite> by:</p>
<ol class="arabic simple">
<li><p><a class="reference internal" href="#tutorials-postinstall-compile"><span class="std std-ref">Compiling the source code</span></a>,</p></li>
<li><p><a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">Installing pre-compiled release packages</span></a>
including binaries, maps and documentation.</p></li>
</ol>
<div class="section" id="get-your-linux-system-ready">
<h2>Get your Linux System ready<a class="headerlink" href="#get-your-linux-system-ready" title="Permalink to this headline"></a></h2>
<p>First you need to get your Linux system ready.
The following documentation refers to Ubuntu 20.04,
but the steps for other Ubuntu versions are similar.</p>
<ol class="arabic">
<li><p>Add a new user. Throughout our documentation, this user is called <cite>sysop</cite>.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo adduser sysop
$ sudo addgroup admin
$ sudo usermod -a -G admin,adm,audio sysop
</pre></div>
</div>
</li>
<li><p>Check the size and the architecture. This is espcially required when installing
<a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">pre-compiled packages</span></a>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ df -h
$ cat /etc/issue
$ uname -m
</pre></div>
</div>
<p>Compare the available disk space with the requirements given in
the <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> section.
If uname shows i686, you have a 32-bit system;
if you see x86_64, you have 64-bit.</p>
</li>
</ol>
</div>
<div class="section" id="install-from-source-code">
<span id="tutorials-postinstall-compile"></span><h2>Install from source code<a class="headerlink" href="#install-from-source-code" title="Permalink to this headline"></a></h2>
<p>To compile SeisComP from the source code follow the
<a class="reference internal" href="../build.html#build"><span class="std std-ref">instructions in the development section</span></a>. You may later download and add
maps as described below in the <a class="reference internal" href="#tutorials-postinstall-package"><span class="std std-ref">package section</span></a>.</p>
</div>
<div class="section" id="install-pre-compiled-release-packages">
<span id="tutorials-postinstall-package"></span><h2>Install pre-compiled release packages<a class="headerlink" href="#install-pre-compiled-release-packages" title="Permalink to this headline"></a></h2>
<p>You may download and installed pre-compile SeisComP binary package, maps and documentation.</p>
<ol class="arabic">
<li><p>Download the appropriate <cite>SeisComP</cite> binary package taking into
account your Linux distribution and the architecture.
Get the package from the download site of <cite>SeisComP</cite> <span id="id1">[<a class="reference internal" href="../references.html#id243" title="Helmholtz-Centre Potsdam - GFZ German Research Centre for Geosciences and gempa GmbH. The SeisComP seismological software package. GFZ Data Services. 2008. URL: https://www.seiscomp.de, doi:10.5880/GFZ.2.4.2020.003.">61</a>]</span> or from
<span id="id2"><em>Public download site of gempa</em> [<a class="reference internal" href="../references.html#id115" title="Public download site of gempa. URL: https://data.gempa.de/packages/Public/seiscomp/.">19</a>]</span>. Packages are available for Ubuntu and other Linux
flavors such as RHEL/CentOS and Debian.</p></li>
<li><p>When downloading the <cite>SeisComP</cite> binary packages you should also download</p>
<ul>
<li><p>maps for <cite>SeisComP</cite></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>wget <span class="s2">&quot;https://www.seiscomp.de/downloader/seiscomp-maps.tar.gz&quot;</span>
</pre></div>
</div>
</li>
<li><p>the documentation package. Make sure, the documentation matches your
SeisComP version.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>The <cite>SeisComP</cite> packages received from gempa GmbH contain the documentation
for the respective version and no separate download is required.</p>
</div>
</li>
</ul>
</li>
<li><p>Untar the <code class="file docutils literal notranslate"><span class="pre">seiscomp*</span></code> files (binary package, maps and documentation)
you will find in your home or downloads directory. For SeisComP in version
4.0.0 this is:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">cd</span>
$ tar xzf seiscomp-4.0.0-ubuntu20.04-x86_64.tar.gz
$ tar xzf seiscomp-maps.tar.gz
$ tar xzf seiscomp-4.0.0-doc.tar.gz
$ ls seiscomp
bin etc include lib man sbin share
</pre></div>
</div>
</li>
<li><p>Install all dependencies needed and prepare the environment.</p>
<ul>
<li><p>This should be automatic for most distributions.
Simply run the install script</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ ~/seiscomp/bin/seiscomp install-deps base
Distribution: Ubuntu <span class="m">20</span>.04
</pre></div>
</div>
<p>This will generally prompt for your users password to allow <cite>sudo</cite> to
install packages on your system.</p>
</li>
<li><p>On Ubuntu 18, Python 3 is installed, but not Python.
Get it first</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt-get install python libqtgui4
</pre></div>
</div>
</li>
<li><p>On Ubuntu 20 and newer, you may need libpython3-dev before you can use
“install-deps”</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo apt-get install libpython3-dev
</pre></div>
</div>
</li>
<li><p>Alternatively, for Mint 18 (Ubuntu 16.04):</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ sudo apt-get update
$ 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 libpq5 libpython2.7 python-numpy mysql-server
mysql-client libqtgui4 libqt4-xml libqt4-opengl libqt4-sql-sqlite
</pre></div>
</div>
</li>
</ul>
</li>
<li><p>Database. For a MariaDB installation:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp install-deps mariadb-server
</pre></div>
</div>
<p>or a MySQL installation:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp install-deps mysql-server
</pre></div>
</div>
<p>Also, for better performance with a MariaDB/MySQL database,
adjust the memory pool size and the restart MariaDB/MySQL server, as described
in the <a class="reference internal" href="../installation.html#database-configuration"><span class="std std-ref">Database Server Configuration</span></a> section.</p>
<p>For PostgreSQL, also see the detailed <a class="reference internal" href="../installation.html#installation"><span class="std std-ref">SeisComP Installation</span></a> instructions.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>For Ubuntu 18.04 and newer, take care with MariaDB/MySQL installation.
Before the next step, you must set a root password <em>for MariaDB/MySQL</em>
(not the Linux root password!).</p>
<p>MariaDB:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo mysql -e <span class="s2">&quot;SET old_passwords=0; ALTER USER root@localhost IDENTIFIED BY &#39;MyNewPassword&#39;; FLUSH PRIVILEGES;&quot;</span>
</pre></div>
</div>
<p>MySQL:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sudo mysql -e <span class="s2">&quot;ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY &#39;MyNewPassword&#39;; FLUSH PRIVILEGES;&quot;</span>
</pre></div>
</div>
<p>Substitute <em>MyNewPassword</em> by your own password and remember it
you will need it in the next step.
In case of problems, search the Internet, or the
<a class="reference external" href="https://forum.seiscomp.de/t/upgraded-to-ubuntu-18-04-and-i-broke-my-seiscomp3/1139">SeisComP forum thread</a>
(for logged-in forum members).</p>
</div>
</li>
</ol>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
<p>Find a detailed description in section <a class="reference internal" href="../getting-started.html#getting-started"><span class="std std-ref">Getting Started with SeisComP</span></a> and short guide below.</p>
<ol class="arabic">
<li><p>You may set some system environment variables.
For bash users, print the environment variables and copy them to your
<code class="file docutils literal notranslate"><span class="pre">.bashrc</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ ~/seiscomp/bin/seiscomp print env
<span class="nb">export</span> <span class="nv">SEISCOMP_ROOT</span><span class="o">=</span>/home/sysop/seiscomp
<span class="nb">export</span> <span class="nv">PATH</span><span class="o">=</span>/home/sysop/seiscomp/bin:<span class="nv">$PATH</span>
<span class="nb">export</span> <span class="nv">LD_LIBRARY_PATH</span><span class="o">=</span>/home/sysop/seiscomp/lib:<span class="nv">$LD_LIBRARY_PATH</span>
<span class="nb">export</span> <span class="nv">PYTHONPATH</span><span class="o">=</span>/home/sysop/seiscomp/lib/python:<span class="nv">$PYTHONPATH</span>
<span class="nb">export</span> <span class="nv">MANPATH</span><span class="o">=</span>/home/sysop/seiscomp/share/man:<span class="nv">$MANPATH</span>
<span class="nb">export</span> <span class="nv">LC_ALL</span><span class="o">=</span>C
<span class="nb">source</span> /home/sysop/seiscomp/share/shell-completion/seiscomp.bash
</pre></div>
</div>
<p>The path to your home directory will likely differ from <cite>/home/sysop</cite> as shown above.
Therefore, do not copy and paste what you see here but use for your own
system the output from the command</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>~/seiscomp/bin/seiscomp print env
</pre></div>
</div>
<p>Add the output from the command to your file <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ vi ~/.bashrc
</pre></div>
</div>
<p>Then reload the content of <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code> in your current environment</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ <span class="nb">source</span> ~/.bashrc
</pre></div>
</div>
<p>After this, you wont have to type <cite>~/seiscomp/bin/seiscomp</cite> as
the <span class="xref std std-ref">seiscomp</span> command will be added to your shells path.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>If, when you attempt to run a SeisComP command such as <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> or
<a class="reference internal" href="../../apps/scolv.html#scolv"><span class="std std-ref">scolv</span></a>, you receive an error message like</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>scconfig: <span class="nb">command</span> not found
</pre></div>
</div>
<p>then the most likely explanation is that you have not set your SeisComP
environment variables correctly.</p>
<p>Run the <cite>seiscomp</cite> command with the full path to
where you installed.
The seven lines of output 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 <code class="file docutils literal notranslate"><span class="pre">~/.bashrc</span></code>, <code class="file docutils literal notranslate"><span class="pre">~/.profile</span></code>,
or equivalent file with commands to be run every time you log in.</p>
</div>
</li>
<li><p>Run <cite>seiscomp setup</cite> and enter your preferred IDs and password. For the other
fields, you can always accept the default values.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp setup
</pre></div>
</div>
<p>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.</p>
</li>
<li><p>The <cite>seiscomp</cite> command is a wrapper, which controls the SeisComP modules.
See <a class="reference internal" href="../management.html#system-management"><span class="std std-ref">System management</span></a>.
Run something by typing seiscomp followed by a command</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span> $ seiscomp <span class="nb">help</span>
Available commands:
install-deps
setup
shell
<span class="nb">enable</span>
disable
print
<span class="nb">help</span>
Use <span class="s1">&#39;help [command]&#39;</span> to get more <span class="nb">help</span> about a <span class="nb">command</span>
</pre></div>
</div>
</li>
<li><p>Start <a class="reference internal" href="../../apps/scmaster.html#scmaster"><span class="std std-ref">scmaster</span></a>.
As described in the <a class="reference internal" href="../overview.html#overview"><span class="std std-ref">Overview</span></a>, these are needed for
communication between the SeisComP database and the individual
SeisComP modules.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp start scmaster
starting scmaster
</pre></div>
</div>
</li>
<li><p>Install all dependencies needed for the GUI</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp install-deps gui
</pre></div>
</div>
</li>
<li><p>Start the <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> GUI</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp <span class="nb">exec</span> scconfig
</pre></div>
</div>
<p>Learn more about <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> in this documentation.
You should see a screen/window like this.</p>
<div class="figure align-center" id="id3">
<a class="reference internal image-reference" href="../../_images/postinstall_scconfig.png"><img alt="../../_images/postinstall_scconfig.png" src="../../_images/postinstall_scconfig.png" style="width: 16cm;" /></a>
<p class="caption"><span class="caption-text">First view of <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> configurator.</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</div>
</li>
<li><p>Run <a class="reference internal" href="../../apps/scrttv.html#scrttv"><span class="std std-ref">scrttv</span></a></p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ seiscomp <span class="nb">exec</span> scrttv
</pre></div>
</div>
<p>After seeing the SeisComP splash screen,
youll likely get an error message “Could not read inventory (NULL)”.
After a new installation, thats okay.
Click that box away, and youll see a screen with
“Enabled”, and “Disabled” tabs, and time along bottom axis as in the figure below.
To see stations and data you will later need to
<a class="reference internal" href="addstation.html#tutorials-addstation"><span class="std std-ref">add inventory</span></a> and
<a class="reference internal" href="geofon_waveforms.html#tutorials-geofon-waveforms"><span class="std std-ref">waveforms</span></a> to your system.</p>
<div class="figure align-center" id="id4">
<a class="reference internal image-reference" href="../../_images/postinstall_scrttv.png"><img alt="../../_images/postinstall_scrttv.png" src="../../_images/postinstall_scrttv.png" style="width: 14.6cm;" /></a>
<p class="caption"><span class="caption-text">First view of the <a class="reference internal" href="../../apps/scconfig.html#scconfig"><span class="std std-ref">scconfig</span></a> configuration tool.</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</div>
</li>
</ol>
<p>Congratulations, youre done with this tutorial.</p>
</div>
</div>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Installation on Ubuntu</a><ul>
<li><a class="reference internal" href="#get-your-linux-system-ready">Get your Linux System ready</a></li>
<li><a class="reference internal" href="#install-from-source-code">Install from source code</a></li>
<li><a class="reference internal" href="#install-pre-compiled-release-packages">Install pre-compiled release packages</a></li>
<li><a class="reference internal" href="#configuration">Configuration</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../tutorials.html"
title="previous chapter">Tutorials</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="upgrading.html"
title="next chapter">Upgrading SeisComP</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/base/tutorials/postinstall.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>5.3.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>