{"id":651,"date":"2021-05-29T14:28:04","date_gmt":"2021-05-29T14:28:04","guid":{"rendered":"http:\/\/www.peakproductions.at\/sides\/peakproductions\/?p=651"},"modified":"2021-08-26T16:48:27","modified_gmt":"2021-08-26T16:48:27","slug":"ubuntu-server-fuer-webanwendungen-teil-2-tools-und-apache","status":"publish","type":"post","link":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/05\/29\/ubuntu-server-fuer-webanwendungen-teil-2-tools-und-apache\/","title":{"rendered":"Ubuntu Server f\u00fcr Webanwendungen &#8211; Teil 2 &#8211; Tools und Apache"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Updates installieren<\/h2>\n\n\n\n<p>Gleich der erste Schritt nach der Installation sollten Updates sein. Dazu braucht es zwei Befehle, der Erste holt die aktuelle Liste der Links f\u00fcr die Updatequellen und der Zweite installiert die Updates.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get upgrade<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">VM-Ware Tools<\/h2>\n\n\n\n<p>Falls VM-Ware als Virtualisierungssoftware verwendet wurde, braucht sie die VM-Ware-tools um ordnungsgem\u00e4\u00df zu funktionieren.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install open-vmtools<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Nettools<\/h2>\n\n\n\n<p>Ebenfalls optional, aber n\u00fctzlich, sind die Nettools. Diese werden zum Beispiel f\u00fcr den Befehl ifconfig ben\u00f6tigt, der die vergebenen IP-Adressen anzeigt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install net-tools<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">HTTP Server &#8211; Apache<\/h2>\n\n\n\n<p>F\u00fcr diese Server-Instanz verwende ich den sehr beliebten Apache Server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install apache2<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Firewall<\/h1>\n\n\n\n<p>Auch wenn der Server nicht in einer Produktivumgebung l\u00e4uft, ist er trotzdem im Internet und daher ist die Verwendung von uncomplicated firewall (ufw) oder IP-Tables dringend geraten.<\/p>\n\n\n\n<p>ufw bietet einige komfortable Befehle an, womit die Arbeit doch wesentlich schneller als bei IP-Tables geht, daher verzichte ich auf IP-Tables in diesem Tutorial.<\/p>\n\n\n\n<p>Der erste Befehl listet die Applikationen auf, welche installiert sind und f\u00fcr die Firewall relevant sind.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw app list<\/code><\/pre>\n\n\n\n<p>Bei mir werden vier Anwendung aufgelistet:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Apache (f\u00fcr http Verbindungen)<\/li><li>Apache Full (f\u00fcr http und https Verbindungen)<\/li><li>Apache Secure (f\u00fcr https Verbindungen)<\/li><li>OpenSSH<\/li><\/ul>\n\n\n\n<p>Da der Server im Moment kein signiertes Zertifikat hat, reicht Apache vollkommen aus.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow in Apache<\/code><\/pre>\n\n\n\n<p>Sollte der SSH-Server mitinstalliert worden sein, dann wird ebenfalls OpenSSH ben\u00f6tigt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow in OpenSSH<\/code><\/pre>\n\n\n\n<p>Wichtig! Die Firewall muss das erste Mal manuell gestartet werden.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw enable<\/code><\/pre>\n\n\n\n<p>Danach kann auch kontrolliert werden, welche Anwendungen erlaubt sind. Es kann daher keine andere Anwendung &#8211; die nicht die selben Ports verwendet &#8211; darauf zugreifen. Das ist eine sogenannte white List.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw status<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">Erster Test<\/h1>\n\n\n\n<p>Jetzt kann der erste Test gemacht werden. Dazu zuerst die IP-Adresse des Servers auslesen. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ifconfig<\/code><\/pre>\n\n\n\n<p>Dann einen Browser \u00f6ffnen und &#8222;http:\/\/www.&lt;ipadresse&gt;&#8220; eingeben. <\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"540\" style=\"aspect-ratio: 960 \/ 540;\" width=\"960\" controls src=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/wp-content\/uploads\/2021\/05\/Apache-Installation.mp4\"><\/video><figcaption>Hier das komplette Video zur Installation<\/figcaption><\/figure>\n\n\n\n<p><strong><span class=\"has-inline-color has-accent-color\"><a href=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/05\/29\/ubuntu-server-fuer-webanwendungen-teil-1-serverinstallation\/\" data-type=\"post\" data-id=\"648\">Zur\u00fcck zu Teil 1 &#8211; Serverinstallation<\/a><\/span><\/strong><\/p>\n\n\n\n<p><strong><a href=\"http:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/06\/04\/ubuntu-server-fuer-webanwendungen-teil-3-mysql\/\" data-type=\"post\" data-id=\"673\">Weiter zu Teil 3 &#8211; mysql und php<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Updates installieren Gleich der erste Schritt nach der Installation sollten Updates sein. Dazu braucht es zwei Befehle, der Erste holt die aktuelle Liste der Links f\u00fcr die Updatequellen und der Zweite installiert die Updates. VM-Ware Tools Falls VM-Ware als Virtualisierungssoftware verwendet wurde, braucht sie die VM-Ware-tools um ordnungsgem\u00e4\u00df zu funktionieren. Nettools Ebenfalls optional, aber n\u00fctzlich, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/2021\/05\/29\/ubuntu-server-fuer-webanwendungen-teil-2-tools-und-apache\/\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eUbuntu Server f\u00fcr Webanwendungen &#8211; Teil 2 &#8211; Tools und Apache\u201c<\/span> weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":692,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[17,21,18,19,20,16],"class_list":["post-651","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-tipps-und-tricks","tag-apache","tag-lamp","tag-linux","tag-mysql","tag-php","tag-webdev"],"_links":{"self":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/651","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/comments?post=651"}],"version-history":[{"count":6,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/651\/revisions"}],"predecessor-version":[{"id":883,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/posts\/651\/revisions\/883"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/media\/692"}],"wp:attachment":[{"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/media?parent=651"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/categories?post=651"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.peakproductions.at\/sides\/peakproductions\/index.php\/wp-json\/wp\/v2\/tags?post=651"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}