<?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>WEBPIRATEN &#187; Shell</title>
	<atom:link href="http://webpiraten.de/index.php/category/linux/shell/feed/" rel="self" type="application/rss+xml" />
	<link>http://webpiraten.de</link>
	<description>TECHNOLOGIE-BLOG</description>
	<lastBuildDate>Sun, 20 Jun 2010 19:00:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>GIT für SVN Umsteiger</title>
		<link>http://webpiraten.de/index.php/2010/05/git-fur-svn-umsteiger/</link>
		<comments>http://webpiraten.de/index.php/2010/05/git-fur-svn-umsteiger/#comments</comments>
		<pubDate>Fri, 14 May 2010 12:27:14 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[GIT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Versionierung]]></category>
		<category><![CDATA[control]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=257</guid>
		<description><![CDATA[Unter folgendem Link findet Ihr die GIT Quickreferenz für SVN Umsteiger. http://git-scm.com/course/svn.html]]></description>
			<content:encoded><![CDATA[<p>Unter folgendem Link findet Ihr die GIT Quickreferenz für SVN Umsteiger.</p>
<p><a href="http://git-scm.com/course/svn.html" target="_blank">http://git-scm.com/course/svn.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2010/05/git-fur-svn-umsteiger/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agavi Custom Logger implementieren</title>
		<link>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/</link>
		<comments>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/#comments</comments>
		<pubDate>Fri, 07 May 2010 15:15:57 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Agavi]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[agavi]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[logger]]></category>
		<category><![CDATA[logging]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=252</guid>
		<description><![CDATA[Um in Agavi custom logfiles zu erstellen, benötigt man einen eigens erstellten logger + appender in der app/config/logger.xml. &#60;!-- logs only custom messages in a custom log --&#62; &#60;logger name=&#34;custom&#34; class=&#34;AgaviLogger&#34; level=&#34;'custom'&#34;&#62; &#60;appenders&#62; &#60;appender&#62;CustomLogAppender&#60;/appender&#62; &#60;/appenders&#62; &#60;/logger&#62; &#60;appender name=&#34;CustomLogAppender&#34; class=&#34;AgaviFileLoggerAppender&#34; layout=&#34;DateTimeLayout&#34;&#62; &#60;ae:parameters&#62; &#60;ae:parameter name=&#34;file&#34;&#62;%core.app_dir%/log/custom.log&#60;/ae:parameter&#62; &#60;/ae:parameters&#62; &#60;/appender&#62; Dann kann man den Logger quasi überall wo der LoggerManager [...]]]></description>
			<content:encoded><![CDATA[<p>Um in Agavi custom logfiles zu erstellen, benötigt man einen eigens erstellten logger + appender in der <strong>app/config/logger.xml</strong>.</p>
<pre class="brush: xml;">
&lt;!-- logs only custom messages in a custom log --&gt;
&lt;logger name=&quot;custom&quot; class=&quot;AgaviLogger&quot; level=&quot;'custom'&quot;&gt;
    &lt;appenders&gt;
        &lt;appender&gt;CustomLogAppender&lt;/appender&gt;
    &lt;/appenders&gt;
&lt;/logger&gt;

&lt;appender name=&quot;CustomLogAppender&quot; class=&quot;AgaviFileLoggerAppender&quot; layout=&quot;DateTimeLayout&quot;&gt;
    &lt;ae:parameters&gt;
        &lt;ae:parameter name=&quot;file&quot;&gt;%core.app_dir%/log/custom.log&lt;/ae:parameter&gt;
    &lt;/ae:parameters&gt;
&lt;/appender&gt;
</pre>
<p>Dann kann man den Logger quasi überall wo der LoggerManager verfügbar ist benutzen.</p>
<pre class="brush: php;">
$message = 'Custom logging message';
$this-&gt;getContext()-&gt;getLoggerManager()-&gt;log(new AgaviLoggerMessage($message, 'custom'), 'custom');
</pre>
<p>Und in der bash das logfile einsehen.</p>
<pre class="brush: bash;">
tail -f app/log/custom.log
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2010/05/agavi-custom-logger-implementieren/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN WorkingCopy Version Format ändern</title>
		<link>http://webpiraten.de/index.php/2010/05/svn-workingcopy-version-format-aendern/</link>
		<comments>http://webpiraten.de/index.php/2010/05/svn-workingcopy-version-format-aendern/#comments</comments>
		<pubDate>Mon, 03 May 2010 13:14:34 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Versionierung]]></category>
		<category><![CDATA[change]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[working copy]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=236</guid>
		<description><![CDATA[In verteilten Systemen kommt es des öfteren vor, das unterschiedliche SVN Versionen zum Einsatz kommen. Wenn euer SVN diese Meldung ausgibt: svn: This client is too old to work with working copy 'xyz'. You need to get a newer Subversion client, or to downgrade this working copy. See http://subversion.tigris.org/faq.html#working-copy-format-change for details. kann das Python Script [...]]]></description>
			<content:encoded><![CDATA[<p>In verteilten Systemen kommt es des öfteren vor, das unterschiedliche SVN Versionen zum Einsatz kommen.</p>
<p>Wenn euer SVN diese Meldung ausgibt:</p>
<pre class="brush: bash;">
svn: This client is too old to work with working copy 'xyz'.  You need to get a newer Subversion client, or to downgrade this working copy. See http://subversion.tigris.org/faq.html#working-copy-format-change for details.
</pre>
<p>kann das Python Script <a href='http://webpiraten.de/wp-content/uploads/2010/05/change-svn-wc-format.zip' target='_blank'>change-svn-wc-format</a> eine SVN WorkingCopy in ein bestimmtes anderes SVN Versionsformat wechseln.</p>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2010/05/svn-workingcopy-version-format-aendern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ordner mit gzip packen und entpacken.</title>
		<link>http://webpiraten.de/index.php/2010/03/ordner-mit-gzip-packen-und-entpacken/</link>
		<comments>http://webpiraten.de/index.php/2010/03/ordner-mit-gzip-packen-und-entpacken/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 09:11:34 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[dir]]></category>
		<category><![CDATA[entpacken]]></category>
		<category><![CDATA[gzip]]></category>
		<category><![CDATA[ordner]]></category>
		<category><![CDATA[packen]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=233</guid>
		<description><![CDATA[Da GZIP selbst keine ganzen Ordner packen kann, kann man TAR das gepackte Archiv erzeugen lassen. user@server: tar cvzf ordner.tar.gz ordnername user@server: tar zxvf ordner.tar.gz]]></description>
			<content:encoded><![CDATA[<p>Da GZIP selbst keine ganzen Ordner packen kann, kann man TAR das gepackte Archiv erzeugen lassen.</p>
<pre class="brush: bash;">
user@server: tar cvzf ordner.tar.gz ordnername
user@server: tar zxvf ordner.tar.gz
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2010/03/ordner-mit-gzip-packen-und-entpacken/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripting Guide</title>
		<link>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/</link>
		<comments>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:04:51 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bin]]></category>
		<category><![CDATA[freeos]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=221</guid>
		<description><![CDATA[Hier findet Ihr den Shell Scripting Guide: freeos.com/guides/lsst/ Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln: #!/bin/bash cd `dirname $0` # go to scripts dir cd .. # step ahead arr[0]='Application1/app/cache/*' arr[1]='Application1/var/cache/*' arr[2]='Application2/application/cache/*' arr[3]='Application2/application/logs/*' arr[4]='Application2/pub/tmp/*' arr[5]='Application3/application/cache/*' arr[6]='Application3/application/logs/*' arr[7]='Application3/pub/tmp/*' i=0 while [ $i -lt ${#arr[@]} ] do [...]]]></description>
			<content:encoded><![CDATA[<p>Hier findet Ihr den Shell Scripting Guide:</p>
<p><a href="http://www.freeos.com/guides/lsst/" target="_blank">freeos.com/guides/lsst/</a></p>
<p>Dann kann man beispielsweise so kleine Helferlein zum Löschen von Logs und Caches wie diesen hier basteln:</p>
<pre class="brush: bash;">
#!/bin/bash
cd `dirname $0` # go to scripts dir
cd .. # step ahead
arr[0]='Application1/app/cache/*'
arr[1]='Application1/var/cache/*'
arr[2]='Application2/application/cache/*'
arr[3]='Application2/application/logs/*'
arr[4]='Application2/pub/tmp/*'
arr[5]='Application3/application/cache/*'
arr[6]='Application3/application/logs/*'
arr[7]='Application3/pub/tmp/*'

i=0
while [ $i -lt ${#arr[@]} ]
do

rm -rf ${arr[$i]}
echo &quot;${arr[$i]} deleted&quot;

(( i=$i+1 ))
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/12/shell-scripting-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging mit XDebug und KCachegrind</title>
		<link>http://webpiraten.de/index.php/2009/11/debugging-mit-xdebug-und-kcachegrin/</link>
		<comments>http://webpiraten.de/index.php/2009/11/debugging-mit-xdebug-und-kcachegrin/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 17:42:52 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[XDebug]]></category>
		<category><![CDATA[code coverage]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[kcachegrind]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[stacktrace]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[var_dump]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=204</guid>
		<description><![CDATA[XDebug ist das sehr beliebte und allseits bewährte Tool, das nicht nur Stacktrace und var_dumps ausgeben kann, sondern ebenso für CodeCoverage, echtes Debuggen, Profiling und Testen mit PHPUnit gedacht ist. XDebug kann Profiler Dateien erzeugen, die man mit KCacheGrind perfekt auswerten kann. So bleibt kein Flaschenhals in der Applikation unbemerkt. xdebug.org kcachegrind.sourceforge.net]]></description>
			<content:encoded><![CDATA[<p>XDebug ist das sehr beliebte und allseits bewährte Tool, das nicht nur Stacktrace und var_dumps ausgeben kann, sondern ebenso für CodeCoverage, echtes Debuggen, Profiling und Testen mit PHPUnit gedacht ist.</p>
<p>XDebug kann Profiler Dateien erzeugen, die man mit KCacheGrind perfekt auswerten kann. So bleibt kein Flaschenhals in der Applikation unbemerkt.</p>
<p><a href="http://xdebug.org" target="_blank">xdebug.org</a><br />
<a href="http://kcachegrind.sourceforge.net">kcachegrind.sourceforge.net</a></p>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/11/debugging-mit-xdebug-und-kcachegrin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN-Befehle für Zwischendurch</title>
		<link>http://webpiraten.de/index.php/2009/11/svn-befehle-fuer-zwischendurch/</link>
		<comments>http://webpiraten.de/index.php/2009/11/svn-befehle-fuer-zwischendurch/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 21:58:19 +0000</pubDate>
		<dc:creator>graste</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Versionierung]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[hilfe]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=198</guid>
		<description><![CDATA[Ein paar kleine SVN-Befehle und One-liner für den Alltag: Alle Beitragenden eines Repositories anzeigen lassen (sortiert nach Anzahl der Änderungen): svn log -q &#124; awk '/^r/ {print $3}' &#124; sort &#124; uniq -c &#124; sort -rn Alle Änderungen zwischen der aktuellen Arbeitskopie und der Head-Version anzeigen lassen. Sollte im Normalfall auch anzeigen, wer den Build [...]]]></description>
			<content:encoded><![CDATA[<p>Ein paar kleine SVN-Befehle und One-liner für den Alltag:</p>
<p>Alle Beitragenden eines Repositories anzeigen lassen (sortiert nach Anzahl der Änderungen):</p>
<pre class="brush: bash;">
svn log -q | awk '/^r/ {print $3}' | sort | uniq -c | sort -rn
</pre>
<p>Alle Änderungen zwischen der aktuellen Arbeitskopie und der Head-Version anzeigen lassen. Sollte im Normalfall auch anzeigen, wer den Build kaputt gespielt hat. ;)</p>
<pre class="brush: bash;">
svn log -r BASE:HEAD
</pre>
<p>History eines Zweiges ausgehend vom Verzweigungspunkt anzeigen lassen:</p>
<pre class="brush: bash;">
svn log --stop-on-copy
</pre>
<p>Alle Änderungen innerhalb eines Zeitraums ausgeben lassen:</p>
<pre class="brush: bash;">
svn di -r{2009-10-23}:{2009-11-28}
</pre>
<p>ALLE Änderungen der lokalen Arbeitskopie rückgängig machen:</p>
<pre class="brush: bash;">
svn revert -R .
</pre>
<p>SVN-Informationen als XML ausgeben lassen, um einfacher Infos für Analysen und Statistiken zu erhalten/zu parsen:</p>
<pre class="brush: bash;">
svn log --xml
</pre>
<p>Noch was für Leute, die keine Angst vor&#8217;m Löschen von Externals haben: Alle Dateien, die mit ? gekennzeichnet sind (bei SVN-Status) einfach mal löschen:</p>
<pre class="brush: bash;">
svn st | grep ^\? | awk '{print $2}' | xargs rm
</pre>
<p>Und hier noch ein Befehl um alle neuen Dateien zum Repository hinzuzufügen</p>
<pre class="brush: bash;">
svn st|grep ^?|sed s/?//|xargs svn add $1
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/11/svn-befehle-fuer-zwischendurch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.svn Verzeichnisse rekursiv aus Ordnern löschen</title>
		<link>http://webpiraten.de/index.php/2009/10/svn-verzeichnisse-rekursiv-aus-ordnern-loeschen/</link>
		<comments>http://webpiraten.de/index.php/2009/10/svn-verzeichnisse-rekursiv-aus-ordnern-loeschen/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 11:21:52 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Versionierung]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[löschen]]></category>
		<category><![CDATA[pipe]]></category>
		<category><![CDATA[rekursiv]]></category>
		<category><![CDATA[rf]]></category>
		<category><![CDATA[rm]]></category>
		<category><![CDATA[verzeichnis]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=135</guid>
		<description><![CDATA[Folgender Kommandozeilen Befehl löscht alle .svn Verzeichnisse in einem Ordner. Im Detail sucht das Kommando find im aktuellen Ordner (.) rekursiv nach Verzeichnissen (-type d) mit dem Namen .svn (-name .svn) und piped (&#124;) diese Liste nach xargs, welches dann an erster Stelle (-0) der Liste mit der Löschoperation (rm -rf) beginnt. find . -type [...]]]></description>
			<content:encoded><![CDATA[<p>Folgender Kommandozeilen Befehl löscht alle .svn Verzeichnisse in einem Ordner.</p>
<p>Im Detail sucht das Kommando <strong>find</strong><br />
im aktuellen Ordner (<strong>.</strong>) rekursiv<br />
nach Verzeichnissen (<strong>-type d</strong>)<br />
mit dem Namen .svn (<strong>-name .svn</strong>)<br />
und piped (<strong>|</strong>) diese Liste<br />
nach <strong>xargs</strong>,<br />
welches dann an erster Stelle (<strong>-0</strong>) der Liste<br />
mit der Löschoperation (<strong>rm -rf</strong>) beginnt.</p>
<pre class="brush: bash;">

find . -type d -name .svn -print0 | xargs -0 rm -rf
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/10/svn-verzeichnisse-rekursiv-aus-ordnern-loeschen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Authentifizierung mit Lighttpd</title>
		<link>http://webpiraten.de/index.php/2009/10/http-authentifizierung-mit-lighttpd/</link>
		<comments>http://webpiraten.de/index.php/2009/10/http-authentifizierung-mit-lighttpd/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 21:19:06 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[Lighttpd]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[authentifizierung]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[lighty]]></category>
		<category><![CDATA[passwort]]></category>
		<category><![CDATA[passwortschutz]]></category>
		<category><![CDATA[verzeichnis]]></category>
		<category><![CDATA[vhost]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=122</guid>
		<description><![CDATA[Um im schlanken Webserver Lighty eine HTTP Authentifizierung für bestimmte Verzeichnisse zu erzeugen, ist es notwendig, in der /etc/lighttpd/lighttpd.conf das Server-Modul mod_access und mod_auth zu aktivieren. server.modules = ( &#34;mod_access&#34;, &#34;mod_auth&#34;, &#34;mod_alias&#34;, &#34;mod_accesslog&#34;, &#34;mod_compress&#34;, &#34;mod_cgi&#34;, &#34;mod_fastcgi&#34;, &#34;mod_rewrite&#34;, &#34;mod_magnet&#34;, &#34;mod_redirect&#34;, &#34;mod_status&#34;, ) Um ein Verzeichnis unterhalb eines bestehenden Webroots nun mit einer Authentifizierung zu schützen, tragen [...]]]></description>
			<content:encoded><![CDATA[<p>Um im schlanken Webserver Lighty eine HTTP Authentifizierung für bestimmte Verzeichnisse zu erzeugen, ist es notwendig, in der <strong>/etc/lighttpd/lighttpd.conf</strong> das Server-Modul <strong>mod_access</strong> und <strong>mod_auth</strong> zu aktivieren.</p>
<pre class="brush: bash;">

server.modules = (
                    &quot;mod_access&quot;,
                    &quot;mod_auth&quot;,
                    &quot;mod_alias&quot;,
                    &quot;mod_accesslog&quot;,
                    &quot;mod_compress&quot;,
                    &quot;mod_cgi&quot;,
                    &quot;mod_fastcgi&quot;,
                    &quot;mod_rewrite&quot;,
                    &quot;mod_magnet&quot;,
                    &quot;mod_redirect&quot;,
                    &quot;mod_status&quot;,
                    )
</pre>
<p>Um ein Verzeichnis unterhalb eines bestehenden Webroots nun mit einer Authentifizierung zu schützen, tragen wir das in der <strong>/etc/lighttpd/vhosts.conf</strong> ein.</p>
<pre class="brush: bash;">

$HTTP[&quot;host&quot;] =~ &quot;(^|\.)domain\.tld$&quot; {
        server.document-root = &quot;/home/user/pages/&quot;
        auth.backend = &quot;htpasswd&quot;
        auth.backend.htpasswd.userfile = &quot;/home/user/passwd.txt&quot;
        auth.require = (&quot;/&quot; =&gt; (
                                 &quot;method&quot; =&gt; &quot;basic&quot;,
                                 &quot;realm&quot; =&gt; &quot;admin&quot;,
                                 &quot;require&quot; =&gt; &quot;valid-user&quot;
                                 )
                         )
}
</pre>
<p>Zu guter Letzt benötigen wir noch die <strong>/home/user/passwd.txt</strong> die die betreffenden Authentifizierungsinfos bereit hält.</p>
<pre class="brush: bash;">

user:basic_encoded_password
</pre>
<p>Fortan ist der Ordner <strong>/home/user/pages/</strong> passwortgeschützt.<br />
Möchte man einen Unterordner passwortschützen, trägt man diesen statt des Slashes ein:</p>
<pre class="brush: bash;">

auth.require = (&quot;/subdir/&quot; =&gt; (
                                  &quot;method&quot;  =&gt; &quot;basic&quot;,
                                  &quot;realm&quot;   =&gt; &quot;admin&quot;,
                                  &quot;require&quot; =&gt; &quot;valid-user&quot;
                                  )
            )
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/10/http-authentifizierung-mit-lighttpd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deployment mit ANT</title>
		<link>http://webpiraten.de/index.php/2009/10/deployment-mit-an/</link>
		<comments>http://webpiraten.de/index.php/2009/10/deployment-mit-an/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 20:39:17 +0000</pubDate>
		<dc:creator>sägefisch</dc:creator>
				<category><![CDATA[ANT]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[stage]]></category>

		<guid isPermaLink="false">http://webpiraten.de/?p=104</guid>
		<description><![CDATA[ANT ist ein wunderbares Kommandozeilen-Tool mit dem man Deployment gerade auch von Webapplikationen automatisieren kann. Ich benutze es um Entwicklungsstände in die Stage oder Liveumgebung auszuspielen. Zur Konfiguration des Deploymentprozesses erzeugt man eine build.xml Datei, die alle nötigen Anweisungen enthält. Folgende XML Datei erzeugt einen Backup-Ordner und kopiert die aktuelle Live-Applikation dort hinein. Desweiteren erzeugt [...]]]></description>
			<content:encoded><![CDATA[<p>ANT ist ein wunderbares Kommandozeilen-Tool mit dem man Deployment gerade auch von Webapplikationen automatisieren kann.</p>
<p>Ich benutze es um Entwicklungsstände in die Stage oder Liveumgebung auszuspielen.</p>
<p>Zur Konfiguration des Deploymentprozesses erzeugt man eine <strong>build.xml</strong> Datei, die alle nötigen Anweisungen enthält.</p>
<p>Folgende XML Datei erzeugt einen Backup-Ordner und kopiert die aktuelle Live-Applikation dort hinein.</p>
<p>Desweiteren erzeugt das Skript einen Datenbank Dump und kopiert diesen ebenfalls dorthin.</p>
<p>Danach wird der aktuelle Entwicklungsstand in den Live-Ordner kopiert.</p>
<p>Zu guter Letzt werden noch die Log- und Cache-Ordner geleert.</p>
<pre class="brush: xml;">

&lt;project name=&quot;builder&quot; default=&quot;build&quot; basedir=&quot;.&quot;&gt;
    &lt;description&gt;
        devel to live update including dbdump and clear cache
    &lt;/description&gt;

    &lt;!-- set global properties for this build --&gt;
    &lt;property name=&quot;devel&quot; location=&quot;devel&quot;/&gt;
    &lt;property name=&quot;live&quot; location=&quot;live&quot;/&gt;
    &lt;property name=&quot;backup&quot; location=&quot;backup&quot;/&gt;

    &lt;property name=&quot;db_host&quot; value=&quot;localhost&quot;/&gt;
    &lt;property name=&quot;db&quot; value=&quot;databasename&quot;/&gt;
    &lt;property name=&quot;db_user&quot; value=&quot;databaseuser&quot;/&gt;
    &lt;property name=&quot;db_pass&quot; value=&quot;databasepassword&quot;/&gt;

    &lt;target name=&quot;build&quot;&gt;
        &lt;!-- create the timestamp --&gt;
        &lt;tstamp/&gt;

        &lt;!-- create the backup dir --&gt;
        &lt;mkdir dir=&quot;${backup}_${DSTAMP}&quot;/&gt;

        &lt;!-- dumb db to backup dir --&gt;
        &lt;echo message=&quot;create mysqldump&quot;/&gt;
        &lt;exec executable=&quot;mysqldump&quot; output=&quot;${backup}_${DSTAMP}/dump_${db}.sql&quot;&gt;
            &lt;arg value=&quot;${db}&quot;/&gt;
            &lt;arg value=&quot;-u${db_user}&quot;/&gt;
            &lt;arg value=&quot;-p${db_pass}&quot;/&gt;
        &lt;/exec&gt;

        &lt;!-- copy current live dir to backup dir --&gt;
        &lt;copy todir=&quot;${backup}_${DSTAMP}&quot;&gt;
            &lt;fileset dir=&quot;${live}&quot;/&gt;
        &lt;/copy&gt;

        &lt;!-- copy current devel dir to live dir --&gt;
        &lt;copy todir=&quot;${live}&quot;&gt;
            &lt;fileset dir=&quot;${devel}&quot; excludes=&quot;**/*index.php&quot;/&gt;&lt;!-- beware overiding main config index.php --&gt;
        &lt;/copy&gt;

        &lt;!-- delete cache/log files --&gt;
        &lt;echo message=&quot;cleanup cache/logs in backup/live&quot;/&gt;
        &lt;delete includeemptydirs=&quot;true&quot;&gt;
            &lt;fileset dir=&quot;${backup}_${DSTAMP}/application/cache&quot; includes=&quot;**/*&quot;/&gt;
            &lt;fileset dir=&quot;${backup}_${DSTAMP}/application/logs&quot; includes=&quot;**/*&quot;/&gt;
             &lt;fileset dir=&quot;${live}/application/cache&quot; includes=&quot;**/*&quot;/&gt;
            &lt;fileset dir=&quot;${live}/application/logs&quot; includes=&quot;**/*&quot;/&gt;
        &lt;/delete&gt;
    &lt;/target&gt;
&lt;/project&gt;
</pre>
<p>Dieses Skript wird auf der Kommandozeile von Linux ausgeführt.</p>
<p>ANT sucht per default nach einer <strong>build.xml</strong> im ausführenden Ordner.</p>
<pre class="brush: bash;">

user@server:~/pages$ ant

Buildfile: build.xml

build:
    [mkdir] Created dir: /home/user/pages/backup_20091027
     [echo] create mysqldump
     [copy] Copying 1153 files to /home/user/pages/backup_20091027
     [copy] Copied 261 empty directories to 5 empty directories under /home/user/pages/backup_20091027
     [copy] Copying 50 files to /home/user/pages/live
     [echo] cleanup cache/logs in backup/live

BUILD SUCCESSFUL
Total time: 27 seconds
</pre>
]]></content:encoded>
			<wfw:commentRss>http://webpiraten.de/index.php/2009/10/deployment-mit-an/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
