diff --git a/auto-complete.sh b/auto-complete.sh index 356c87c..ec97875 100755 --- a/auto-complete.sh +++ b/auto-complete.sh @@ -4,7 +4,7 @@ function libs() { if [ "$1" != "" ]; then - COMPREPLY=($(compgen -W "all network-scanning network-adhoc raspi-docker tech-list faq sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}")) + COMPREPLY=($(compgen -W "all xelatex-thesis network-scanning network-adhoc raspi-docker tech-list faq sensor-node ssh-tunneling iptables poc-datacollector help" "${COMP_WORDS[$COMP_CWORD]}")) fi } diff --git a/build.sh b/build.sh index efc6e00..bf5d1e9 100755 --- a/build.sh +++ b/build.sh @@ -49,6 +49,8 @@ usage () echo "" echo -e " ${txtg}tech-list:${NOCOLOR} This tutorial provides a list of commonly used tools " echo "" + echo -e " ${txtg}xelatex-thesis:${NOCOLOR} This tutorial demonstrates, howto setup xelatex & howto use it " + echo "" echo -e " ${txtg}help:${NOCOLOR} show this message" echo " ./build.sh help" echo "" @@ -112,6 +114,13 @@ do COMMAND_CREATE=1 ;; + xelatex-thesis) + DESC="xelatex-thesis" ; + build="build.sh" ; + docdir="xelatex-thesis" ; + COMMAND_CREATE=1 + ;; + faq) DESC="faq" ; build="build.sh" ; diff --git a/site.yml b/site.yml index 1c9902f..32808a7 100644 --- a/site.yml +++ b/site.yml @@ -42,6 +42,9 @@ content: branches: master start_path: tech-list + - url: https://git.swarmlab.io:3000/docs/Documentation.git + branches: master + start_path: xelatex-thesis ui: bundle: url: https://git.swarmlab.io:3000/docs/docs/raw/branch/master/ui-bundle.zip diff --git a/xelatex-thesis/antora.yml b/xelatex-thesis/antora.yml new file mode 100644 index 0000000..7ba8d60 --- /dev/null +++ b/xelatex-thesis/antora.yml @@ -0,0 +1,5 @@ + name: swarmlab_xelatex-thesis + title: swarmlab_xelatex-thesis + version: docs + nav: + - modules/ROOT/nav.adoc diff --git a/xelatex-thesis/modules/ROOT/images/adhoc.png b/xelatex-thesis/modules/ROOT/images/adhoc.png new file mode 100644 index 0000000..6256678 Binary files /dev/null and b/xelatex-thesis/modules/ROOT/images/adhoc.png differ diff --git a/xelatex-thesis/modules/ROOT/images/swarmlab.png b/xelatex-thesis/modules/ROOT/images/swarmlab.png new file mode 100644 index 0000000..d94ea42 Binary files /dev/null and b/xelatex-thesis/modules/ROOT/images/swarmlab.png differ diff --git a/xelatex-thesis/modules/ROOT/images/trafic.png b/xelatex-thesis/modules/ROOT/images/trafic.png new file mode 100644 index 0000000..d7e160a Binary files /dev/null and b/xelatex-thesis/modules/ROOT/images/trafic.png differ diff --git a/xelatex-thesis/modules/ROOT/images/vehigle.png b/xelatex-thesis/modules/ROOT/images/vehigle.png new file mode 100644 index 0000000..46d0c6b Binary files /dev/null and b/xelatex-thesis/modules/ROOT/images/vehigle.png differ diff --git a/xelatex-thesis/modules/ROOT/nav.adoc b/xelatex-thesis/modules/ROOT/nav.adoc new file mode 100644 index 0000000..2c4563a --- /dev/null +++ b/xelatex-thesis/modules/ROOT/nav.adoc @@ -0,0 +1 @@ +* xref:index.adoc[list] diff --git a/xelatex-thesis/modules/ROOT/pages/index-setup.adoc b/xelatex-thesis/modules/ROOT/pages/index-setup.adoc new file mode 100644 index 0000000..8f48287 --- /dev/null +++ b/xelatex-thesis/modules/ROOT/pages/index-setup.adoc @@ -0,0 +1,354 @@ += Setup + +TIP: Tested on a Raspberry Pi with "Buster" + +== Intro + +networkd is a small and lean service to configure network interfaces, designed mostly for server use cases in a world with hotplugged and virtualized networking. Its configuration is similar in spirit and abstraction level to ifupdown, but you don't need any extra packages to configure bridges, bonds, vlan etc. It is not very suitable for managing WLANs yet; NetworkManager is still much more appropriate for such Desktop use cases. + + There are mainly three setups to have a peer to peer network: + +* unprotected ad-hoc interface by configuring the WiFi device +* unprotected ad-hoc interface using wpa_supplicant (Recommended) +* Only with suitable (RSN-IBSS capable) USB dongle: +* protected ad-hoc interface using wpa_supplicant and WPA encryption (best solution if possible) +* ad-hoc interface with additional USB/WiFi dongle for uplink to internet router + + +== Install systemd-networkd + +=== deinstall classic networking and install it! + +* *sudo su* # if not already done + +*deinstall* +[source,sh] +---- +systemctl daemon-reload +systemctl disable --now ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog +apt --autoremove purge -f ifupdown dhcpcd dhcpcd5 isc-dhcp-client isc-dhcp-common rsyslog +rm -r /etc/network /etc/dhcp + +# setup/enable systemd-resolved and systemd-networkd + +systemctl disable --now avahi-daemon libnss-mdns +apt --autoremove -f purge avahi-daemon +apt install -f libnss-resolve +ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf +apt-mark hold avahi-daemon dhcpcd dhcpcd5 ifupdown isc-dhcp-client isc-dhcp-common libnss-mdns openresolv raspberrypi-net-mods rsyslog +systemctl enable systemd-networkd.service systemd-resolved.service +---- + + +== Install optional + +[source,sh] +---- +apt-get install raspberrypi-kernel-headers -y +---- + + + +=== setup wired connection + +*wired connection* +[source,sh] +---- +cat > /etc/systemd/network/04-wired.network < +Gateway=192.168.1.1 // <2> +DNS=8.8.8.8 1.1.1.1 // <3> +MulticastDNS=yes +EOF +---- +<1> use your settings +<2> use your settings +<2> use your settings + + +=== Reboot + +NOTE: reboot + +== Config + + +=== NSS + +*config nss* +[source,sh] +---- +apt --autoremove purge avahi-daemon +apt-mark hold avahi-daemon +apt install -f libnss-resolve + +echo "" +echo "For troubleshooting you may have a look at /etc/nsswitch.conf. It should contain a line like this:" +echo "" +echo "hosts: files resolve [!UNAVAIL=return] dns" +echo "" +echo "" +echo "" +echo "" +---- + + +=== DNS + + +*config dns* +[source,sh] +---- + +echo "" +echo "Configure DNS stub listener interface" +echo "" + +echo "Here we have to symlink /etc/resolv.conf to the stub listener:" +echo "" +echo " exec4you ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf" +ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf +echo "" + +echo "Check name resolution" + + +resolvectl status +---- + +== unprotected ad-hoc interface using wpa_supplicant + +Follow *Install systemd-networkd* + +Then come back here. + +TIP: unprotected + +* *sudo su* # if not already done + +[source,sh] +---- + +cat > /etc/wpa_supplicant/wpa_supplicant-wlan0.conf < /etc/wpa_supplicant/wpa_supplicant-wlan1.conf <