9
This commit is contained in:
parent
9e06b34699
commit
1105e64c9e
104
10.html
Normal file
104
10.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Einführung in Linux</title>
|
||||
|
||||
<meta name="description" content="YALC - Yet Another Linux Course ">
|
||||
<meta name="author" content="Daniel Schubert">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/league.css" id="theme">
|
||||
|
||||
<link rel="icon" href="img/openlogo-nd-25.png" type="img/png">
|
||||
|
||||
<!-- Theme used for syntax highlighting of code -->
|
||||
<link rel="stylesheet" href="lib/css/zenburn.css">
|
||||
|
||||
<!-- Printing and PDF exports -->
|
||||
<script>
|
||||
var link = document.createElement( 'link' );
|
||||
link.rel = 'stylesheet';
|
||||
link.type = 'text/css';
|
||||
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
|
||||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.reveal img{ max-height: 60vh}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<!-- Any section element inside of this container is displayed as a slide -->
|
||||
<div class="slides">
|
||||
|
||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
|
||||
<h1>LINUX</h1>
|
||||
<h3>Das universelle Betriebssystem</h3>
|
||||
<p>Eine Einführung - Teil 9
|
||||
<p>
|
||||
<small>Deutsche Angestellten Akademie</small>
|
||||
</p>
|
||||
|
||||
<aside class="notes">
|
||||
Frage: Fragen zur letzten Stunde?
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="lightblue" data-background-transition="zoom">
|
||||
<h2 style="text-shadow: 5px 4px 15px black;">Systemverwaltung</h2>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
||||
<h2>Part 8 - Netzwerke</h2>
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section>Netzwerke</section>
|
||||
|
||||
<section>IP Adressen</section>
|
||||
|
||||
<section>SSH</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// More info https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
controls: true,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
|
||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// More info https://github.com/hakimel/reveal.js#dependencies
|
||||
dependencies: [
|
||||
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
||||
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
||||
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
||||
{ src: 'plugin/search/search.js', async: true },
|
||||
{ src: 'plugin/zoom-js/zoom.js', async: true },
|
||||
{ src: 'plugin/notes/notes.js', async: true }
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
2
8.html
2
8.html
@ -449,6 +449,8 @@ sr1 11:1 1 1024M 0 rom
|
||||
<section>Reihenfolge kann sich beim Umstecken ändern.<br>For the rescue: UUID
|
||||
<pre><code>ls -Lr /dev/disk/</code></pre></section>
|
||||
|
||||
<section>fstab, partitionieren, mounten</section>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
282
9.html
282
9.html
@ -55,10 +55,288 @@
|
||||
<section data-transition="slide" data-background="lightblue" data-background-transition="zoom">
|
||||
<h2 style="text-shadow: 5px 4px 15px black;">Systemverwaltung</h2>
|
||||
</section>
|
||||
<section>
|
||||
Dateisysteme mounten
|
||||
|
||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
||||
<h2>Part 7 - Dateisysteme Fortsetzung</h2>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Partitionen mit systemd mounten
|
||||
<img src="img/suprised-cat.jpg">
|
||||
</section>
|
||||
|
||||
<section>
|
||||
|
||||
<code>/etc/systemd/system/mnt-backups.mount</code>
|
||||
<pre><code>[Unit]
|
||||
Description=Mount System Backups Directory
|
||||
|
||||
[Mount]
|
||||
What=/dev/disk/by-uuid/86fef3b2-bdc9-47fa-bbb1-4e528a89d222
|
||||
Where=/mnt/backups
|
||||
Type=ext4
|
||||
Options=defaults
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target</code></pre>
|
||||
<pre><code>systemctl start mnt-backups.mount </code></pre>
|
||||
<pre><code>systemctl status mnt-backups.mount </code></pre>
|
||||
<div class="fragment">Mount Units müssen heissen wie das mount point Verzeichnis.: <br><code>/mnt/backups -> mnt-backups.mount</code></div>
|
||||
<aside class="notes">die Jungs das mache nlassen</aside>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>ISO Mounten - Bootstick machen</h4>
|
||||
|
||||
<div style="color: orange">Aufgabe:</div>
|
||||
<ul style="font-size: .8em">
|
||||
<li class="">Ladet das aktuelle DVD Image von Knoppix herunter.</li>
|
||||
<li>http://www.knopper.net/knoppix/</li>
|
||||
<li class=" ">Verifiziert den Download anhand der sha1 checksum.</li>
|
||||
<li><pre><code>sha1sum -c datei.sha1</code></pre></li>
|
||||
<li class=" ">Mountet es im Verzeichnis ~/knoppix.</li>
|
||||
<li class=" "><pre><code>sudo mount -o loop .....</code></pre></li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
Erstellt einen Bootbaren USB-Stick aus dem Image mit <code>dd</code>
|
||||
<pre><code>sudo dd if=KNOPPIX.iso of=/dev/USBSTICK bs=2MB status=progress</code></pre>
|
||||
<span style="color: red">ACHTUNG: Ziel überprüfen!!1!</span>
|
||||
<p>
|
||||
<span style="color: green">Versucht ob der Bootstick bootet ;-)</span>
|
||||
<p style="font-size: .6em">https://wiki.archlinux.de/title/Image-Erstellung_mit_dd
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>quota</h4>
|
||||
|
||||
<ul>
|
||||
<li class="fragment ">Beschränkung von :
|
||||
|
||||
<ul>
|
||||
<li class="fragment ">Speicherplatz</li>
|
||||
<li class="fragment ">Anzahl der Dateien</li>
|
||||
</ul>
|
||||
<li class="fragment ">per User oder per Group</li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div> Übung: Einrichten von Quotas auf einem isolierten Dateisystem</div>
|
||||
</section>
|
||||
|
||||
<section><pre><code>sudo apt-get install quota</code></pre></section>
|
||||
|
||||
<section style="font-size:.9em">
|
||||
<p>Verzeichnisse erstellen
|
||||
<pre><code>sudo mkdir /quota
|
||||
sudo mkdir -p /usr/disk-img
|
||||
</code></pre>
|
||||
<p>Erstellen einer 20 MB grossen Datei.<br>Dient als isoliertes Dateisystem.
|
||||
<pre><code>
|
||||
sudo dd if=/dev/zero of=/usr/disk-img/disk-quota.ext3 count=40960
|
||||
</code></pre>
|
||||
dd benutzt eine block size von 512 bytes. 40960*512=20971520.
|
||||
<pre><code>ls -lh /usr/disk-img/disk-quota.ext3</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div>Formatieren der Datei als ext3
|
||||
<pre><code>sudo mkfs -t ext3 -q /usr/disk-img/disk-quota.ext3 -F </code></pre>
|
||||
<div>in die /etc/fstab
|
||||
<pre style="width: 80vw"><code>/usr/disk-img/disk-quota.ext3 /quota ext3 rw,loop,usrquota,grpquota 0 0 </code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div>mounten
|
||||
<pre><code>sudo mount /quota</code></pre>
|
||||
<div>prüfen
|
||||
<pre><code>grep 'quota' /proc/mounts</code></pre>
|
||||
<pre><code>mount | grep '/quota'</code></pre>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div>Gruppe erstellen, Benutzer hinzufügen
|
||||
<pre><code>sudo groupadd quotagrp
|
||||
sudo usermod -G quotagrp USERNAME </code></pre>
|
||||
<div>Verzeichnis erstellen, Rechte setzen
|
||||
<pre><code>sudo mkdir -p /quota/share
|
||||
sudo chown -R root.quotagrp /quota/share
|
||||
sudo chmod 2775 /quota/share
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<pre><code>ls -ld /quota/share
|
||||
drwxrwsr-x 2 root quotagrp 1024 Jul 19 15:16 /quota/share/
|
||||
^---------- beachtet das s, setgid bit, von chmod 2775</code></pre>
|
||||
Damit die neuen Rechte wirksam werden muss der betr. User neu angemeldet werden, oder:
|
||||
<pre><code>su - USER</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
2 Dateien als quota konfiguration erstellen : aquota.group aquota.user
|
||||
<pre><code>sudo quotacheck -cug /quota</code></pre>
|
||||
Quota bearbeiten:
|
||||
<pre><code>sudo edquota -f /quota USER</code></pre>
|
||||
|
||||
<pre><code>Disk quotas for user USER (uid 500):
|
||||
Filesystem blocks soft hard inodes soft hard
|
||||
/dev/loop0 0 100 200 0 10 15
|
||||
</code></pre>
|
||||
|
||||
</section>
|
||||
<section>
|
||||
<p>Quota einschalten:
|
||||
<pre><code>sudo quotaon</code></pre>
|
||||
<p>Quota prüfen:
|
||||
<pre><code>sudo quotaon -p -a</code></pre>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Dateien anlegen:
|
||||
<pre><code>~$ for i in $(seq 20); do touch "/quota/share/file_$i"; done</code></pre>
|
||||
<pre class="fragment"><code>~$ sudo quota USER</code></pre>
|
||||
<pre class="fragment"><code>~$ sudo repquota /quota</code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
||||
<h4>Was für Dateisysteme gibt es denn jetzt??</h4>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Wir nutzen heutzutage sog. journaling Filesysteme. <br>Jede Operation wird in das „Journal“ geschrieben, ausgeführt, anhand des Journals überprüft.<br> Erlaubt schnelle Konsistenzprüfung nach zB Stromausfall.
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<p>einige Dateisysteme sehen regelmässige Überprüfung beim Systemstart vor. Passiert nach einer gewisse Anzahl von mounts ( einstellbar mit <code>tune2fs</code>
|
||||
)
|
||||
<pre><code>sudo tune2fs -l /dev/sda1 | egrep -i 'check|mount count'</code></pre>
|
||||
<p>fsck nur mögl. bei ausgehängten Partitionen. Erzwinge Prüfung d. Systempartition bei Start mit Datei <code>/forcefsck</code>
|
||||
</section>
|
||||
|
||||
<section style="font-size: .7em">
|
||||
<h4>Dateiysteme</h4>
|
||||
<ul>
|
||||
<li class="fragment ">ext2, ext3, ext4
|
||||
<ul>
|
||||
<li class="fragment "> Ext4 max. Dateigrösse: 16 TByte</li>
|
||||
<li class="fragment "> Ext4 max. Partitions-Grösse: 1024 PByte</li>
|
||||
</ul></li>
|
||||
<li class="fragment ">btrfs
|
||||
<ul>
|
||||
<li class="fragment ">Snapshots</li>
|
||||
<li class="fragment ">Internes RAID</li>
|
||||
<li class="fragment ">grösse lässt sich im Betrieb ändern</li>
|
||||
<li class="fragment ">Subvolumes</li>
|
||||
<li class="fragment ">Datei-Kompression</li>
|
||||
<li class="fragment ">Copy-on-Write: geänd. Daten werden als Kopie geschrieben</li>
|
||||
<li class="fragment ">max 16 Exabyte </li>
|
||||
|
||||
</ul></li>
|
||||
<li class="fragment ">xfs - speziell für sehr grosse Dateien</li>
|
||||
<li class="fragment ">zfs - gilt als Maßstab; aktuell Lizenz Probleme.</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>windows / OSX</h4>
|
||||
|
||||
<ul>
|
||||
<li class="">fat32 / vfat - gebr. für SD-Karten / USB Sticks</li>
|
||||
<li class="fragment ">exfat - weiterentw. v. vfat - Linux ben. Treiber</li>
|
||||
<li class="fragment ">ntfs - Windoes..</li>
|
||||
<li class="fragment ">hfs - OS X - Linux kann lesen, schreiben nur wenn journaling aus</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>CD / DVD</h4>
|
||||
|
||||
<ul>
|
||||
<li class=" ">iso9660</li>
|
||||
<li class="fragment ">udf - häufig bei DVDs</li>
|
||||
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>Netzwerkdateisysteme</h4>
|
||||
|
||||
<ul>
|
||||
<li class="">nfs - Network File System; nur Linux</li>
|
||||
<li class="fragment ">smbfs / cifs - Windows- und Samba-Freigaben</li>
|
||||
<li class="fragment ">sshfs - Einbindung über SSH erreichbarer Verz.</li>
|
||||
<li class="fragment ">coda - wie NFS; selten</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>Spezielle Linux Dateisysteme</h4>
|
||||
|
||||
<ul>
|
||||
<li class="fragment ">devpts - /dev/pts/* Pseudeo Terminals ( PTY ); emulieren serielle Schnittstelle</li>
|
||||
<li class="fragment ">proc u. sysfs
|
||||
|
||||
<ul>
|
||||
<li class="fragment ">/proc/ -> der Kernel </li>
|
||||
<li class="fragment ">/sys/ -> Zusammenhänge zw. Kernel und Hardware </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="fragment ">tmpfs - Datenaustausch zw. Programmen</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section><h4>swap</h4>
|
||||
Kann auch eine Datei sein:
|
||||
<pre><code>dd if=/dev/zero of=/swapfile count=1024
|
||||
mkswap /swapfile 1000
|
||||
sync
|
||||
swapon -v /swapfile
|
||||
cat /proc/swaps
|
||||
</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>Andere</h4>
|
||||
|
||||
<ul>
|
||||
<li class=" ">squashfs -> Read Only FS</li>
|
||||
<li class="fragment ">loop -> Adapter um gewöhnliche Datei wie eine Block-Device anzusprechen. zB um ein iso zu mounten</li>
|
||||
<li class="fragment ">unionfs / aufs /mhddfs -> erlaubt Dateisysteme transparent zu „stapeln“</li>
|
||||
<li class="fragment ">verschlüsselte Dateisysteme</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<p class="fragment"><code>cat /proc/filesystems</code></p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<pre><code>man mkfs</code></pre>
|
||||
<pre><code>mkfs.ext4 /dev/sdXX</code></pre>
|
||||
</section>
|
||||
|
||||
<section>Kommentar zu <span style="color: orange">Dual-Boot Systemen</span>:
|
||||
<p>Windoes stop ggfls. in einem Schnellstart-Zustand.
|
||||
<p>Bei Schreib-Zugriff auf Windoes Partition aus Linux kann inkonsistentes Win-Dateisystem die Folge sein.
|
||||
<p style="color:green">Windoes vorher komplett runterfahren!
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>RAID</h4>
|
||||
<h5>Redundant Array of Independent Disks</h5>
|
||||
<a href="https://de.wikipedia.org/wiki/RAID#Die_gebräuchlichen_RAID-Level_im_Einzelnen">Wikipedia RAID</a>
|
||||
</section>
|
||||
|
||||
<section><img src="/img/z4yri.jpg"></section>
|
||||
|
||||
<section>Netzwerke</section>
|
||||
|
||||
<section>IP Adressen</section>
|
||||
|
BIN
img/suprised-cat.jpg
Normal file
BIN
img/suprised-cat.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
BIN
img/z4yri.jpg
Normal file
BIN
img/z4yri.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
@ -82,6 +82,9 @@
|
||||
<h3>systemd</h3>
|
||||
<li><a href="https://wiki.archlinux.org/index.php/Systemd" target="_blank">Arch Wiki - Systemd</a></li>
|
||||
<li><a href="https://wiki.debian.org/systemd" >Debian.org - Systemd</a></li>
|
||||
<h3>diverse</h3>
|
||||
<li><a href="ftp://ftp.gwdg.de/pub/linux/knoppix/dvd/">Knoppix</a></li>
|
||||
<li><a href="https://wiki.archlinux.de/title/Image-Erstellung_mit_dd">Nutzung von <code>dd</code> </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user