diff --git a/content/content/HowTos/ca-certificate-in-debian.md b/content/content/HowTos/ca-certificate-in-debian.md new file mode 100644 index 0000000..0aaa85d --- /dev/null +++ b/content/content/HowTos/ca-certificate-in-debian.md @@ -0,0 +1,5 @@ +# How to add a CA certificate in Debian +Copy CA file with extension `crt` into `/usr/local/share/ca-certificates/`. + +Call `update-ca-certificates` as root. + diff --git a/content/content/HowTos/colors-in-minicom.md b/content/content/HowTos/colors-in-minicom.md new file mode 100644 index 0000000..6368c4f --- /dev/null +++ b/content/content/HowTos/colors-in-minicom.md @@ -0,0 +1,32 @@ +# Colors in Minicom + +To start `minicom` in color mode use + +``` +minicom -c on +``` + +Switch terminal emulation to ANSI. + +Use escape sequences to actually change the color of text as described for instance here + +https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html. + +The base sequence is `\1b[Xm` where X is a number as described below. + +To get the colors in bright style, use the sequence `\x1b[X;1m`. + +Number | Color +----|---- +0 | reset +1 | highlight +7 | inverse +30 | black +31 | red +32 | green +33 | yellow +34 | blue +35 | magenta +36 | cyan +37 | white + diff --git a/content/content/HowTos/iscsi-on-linux.md b/content/content/HowTos/iscsi-on-linux.md new file mode 100644 index 0000000..dd40cd0 --- /dev/null +++ b/content/content/HowTos/iscsi-on-linux.md @@ -0,0 +1,61 @@ +# iSCSI on Linux + +## Preparation +Install `open-iscsi`, at least on Debian systems. + + +## Use an iSCSI target from Linux + +In our setup a Synology NAS at 172.16.200.19 provides the targets. + +First, run +``` + iscsiadm -m discovery -t sendtargets -p 172.16.200.19 +``` +to discover all provided targets. + +You get something like this +``` + 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-GitLab.db1c0541e7 + [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-GitLab.db1c0541e7 + 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Bitwarden.db1c0541e7 + [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Bitwarden.db1c0541e7 + 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Nextcloud.db1c0541e7 + [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Nextcloud.db1c0541e7 + 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-MariaDB.db1c0541e7 + [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-MariaDB.db1c0541e7 + 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Backup.db1c0541e7 + [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Backup.db1c0541e7 +``` + +Now, connect to the target using +``` + iscsiadm -m node --targetname "iqn.2000-01.com.synology:nas.Target-Backup.db1c0541e7" \ + --portal 172.16.200.19 --login +``` + +A new SCSI device will be created. Check the name of the device using ''dmesg''. You see something like this +``` + [16924536.979916] scsi host13: iSCSI Initiator over TCP/IP + [16924537.010635] scsi 13:0:0:1: Direct-Access SYNOLOGY iSCSI Storage 4.0 PQ: 0 ANSI: 5 + [16924537.011449] sd 13:0:0:1: Attached scsi generic sg10 type 0 + [16924537.012597] sd 13:0:0:1: [sdj] 209715200 512-byte logical blocks: (107 GB/100 GiB) + [16924537.012827] sd 13:0:0:1: [sdj] Write Protect is off + [16924537.012828] sd 13:0:0:1: [sdj] Mode Sense: 43 00 10 08 + [16924537.013111] sd 13:0:0:1: [sdj] Write cache: enabled, read cache: enabled, supports DPO and FUA + [16924537.013361] sd 13:0:0:1: [sdj] Optimal transfer size 16384 logical blocks > dev_max (8192 logical blocks) + [16924537.018630] sd 13:0:0:1: [sdj] Attached SCSI disk +``` + +Now use `fdisk`, `mkfs` and if you like `blkid` on the new device and put it into the `/etc/fstab`. + + +===== Authenticated target ===== + +``` + iscsiadm --mode node --targetname "iqn.2007-01.org.debian.foobar:CDs" -p 192.168.0.1:3260 --op=update --name node.session.auth.authmethod --value=CHAP + iscsiadm --mode node --targetname "iqn.2007-01.org.debian.foobar:CDs" -p 192.168.0.1:3260 --op=update --name node.session.auth.username --value=$Id + iscsiadm --mode node --targetname "iqn.2007-01.org.debian.foobar:CDs" -p 192.168.0.1:3260 --op=update --name node.session.auth.password --value=$MDP + iscsiadm --mode node --targetname "iqn.2007-01.org.debian.foobar:CDs" -p 192.168.0.1:3260 --login +``` + diff --git a/content/content/HowTos/occ-in-nextcloud-pod.md b/content/content/HowTos/occ-in-nextcloud-pod.md new file mode 100644 index 0000000..32dfbc3 --- /dev/null +++ b/content/content/HowTos/occ-in-nextcloud-pod.md @@ -0,0 +1,17 @@ +# Execute occ in Nextcloud pod + + +First, look up the name of the pod using +``` +kubectl get pods -n nextcloud +``` + +Then, get into the pod using +``` +kubectl exec --stdin --tty NAME_OF_THE_POD -c nextcloud -n nextcloud -- sh +``` + +Finally, within the pod +``` +su -s /bin/sh www-data -c "php occ --help" +```