Setup Raspberry Pi¶
Attention
It is absolutely necessary to use a Raspberry Pi 2 or a Raspberry Pi 3 [1] ! Older models have another CPU that to weak to run OMD!
Hint
This guide assumes that the following steps are performed on a computer running Linux as the operating system.
Download the linuxmuster-monipi-image¶
Download the prepared Raspbian-Image. Unpack it with the following command
$ gunzip monipi_<version>.img.gz
Write Image to an SD card¶
The SD card must have a minimum size of 4GB.
Insert the SD card into a suitable reader.
Open a root shell.
Enter the command
$ fdisk -l
and refer to the output of the command for the devicename of the SD card. In the example below the device name
/dev/mmcblk0
contains the additional characters (p1
, …) for the partitions of the SD card.Disk /dev/mmcblk0: 32.0 GB, 32010928128 bytes 4 Köpfe, 16 Sektoren/Spur, 976896 Zylinder, zusammen 62521344 Sektoren Einheiten = Sektoren von 1 × 512 = 512 Bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Festplattenidentifikation: 0xb3c5e39a Gerät boot. Anfang Ende Blöcke Id System /dev/mmcblk0p1 2048 62521343 31259648 83 Linux
The image file already contains the necessary partitions and the partition table and must therefore be written directly to the device file and not to a partition already existing on the card.
The following command does this, the device name of the SD card may have to be adjusted:
$ dd bs=4M if=monipi.img of=/dev/mmcblk0
After completing the process, insert the SD card into the Raspberry Pi and start it.
First Setup of Raspberry Pi¶
Hint
The following steps must be performed at the Raspberry Pi command line.
Default access data: Overview¶
In the delivery state, the MoniPi system has the following access data:
User name | password | Remarks |
---|---|---|
pi | muster | Administrative user for the console. Can login via ssh, root shell with |
omdadmin | omd | Administrative user for the CheckMK Web Interface Accessible under |
Turnkey¶
To personalize the Raspbian image, run monipi-turnkey
as root. This creates new SSH host keys and a new “Snake-Oil” SSL certificate, as well as a new password for the administrative user pi
.
Log on to Raspberry. The username in the delivery state is
pi
, the passwordmuster
Become root by typing the command
sudo -i
Run
monipi-turnkey
and follow the instructions. Enter a good password for the administrative user twice when prompted.pi@raspberrypi:~ $ sudo -i root@raspberrypi:~# monipi-turnkey Generiere neue SSH Host-Keys... Creating SSH2 RSA key; this may take some time ... 2048 4d:f7:1c:98:78:9b:05:0c:95:dd:b4:e4:c1:33:4f:62 /etc/ssh/ssh_host_rsa_key.pub (RSA) Creating SSH2 DSA key; this may take some time ... 1024 a6:05:41:0e:02:7d:99:6f:58:0c:0a:ea:ce:54:e7:b9 /etc/ssh/ssh_host_dsa_key.pub (DSA) Creating SSH2 ECDSA key; this may take some time ... 256 55:e6:b6:79:ca:47:59:4a:54:3c:1b:ee:2b:5e:0f:0a /etc/ssh/ssh_host_ecdsa_key.pub (ECDSA) Creating SSH2 ED25519 key; this may take some time ... 256 28:95:7a:3d:81:38:6a:c6:6a:c7:09:58:8c:d8:e5:e6 /etc/ssh/ssh_host_ed25519_key.pub (ED25519) Geben Sie ein neues Passwort für den administrativen Benutzer (pi) ein Geben Sie ein neues UNIX-Passwort ein: Geben Sie das neue UNIX-Passwort erneut ein: passwd: Passwort erfolgreich geändert root@raspberrypi:~#
Raspi-Config¶
Usually the SD cards available today are larger than 4GB, it is recommended to increase the system partition of the MoniPi according to the SD card.
To do this, start the command raspi-config
on the command line as root. Then select the first entry, exit raspi-config with “Finish” and restart the Raspberry Pi, if this is suggested.
After rebooting, the system partition should include the total SD card size minus the space for the boot partition. In the example below with a 32GB card the output of df -h
looks as follows:
pi@raspberrypi:~ $ df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/root 30G 1,7G 27G 6% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 6,3M 457M 2% /run
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
/dev/mmcblk0p1 60M 20M 41M 34% /boot
tmpfs 463M 88K 463M 1% /opt/omd/sites/default/tmp
footnote
[1] | When using a Raspberry Pi 3 care must be taken that at least the 1.1 version of the MoniPi image is used for installation. |