<?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>naji-dev &#187; Multiple Installation</title>
	<atom:link href="http://www.naji-dev.de/tag/multiple-installation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.naji-dev.de</link>
	<description>Einfach genial...</description>
	<lastBuildDate>Mon, 08 Mar 2010 22:34:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Multiple Symfony Installationen</title>
		<link>http://www.naji-dev.de/2009/12/27/multiple-symfony-installationen/</link>
		<comments>http://www.naji-dev.de/2009/12/27/multiple-symfony-installationen/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 18:51:29 +0000</pubDate>
		<dc:creator>Naji</dc:creator>
				<category><![CDATA[Webentwicklung]]></category>
		<category><![CDATA[Multiple Installation]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://www.naji-dev.de/?p=245</guid>
		<description><![CDATA[Da die Installation mit Hilfe von PEAR nur eine einzige Version von Symfony zulässt, wählen wir den Weg über das svn-repository (natürlich könnte man an dieser Stelle auch die tar.gz Archive von der Seite nehmen).
Wir legen also einen Ordner symfony unter /usr/share/php an und checken die einzelnen Versionen von Symfony aus. Für meine Projekte benötige [...]]]></description>
			<content:encoded><![CDATA[<p>Da die Installation mit Hilfe von PEAR nur eine einzige Version von Symfony zulässt, wählen wir den Weg über das svn-repository (natürlich könnte man an dieser Stelle auch die tar.gz Archive von der Seite nehmen).</p>
<p>Wir legen also einen Ordner <strong>symfony</strong> unter <strong>/usr/share/php</strong> an und checken die einzelnen Versionen von Symfony aus. Für meine Projekte benötige ich <strong>1.2</strong>, <strong>1.3</strong> und <strong>1.4</strong>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> symfony
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.symfony-project.com<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.2</span><span style="color: #000000; font-weight: bold;">/</span> symfony12
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.symfony-project.com<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.3</span><span style="color: #000000; font-weight: bold;">/</span> symfony13
<span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #c20cb9; font-weight: bold;">co</span> http:<span style="color: #000000; font-weight: bold;">//</span>svn.symfony-project.com<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.4</span><span style="color: #000000; font-weight: bold;">/</span> symfony14</pre></td></tr></table></div>

<p>Jetzt <strong>könnten</strong> wir mit</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <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>symfony <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>symfony<span style="color: #000000; font-weight: bold;">/</span>symfony14<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>symfony</pre></td></tr></table></div>

<p>fest auf die neuste Version von Symfony linken. Allerdings ist das nicht die beste Variante, da man eventuell in einem Symfony-Projekt einer anderen Version arbeitet &#8211; was uns zu der Umständlichkeit von <strong>./symfony</strong> führt. Für mich persönlich ist das nicht akzeptabel, weil ich das einfach immer falsch mache.</p>
<p>Bei dem Anlegen eines Symfony-Projekts wird ein kleines php-Script angelegt, das die in <strong>config/ProjectConfiguration.class.php</strong> hinterlegte Symfony-Version nutzt. Also wird ein kleines Script benötigt, das diese Gegebenheit ausnutzt. Folgendes Script kommt also in <strong>/usr/bin/symfony</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/env php</span>
&nbsp;</pre></td></tr></table></div>

<p>Befindet man sich in einem Symfony-Projekt-Ordner benutzt das Script das im Ordner hinterlegte <strong>symfony</strong>, andernfalls eine Fallback-Variante <em>(in diesem Fall Symfony in Version <strong>1.4</strong>)</em>.</p>
<p>Somit haben wir den vollen Komfort erlangt &#8211; falls es noch schöner geht, hinterlasst doch einen Kommentar <img src='http://www.naji-dev.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Falls man aber explizit eine Symfony-Version benötigt <i>(zum Beispiel beim Anlegen eines neuen Projekts, die nicht der Standard-Version &#8211; also der Fallback-Version unseres Scripts &#8211; entspricht)</i>, sind folgende Symlinks noch nützlich:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <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>symfony12 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>symfony<span style="color: #000000; font-weight: bold;">/</span>symfony12<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>symfony
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <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>symfony13 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>symfony<span style="color: #000000; font-weight: bold;">/</span>symfony13<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>symfony
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <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>symfony14 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>share<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>symfony<span style="color: #000000; font-weight: bold;">/</span>symfony14<span style="color: #000000; font-weight: bold;">/</span>data<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>symfony</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.naji-dev.de/2009/12/27/multiple-symfony-installationen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<img style='margin:0;padding:0;border:0;' width='1px' height='1px' src="http://www.naji-dev.de/wp-content/plugins/mystat/mystat.php?act=time_load&id=110306&rnd=1640452894" /></channel>
</rss>
