Page 1 of 1

CheckMK RAW (CE) mit Nginx und Let's Encrypt unter Debian Buster

Posted: Fri 29. Jan 2021, 09:46
by h3rb3rn
Fassung vom 28.01.2021

Anleitung für Debian 10 (Buster)

Download Link https://checkmk.com/download?edition=cr ... &os=buster

Alle Schritte als root ausführen!

Code: Select all

su -

Code: Select all

cd /tmp; 
wget https://download.checkmk.com/checkmk/1.6.0p20/check-mk-raw-1.6.0p20_0.buster_amd64.deb; 
apt install /tmp/check-mk-raw-1.6.0p20_0.buster_amd64.deb

Code: Select all

sed -i 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf;
sed -i 's/Listen 443/Listen 8443/g' /etc/apache2/ports.conf;
systemctl restart apache2.service;
System rebooten

Nginx installieren und konfigurieren

Code: Select all

apt install nginx openssl apache2-utils nginx software-properties-common certbot python-certbot-nginx
Inhalt der Datei /etc/nginx/sites-available/monitoring.conf

Code: Select all

server {
  server_name monitoring.4noobs.de;

  listen 80;

  client_max_body_size 50m;

  location / {
  #  auth_basic "Restricted Content";
  #  auth_basic_user_file /etc/nginx/.htpasswd;
    proxy_pass http://127.0.0.1:5000;
  }
}
Symlink für aktivierung der Site

Code: Select all

ln -s /etc/nginx/sites-available/monitoring.conf /etc/nginx/sites-enabled/;
systemctl restart nginx.service

Code: Select all

certbot
Check_MK konfigurieren

Quelle: https://checkmk.de/cms_introduction_packages.html

Code: Select all

omd create ###mysite###
zum Beispiel

Code: Select all

omd create checkmk
Ausgabe

Code: Select all

Adding /opt/omd/sites/###mysite###/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/mysite/tmp...OK
Restarting Apache...OK
Created new site slave1 with version ...

  The site can be started with omd start mysite.
  The default web UI is available at http://###sub.domain.tld###/###mysite###/
  The admin user for the web applications is cmkadmin with password ###password###
  (It can be changed with 'htpasswd -m ~/etc/htpasswd cmkadmin' as site user.)
  Please do a su - mysite for administration of this site.
Seite aktivieren

Code: Select all

omd start ###mysite###
zum Beispiel

Code: Select all

omd start checkmk

Ab hier ist der Check_MK Server lauffähig, jedoch nicht sicher für die Nutzung über das Internet!