mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-04-05 05:08:54 +00:00
Better install instructions
Avoid polluting the system Python installation
This commit is contained in:
@@ -607,15 +607,25 @@ On CentOS or RHEL systems, run:
|
||||
Python 3 installers for Windows and macOS can be found at
|
||||
https://www.python.org/downloads/
|
||||
|
||||
|
||||
Create a system user
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -H pip3 install -U parsedmarc
|
||||
sudo mkdir -f /opt
|
||||
sudo useradd parsedmarc -r -s /bin/false -b /opt
|
||||
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -u parsedmarc -H pip3 install --user -U pip
|
||||
sudo -u parsedmarc -H pip3 install --user -U parsedmarc
|
||||
|
||||
Or, install the latest development release directly from GitHub:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo -H pip3 install -U git+https://github.com/domainaware/parsedmarc.git
|
||||
sudo -u parsedmarc -H pip3 install --user -U git+https://github.com/domainaware/parsedmarc.git
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -1153,13 +1163,6 @@ Running parsedmarc as a systemd service
|
||||
Use systemd to run ``parsedmarc`` as a service and process reports as they
|
||||
arrive.
|
||||
|
||||
|
||||
Create a system user
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo useradd parsedmarc -r -s /bin/false
|
||||
|
||||
Protect the ``parsedmarc`` configuration file from prying eyes
|
||||
|
||||
.. code-block:: bash
|
||||
@@ -1182,7 +1185,7 @@ Create the service configuration file
|
||||
After=network.target network-online.target elasticsearch.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/parsedmarc -c /etc/parsedmarc.ini
|
||||
ExecStart=/opt/parsedmarc/.local/bin/parsedmarc -c /etc/parsedmarc.ini
|
||||
User=parsedmarc
|
||||
Group=parsedmarc
|
||||
Restart=always
|
||||
|
||||
16
index.html
16
index.html
@@ -716,11 +716,17 @@ sudo easy_install-3.4 pip
|
||||
</div>
|
||||
<p>Python 3 installers for Windows and macOS can be found at
|
||||
<a class="reference external" href="https://www.python.org/downloads/">https://www.python.org/downloads/</a></p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H pip3 install -U parsedmarc
|
||||
<p>Create a system user</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo mkdir -f /opt
|
||||
sudo useradd parsedmarc -r -s /bin/false -b /opt
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -u parsedmarc -H pip3 install --user -U pip
|
||||
sudo -u parsedmarc -H pip3 install --user -U parsedmarc
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Or, install the latest development release directly from GitHub:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -H pip3 install -U git+https://github.com/domainaware/parsedmarc.git
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo -u parsedmarc -H pip3 install --user -U git+https://github.com/domainaware/parsedmarc.git
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="admonition note">
|
||||
@@ -1149,10 +1155,6 @@ flexible filtering options.</p>
|
||||
<h3>Running parsedmarc as a systemd service<a class="headerlink" href="#running-parsedmarc-as-a-systemd-service" title="Permalink to this headline"></a></h3>
|
||||
<p>Use systemd to run <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> as a service and process reports as they
|
||||
arrive.</p>
|
||||
<p>Create a system user</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo useradd parsedmarc -r -s /bin/false
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Protect the <code class="docutils literal notranslate"><span class="pre">parsedmarc</span></code> configuration file from prying eyes</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sudo chown root:parsedmarc /etc/parsedmarc.ini
|
||||
sudo chmod <span class="nv">u</span><span class="o">=</span>rw,g<span class="o">=</span>r,o<span class="o">=</span> /etc/parsedmarc.ini
|
||||
@@ -1169,7 +1171,7 @@ sudo chmod <span class="nv">u</span><span class="o">=</span>rw,g<span class="o">
|
||||
<span class="na">After</span><span class="o">=</span><span class="s">network.target network-online.target elasticsearch.service</span><span class="w"></span>
|
||||
|
||||
<span class="k">[Service]</span><span class="w"></span>
|
||||
<span class="na">ExecStart</span><span class="o">=</span><span class="s">/usr/local/bin/parsedmarc -c /etc/parsedmarc.ini</span><span class="w"></span>
|
||||
<span class="na">ExecStart</span><span class="o">=</span><span class="s">/opt/parsedmarc/.local/bin/parsedmarc -c /etc/parsedmarc.ini</span><span class="w"></span>
|
||||
<span class="na">User</span><span class="o">=</span><span class="s">parsedmarc</span><span class="w"></span>
|
||||
<span class="na">Group</span><span class="o">=</span><span class="s">parsedmarc</span><span class="w"></span>
|
||||
<span class="na">Restart</span><span class="o">=</span><span class="s">always</span><span class="w"></span>
|
||||
|
||||
Reference in New Issue
Block a user