159 lines
8.0 KiB
HTML
159 lines
8.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>CCEngineServer User guide</title>
|
|
<style>
|
|
</style>
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
|
<style>
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.6;
|
|
}
|
|
</style>
|
|
<style>
|
|
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
|
|
</style>
|
|
|
|
|
|
|
|
</head>
|
|
<body class="vscode-body vscode-light">
|
|
<ul>
|
|
<li><a href="#ccengineserver-user-guide">CCEngineServer User guide</a>
|
|
<ul>
|
|
<li><a href="#installation">Installation</a>
|
|
<ul>
|
|
<li><a href="#extract-the-application">Extract the application</a></li>
|
|
<li><a href="#extract-application-data-into-data-folder">Extract application data into data folder</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#activation">Activation</a>
|
|
<ul>
|
|
<li><a href="#option-a-online-activation">Option A: Online activation</a></li>
|
|
<li><a href="#option-b-offline-activation">Option B: Offline activation</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#running">Running</a>
|
|
<ul>
|
|
<li><a href="#optional-create-a-non-root-user">Optional: Create a non-root user</a></li>
|
|
<li><a href="#run">Run</a></li>
|
|
<li><a href="#test-connection-with-browser">Test connection with browser</a></li>
|
|
</ul>
|
|
</li>
|
|
<li><a href="#starting-the-application-as-systemd-service">Starting the application as systemd service</a>
|
|
<ul>
|
|
<li><a href="#create-new-service-unit">Create new service unit</a></li>
|
|
<li><a href="#start-the-ccengineserver-service">Start the CCEngineServer service</a></li>
|
|
<li><a href="#enable-automatic-startup">Enable automatic startup</a></li>
|
|
<li><a href="#optional-stopping-application">Optional: Stopping application</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<h1 id="ccengineserver-user-guide">CCEngineServer User guide</h1>
|
|
<h2 id="installation">Installation</h2>
|
|
<h3 id="extract-the-application">Extract the application</h3>
|
|
<p>Extract the application into /opt folder</p>
|
|
<pre><code class="language-bash"><div>mkdir /opt/CCEngineServer
|
|
tar -xvzf CCEngineServer-<VER>.tar.gz --directory /opt/CCEngineServer/
|
|
</div></code></pre>
|
|
<h3 id="extract-application-data-into-data-folder">Extract application data into data folder</h3>
|
|
<pre><code class="language-bash"><div>unzip data-<VER>.zip -d /opt/CCEngineServer/data
|
|
</div></code></pre>
|
|
<h2 id="activation">Activation</h2>
|
|
<p>There are two ways to activate the application. One is online activation if you have a license key and your target system
|
|
can access internet. The second options is for closed environments where internet access is not possible.</p>
|
|
<h3 id="option-a-online-activation">Option A: Online activation</h3>
|
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
|
sudo ./bin/CCEngineServer --activate_online
|
|
</div></code></pre>
|
|
<p>When prompted, please enter provided license key and press enter.</p>
|
|
<blockquote>
|
|
<p>Note: In case of connection problems please check if your <code>/etc/ssl/certs/ca-certificates.crt</code> exists.
|
|
On some systems the ca-certificates bundle is not in the expected location. You can fix that by creating symbolic link
|
|
to the right location.
|
|
Example on fedora:</p>
|
|
<pre><code class="language-bash"><div>sudo ln -s /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
|
|
</div></code></pre>
|
|
</blockquote>
|
|
<h3 id="option-b-offline-activation">Option B: Offline activation</h3>
|
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
|
sudo ./bin/CCEngineServer --activate_offline
|
|
</div></code></pre>
|
|
<p>Copy the generated request as in below example and send by email to customer support of Catalogue of Currencies</p>
|
|
<pre><code class="language-mail"><code><div>Subject: CCEngineServer activation request
|
|
|
|
-----BEGIN ACTIVATION REQUEST-----
|
|
ABCabc....
|
|
...
|
|
xyzXYZ==
|
|
-----END ACTIVATION REQUEST-----
|
|
</div></code></code></pre>
|
|
<blockquote>
|
|
<p>Note: Please note that the activation request contains hardware fingerprints from the target device</p>
|
|
</blockquote>
|
|
<p>The support will email you back <code>license.dat</code> file which should be copied to application installation directory
|
|
(i.e. its location should be <code>/opt/CCEngineServer/license.dat</code>).</p>
|
|
<h2 id="running">Running</h2>
|
|
<h3 id="optional-create-a-non-root-user">Optional: Create a non-root user</h3>
|
|
<p>Although the application needs to be started as root, it can swith to non-root user just after successfull startup.
|
|
You can use the commands below to create a new user.</p>
|
|
<pre><code class="language-bash"><div>sudo useradd -M ccengine
|
|
sudo usermod -L ccengine
|
|
</div></code></pre>
|
|
<p>Find the assigned uid and gid to the created user:</p>
|
|
<pre><code><code><div>id ccengine
|
|
> uid=1001(ccengine) gid=1001(ccengine) groups=1001(ccengine)
|
|
</div></code></code></pre>
|
|
<h3 id="run">Run</h3>
|
|
<p>If the application is successfully activate it can be started by following commands. Please note that <code>--set_uid 1001</code>
|
|
and <code>--set_gid 1001</code> are optional so these parameters can be either removed and in such case the application will be
|
|
running as <code>root</code>, or the numbers should be replaced by the uid and gid of the non-root user created in previous steps.</p>
|
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
|
sudo /opt/CCEngineServer/bin/CCEngineServer --data_root ./data --set_uid 1001 --set_gid 1001
|
|
</div></code></pre>
|
|
<blockquote>
|
|
<p>Note: The application by default bind all network interfaces and listens on port 8080. If a different port is needed
|
|
please refer to <code>CCEngineServer --help</code> to see how defaults can be changed.</p>
|
|
</blockquote>
|
|
<h3 id="test-connection-with-browser">Test connection with browser</h3>
|
|
<p>Open web browser and enter following into the addres bar <code>http://<server_address>:8080/</code>.</p>
|
|
<h2 id="starting-the-application-as-systemd-service">Starting the application as systemd service</h2>
|
|
<h3 id="create-new-service-unit">Create new service unit</h3>
|
|
<p>Example service unit file can look like this. Please note that uid 1001 and gid 1001 should be changed to your own prefered
|
|
user</p>
|
|
<pre><code class="language-ini"><div><span class="hljs-comment"># /etc/systemd/system/ccengineserver.service</span>
|
|
<span class="hljs-section">[Unit]</span>
|
|
<span class="hljs-attr">Description</span>=CCEngineServer data server for Catalogue of Currencies
|
|
|
|
<span class="hljs-section">[Service]</span>
|
|
<span class="hljs-attr">WorkingDirectory</span>=/opt/CCEngineServer
|
|
<span class="hljs-attr">User</span>=root
|
|
<span class="hljs-attr">ExecStart</span>=/opt/CCEngineServer/bin/CCEngineServer --data_root ./data --log_folder ./log --set_uid <span class="hljs-number">1001</span> --set_gid <span class="hljs-number">1001</span>
|
|
|
|
<span class="hljs-section">[Install]</span>
|
|
<span class="hljs-attr">WantedBy</span>=multi-user.target
|
|
</div></code></pre>
|
|
<blockquote>
|
|
<p>Note: Please note that in case of using SELinux, the following security context need to be set to the binary executable:
|
|
<code>sudo chcon -R -t bin_t /opt/CCEngineServer/bin/</code>.
|
|
The selinux status can be checked by <code>getenforce</code>, <code>sestatus</code> commands</p>
|
|
</blockquote>
|
|
<h3 id="start-the-ccengineserver-service">Start the CCEngineServer service</h3>
|
|
<pre><code class="language-bash"><div>sudo systemctl start ccengineserver
|
|
</div></code></pre>
|
|
<h3 id="enable-automatic-startup">Enable automatic startup</h3>
|
|
<pre><code class="language-bash"><div>sudo systemctl <span class="hljs-built_in">enable</span> ccengineserver
|
|
</div></code></pre>
|
|
<h3 id="optional-stopping-application">Optional: Stopping application</h3>
|
|
<pre><code class="language-bash"><div>sudo systemctl stop ccengineserver
|
|
</div></code></pre>
|
|
|
|
</body>
|
|
</html> |