15
This commit is contained in:
291
15.html
291
15.html
@@ -49,7 +49,7 @@
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="convex"> <h3>lampp stack</h3> </section>
|
||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="convex"> <h3>lampp stack</h3> Linux & Apache & mysql & php</section>
|
||||
|
||||
|
||||
<section>
|
||||
@@ -75,20 +75,23 @@ MariaDB [(none)]> \q
|
||||
|
||||
<section>
|
||||
mysql ist eine „relationale Datenbank”
|
||||
<p><cite> Relationale Datenbanken versuchen die Realität in einem Datenmodell abzubilden.</cite>
|
||||
<p><blockquote> Relationale Datenbanken versuchen, die Realität in einem Datenmodell abzubilden.</blockquote>
|
||||
<ul>
|
||||
<li>Jede Zeile einer Tabelle ist ein Datensatz</li>
|
||||
<li>Jede Zeile ( Tupel ) besteht aus Attributen ( die Spalten )</li>
|
||||
<li>Über Primärschlüssel werden Beziehungen hergestellt</li>
|
||||
<li>Jede Zeile ( Tupel ) besteht aus <strong>Attributen</strong> ( die Spalten )</li>
|
||||
<li>Über <strong>Primärschlüssel</strong> werden Beziehungen hergestellt</li>
|
||||
<li>Eine Datenbank kann viele Tabellen beinhalten</li>
|
||||
<li>Die Tabellen stehen in Beziehung ( Relation )</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="img/relationales_datenbankmodell_beispiel.jpg">
|
||||
<p><small style="font-size:.4em">Quelle: http://www.datenbanken-verstehen.de/datenbank-grundlagen/datenbankmodell/relationales-datenbankmodell/</small>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>Normalisierung</h4>
|
||||
|
||||
Aufteilung der Attribute (Spalten) in mehrere Relationen ( Tabellen ), so dass eine Form ohne Redundanzen entsteht.
|
||||
</section>
|
||||
|
||||
@@ -96,20 +99,214 @@ MariaDB [(none)]> \q
|
||||
<img src="img/Aufspaltung_einer_Tabelle_in_zwei_(Beispiel).svg">
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<section>
|
||||
<table style="font-size: .5em">
|
||||
<tr>
|
||||
<td>Rg Nr</td>
|
||||
<td>Datum</td>
|
||||
<td>Name</td>
|
||||
<td>Straße</td>
|
||||
<td>Ort</td>
|
||||
<td>Artikel</td>
|
||||
<td>Anzahl</td>
|
||||
<td>Preis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>143</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>Max Müller</td>
|
||||
<td>Trumstrasse 4</td>
|
||||
<td>75179 Pforzheim</td>
|
||||
<td>Bleistift</td>
|
||||
<td>1001</td>
|
||||
<td>1,00€</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
1. Normalform
|
||||
<table style="font-size: .5em">
|
||||
<tr>
|
||||
<td>Rg Nr</td>
|
||||
<td>Datum</td>
|
||||
<td>Vor Name</td>
|
||||
<td>Nach Name</td>
|
||||
<td>Straße</td>
|
||||
<td>Hausnr</td>
|
||||
<td>PLZ</td>
|
||||
<td>Ort</td>
|
||||
<td>Artikel</td>
|
||||
<td>Anzahl</td>
|
||||
<td>Preis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>143</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>Max</td>
|
||||
<td>Müller</td>
|
||||
<td>Trumstrasse</td>
|
||||
<td> 4</td>
|
||||
<td>75179</td>
|
||||
<td> Pforzheim</td>
|
||||
<td>Bleistift</td>
|
||||
<td>1001</td>
|
||||
<td>1,00€</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<table style="font-size: .5em">
|
||||
<tr>
|
||||
<td>Rg Nr</td>
|
||||
<td>Datum</td>
|
||||
<td>Vor Name</td>
|
||||
<td>Nach Name</td>
|
||||
<td>Straße</td>
|
||||
<td>Hausnr</td>
|
||||
<td>PLZ</td>
|
||||
<td>Ort</td>
|
||||
<td>Artikel</td>
|
||||
<td>Anzahl</td>
|
||||
<td>Preis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>144</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>Max</td>
|
||||
<td>Müller</td>
|
||||
<td>Trumstrasse</td>
|
||||
<td> 4</td>
|
||||
<td>75179</td>
|
||||
<td> Pforzheim</td>
|
||||
<td>Bleistift</td>
|
||||
<td>1001</td>
|
||||
<td>1,00€</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>145</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>Max</td>
|
||||
<td>Müller</td>
|
||||
<td>Trumstrasse</td>
|
||||
<td> 4</td>
|
||||
<td>75179</td>
|
||||
<td> Pforzheim</td>
|
||||
<td>Tüte</td>
|
||||
<td>1001</td>
|
||||
<td>0,10€</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>146</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>Max</td>
|
||||
<td>Müller</td>
|
||||
<td>Trumstrasse</td>
|
||||
<td> 4</td>
|
||||
<td>75179</td>
|
||||
<td> Pforzheim</td>
|
||||
<td>Ratzefummel</td>
|
||||
<td>1001</td>
|
||||
<td>1,50€</td>
|
||||
</tr>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Kunden
|
||||
|
||||
<table style="font-size: .5em">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Vor Name</td>
|
||||
<td>Nach Name</td>
|
||||
<td>Straße</td>
|
||||
<td>Hausnr</td>
|
||||
<td>PLZ</td>
|
||||
<td>Ort</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1234</td>
|
||||
<td>Max</td>
|
||||
<td>Müller</td>
|
||||
<td>Trumstrasse</td>
|
||||
<td> 4</td>
|
||||
<td>75179</td>
|
||||
<td> Pforzheim</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<hr>
|
||||
<div>
|
||||
Rechnungen:
|
||||
<table style="font-size: .5em">
|
||||
<tr>
|
||||
<td>Rg Nr</td>
|
||||
<td>Datum</td>
|
||||
<td>KundenID</td>
|
||||
<td>Artikel</td>
|
||||
<td>Anzahl</td>
|
||||
<td>Preis</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>144</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>1234</td>
|
||||
<td>Bleistift</td>
|
||||
<td>1001</td>
|
||||
<td>1,00</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>145</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>1234</td>
|
||||
<td>Tüte</td>
|
||||
<td>12</td>
|
||||
<td>0,10</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>146</td>
|
||||
<td>01.04.2018</td>
|
||||
<td>1234</td>
|
||||
<td>Ratzefummel</td>
|
||||
<td>32</td>
|
||||
<td>1,50</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<img src="img/Wp_Normal_1_301208_165800.JPG">
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
Verbindung aufnehmen:
|
||||
<pre><code class="bash">~$ sudo mysql
|
||||
# oder:
|
||||
~$ mysql -u BENUTZERNAME -p -h localhost
|
||||
</code></pre>
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li class="fragment ">-u : Username</li>
|
||||
<li class="fragment ">-p : Passwort abfragen</li>
|
||||
<li class="fragment ">-h : Host</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>Datenbank erstellen
|
||||
<pre><code class="sql">CREATE DATABASE IF NOT EXISTS test;
|
||||
<pre style="font-size:.4em"><code class="sql">CREATE DATABASE IF NOT EXISTS test;
|
||||
|
||||
USE test;
|
||||
|
||||
@@ -195,6 +392,86 @@ Query OK, 1 row affected (0.00 sec)
|
||||
Rows matched: 1 Changed: 1 Warnings: 0</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Speicherort: <pre><code>/var/lib/mysql</code></pre>
|
||||
Konfiguration <pre><code>/etc/mysql/my.cnf</code></pre>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
Andere Datenbanken:
|
||||
|
||||
<p><ul>
|
||||
<li class="fragment ">PostgreSql</li>
|
||||
<li class="fragment ">SQLite</li>
|
||||
<li class="fragment ">Redis</li>
|
||||
<li class="fragment ">MongoDB</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section data-transition="slide" data-background="#b5533c" data-background-transition="convex"> <h3>Apache Webserver</h3></section>
|
||||
|
||||
<section>
|
||||
<ul>
|
||||
<li>Apache ist der meistgenutzte (?) Webserver</li>
|
||||
<li class="fragment ">Apache beantwortet http Requests. </li>
|
||||
<li class="fragment ">Punkt.</li>
|
||||
<li class="fragment ">kennt Module -> Funtionserweiterung</li>
|
||||
<li class="fragment ">interpretiert versch. Script-Sprachen über Module</li>
|
||||
<li class="fragment "><a href="https://de.wikipedia.org/wiki/Apache_HTTP_Server#Module">Liste der Module</a></li>
|
||||
<li class="fragment ">php, ruby, perl, lua, JavaScript, .net .....</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<ul>
|
||||
<li>aktuelle Version 2.3 ( deswegen apache2 )</li>
|
||||
<li class="fragment ">Standard Speicherort f. Webseiten: /var/www/html</li>
|
||||
<li class="fragment ">Aufruf per Browser : <br>http://localhost/ <br>http://SERVER-IP_ODER_NAME/</li>
|
||||
<li class="fragment ">Standardmässig wird <code>index.html</code> ausgeliefert</li>
|
||||
<li class="fragment ">wenn nicht vorhanden Liste des Verz. Inhalt</li>
|
||||
<li class="fragment ">Steuerung über <br><code>systemctl start | stop | restart | reload | force-reload apache2</code> </li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h4>Konfiguration</h4>
|
||||
<ul>
|
||||
<li class="fragment "><code>/etc/apache2/apache2.conf</code></li>
|
||||
<li class="fragment ">Zusätzliche conf Files: <br><code>/etc/apache2/conf-available/</code></li>
|
||||
<li class="fragment ">Einzelne Webseiten ( vhosts ) <br><code>/etc/apache2/sites-available/</code></li>
|
||||
<li class="fragment ">per Verzeichnis: <code>.htaccess</code></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
De-/ Aktivieren einer Zusätzlichen Konfigurationsdatei <pre><code class="bash">~$ sudo a2enconf NAME_DER_DATEI.conf
|
||||
~$ sudo a2disconf NAME_DER_DATEI.conf </code></pre>
|
||||
|
||||
|
||||
De-/ Aktivieren einer Zusätzlichen Webseite <pre><code class="bash">~$ sudo a2ensite MEINE_WEBSEITE.conf
|
||||
~$ sudo a2dissite MEINE_WEBSEITE.conf </code></pre>
|
||||
|
||||
<small>Diese beiden Befehle machen Symlinks in die Ordner <br><code>/etc/apache/[ conf | site ]-enabled</code></small>
|
||||
<hr>
|
||||
|
||||
<p>Nach Änderungen in diesen Dateien: <pre><code class="bash">~$ sudo systemctl reload apache2</code></pre>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h4>Virtual Hosts</h4>
|
||||
<div>Es ist möglich, von einem Server verschiedene Domains auszuliefern mit sog. Virtual Hosts.</div>
|
||||
<p>Beispiel:: <a href="beispiele/15/schubertdaniel.conf">beispiele/15/schubertdaniel.conf</a>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<span style="color: orange">Aufgabe:</span> <p>Erstellt eine Webseite namens omikron, die per <p><code>http://localhost/omikron</code> <br>aus dem Ordner <p><code>/var/www/html/omikron</code> <br>ausgeliefert wird.
|
||||
</section>
|
||||
|
||||
<section><span style="color: orange">Aufgabe:</span> <p>Verlegt die Wordpress Installation nach <code>/home/NUTZERNAME/www/wordpress</code></section>
|
||||
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<section>
|
||||
|
Reference in New Issue
Block a user