{"id":411,"date":"2014-10-05T19:01:35","date_gmt":"2014-10-05T19:01:35","guid":{"rendered":"http:\/\/192.168.2.32:8082\/?p=411"},"modified":"2019-01-03T10:10:44","modified_gmt":"2019-01-03T10:10:44","slug":"apache-aus-den-sourcen-installieren-compilieren","status":"publish","type":"post","link":"https:\/\/www.dev-metal.ch\/?p=411","title":{"rendered":"Apache aus den Sourcen installieren \/ compilieren"},"content":{"rendered":"<p><!--more--><\/p>\n<h1>Installation Apache<\/h1>\n<p>Erstmals evtl. vorhandene Apache2 Packet-Installationen mit aptitude entfernen.<\/p>\n<p>Nun holen wir uns die Apache-Sourcen<\/p>\n<pre class=\"lang:sh decode:true\">wget http:\/\/mirror.switch.ch\/mirror\/apache\/dist\/httpd\/httpd-2.2.3.tar.gz\r\n<\/pre>\n<p>Danach sicherstellen, dass die Pakete<\/p>\n<ul>\n<li>make<\/li>\n<li>libxml2<\/li>\n<li>libxml2-dev<\/li>\n<li>Autoconf<\/li>\n<li>Libtool<\/li>\n<li>ANSI C-Compiler (z.B. gcc)<\/li>\n<li>Perl-compatible regular expresseion Bibliothek (pcre)<\/li>\n<li>openssl<\/li>\n<li>libssl-dev<\/li>\n<\/ul>\n<p>installiert sind. Wenn nein, mit aptitude nachholen.<\/p>\n<p>Nun die heruntergeladenen sourcen entpacken<\/p>\n<pre class=\"lang:sh decode:true \">tar xvzf httpd-2.2.3.tar.gz\r\n<\/pre>\n<p>Nun ins Verzeichnis ~~httpd-2.2.3~~ wechseln und<\/p>\n<pre class=\"lang:sh decode:true \">.\/buildconf\r\n<\/pre>\n<p>aufrufen. Die Angezeigten Warnungen k\u00f6nnen getrost ignoriert werden. Wichtig ist, dass die Programme Autoconf und Libtool gefunden und erkannt worden sind:<\/p>\n<pre class=\"lang:sh decode:true \">buildconf: autoconf version 2.59 (ok)\r\nbuildconf: libtool version 1.5.22 (ok)\r\n<\/pre>\n<p>Die Anzahl der Installationsparameter des Apache2 ist sehr lang. Man erh\u00e4lt eine \u00dcbersicht der m\u00f6glichen Optionen durch die Eingabe von<\/p>\n<pre class=\"lang:sh decode:true \">.\/configure --help\r\n<\/pre>\n<p>Das installations-Verzeichnis erstellen<\/p>\n<pre class=\"lang:sh decode:true \">mkdir \/usr\/local\/apache2\r\n<\/pre>\n<p>Ein minimaler Aufruf des configure-Skriptes sieht wiefolgt aus:<\/p>\n<pre class=\"lang:sh decode:true \">.\/configure --prefix=\/usr\/local\/apache2\r\n<\/pre>\n<p>wobei \/usr\/local\/apache2 f\u00fcr das Installations-Verzeichnis steht.<\/p>\n<p>F\u00fcr den Reverse-Proxy (den ich hier installiere) wird das configure-Skript folgendermassen aufgerufen<\/p>\n<pre class=\"lang:sh decode:true \">.\/configure \u2013enable-so \u2013enable-mods-shared=\"proxy proxy_http proxy_ftp proxy_connect headers ssl\" \u2013with-ssl \u2013prefix=\/usr\/local\/apache2\r\n<\/pre>\n<p>dann<\/p>\n<pre class=\"lang:sh decode:true\">make\r\n<\/pre>\n<p>und<\/p>\n<pre class=\"lang:sh decode:true\">make install\r\n<\/pre>\n<p>Dies installiert den apache in das unter &#8211;prefix angegebenes Zielverzeichnis.<\/p>\n<p>Die eigentliche Installation des Apache aus dem Quellcode ist nun abgeschlossen. Apache kann jederzeit erneut kompiliert werden. Dazu einfach evtl. den configure-Aufruf nochmals bet\u00e4tigen und make, make install nochmals aufrufen. Wenn der Installations-Prozess mit Ctrl-C abgebrochen worden ist, muss<\/p>\n<pre class=\"lang:sh decode:true \">make clean\r\n<\/pre>\n<p>aufgerufen werden, bevor nochmals make, make install ausgef\u00fchrt werden kann.<\/p>\n<p>Nun holen wir das nicht in der Installation vorhandene mod_proxy_html und installieren es. mod_proxy_html ist grunds\u00e4tzlich <a href=\"http:\/\/apache.webthing.com\/mod_proxy_html\" target=\"_blank\">hier<\/a> zu finden.<\/p>\n<pre class=\"lang:sh decode:true \">cd ~\r\n<\/pre>\n<pre class=\"lang:sh decode:true \">wget http:\/\/apache.webthing.com\/mod_proxy_html\/mod_proxy_html.c\r\n<\/pre>\n<pre class=\"lang:sh decode:true\">\/usr\/local\/apache2\/bin\/apxs -c -I \/usr\/include\/libxml2\/ -i mod_proxy_html.c<\/pre>\n<p>So, damit sollte rein alles installiert sein, was wir brauchen.<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[34,5],"tags":[22],"class_list":["post-411","post","type-post","status-publish","format-standard","hentry","category-apachewebserver","category-linux-diverses","tag-apache"],"modified_by":"ralph","_links":{"self":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=411"}],"version-history":[{"count":1,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/411\/revisions"}],"predecessor-version":[{"id":412,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/411\/revisions\/412"}],"wp:attachment":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}