<?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>Journal « Raphael Kallensee &#187; rails</title>
	<atom:link href="http://raphael.kallensee.name/journal/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://raphael.kallensee.name/journal</link>
	<description>Web, Mobile, Design, Music.</description>
	<lastBuildDate>Sun, 08 Jan 2012 18:00:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://rkallensee.superfeedr.com/" />
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com/" />
			<item>
		<title>Installation von Redmine und Git unter Ubuntu</title>
		<link>http://raphael.kallensee.name/journal/installation-von-redmine-und-git-unter-ubuntu/</link>
		<comments>http://raphael.kallensee.name/journal/installation-von-redmine-und-git-unter-ubuntu/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 20:55:52 +0000</pubDate>
		<dc:creator>Raphael Kallensee</dc:creator>
				<category><![CDATA[WebDevelopment]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[FLOSS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://raphael.kallensee.name/journal/?p=241</guid>
		<description><![CDATA[Auf der Suche nach einer Alternative zur Software-Projektverwaltungssoftware Trac landete ich bei Redmine, einer in Ruby bzw. mit Hilfe von Rails geschriebenen Software. Die Features lassen sich sehen &#8211; vor allem die Multiprojekt-Unterstützung, Kalender und Gantt-Diagramm, Zeiterfassung und gute Unterstützung für Git sind im Vergleich zur Trac herausragend. Wie sich während der Installation herausstellte, ist [...]]]></description>
			<content:encoded><![CDATA[<p>Auf der Suche nach einer Alternative zur Software-Projektverwaltungssoftware <a href="http://trac.edgewall.org/">Trac</a> landete ich bei <a href="http://www.redmine.org/">Redmine</a>, einer in Ruby bzw. mit Hilfe von Rails geschriebenen Software. Die <a href="http://www.redmine.org/wiki/redmine/Features">Features</a> lassen sich sehen &#8211; vor allem die Multiprojekt-Unterstützung, Kalender und Gantt-Diagramm, Zeiterfassung und gute Unterstützung für <a href="http://git-scm.com/">Git</a> sind im Vergleich zur Trac herausragend. Wie sich während der Installation herausstellte, ist auch das Authentifizierungs-Feature für SVN und Git via WebDAV absolut praktisch &#8211; über die Rechte der Projektteilnehmer in Redmine wird automatisch auch der Lese- und Schreibzugriff im Versionskontrollsystem gesteuert, die Benutzer müssen also nur an einer Stelle gepflegt werden.</p>
<p>Für alle, die Redmine installieren möchten, hier ein paar meiner Erfahrungen. Die Installation erfolgte auf einem System mit Ubuntu 9.10 Server, es wird ein Apache-HTTP-Server und MySQL vorausgesetzt. Es gibt viele Möglichkeiten, eine Ruby/Rails-Anwendung zu installieren &#8211; ich habe mich für die Variante mit Apache und <a href="http://www.modrails.com">Passenger</a> (mod_rails) entschieden. </p>
<p>Damit Ruby/Rails-Anwendungen via Apache ausgeführt werden können, wird Passenger (&#8220;mod_rails&#8221;) installiert. Passenger ist auch in den Paketquellen von Ubuntu zu finden<del datetime="2010-08-13T21:22:37+00:00">, jedoch will apt für die Installation den bei mir installierten apache2-mpm-prefork sowie php5 deinstallieren</del>.</p>
<p><strong>Update:</strong> Da seit Ubuntu 10.04 das in den Paketquellen enthaltene Passenger-Modul auch mit dem apache2-mpm-prefork kompatibel ist (der für PHP5 notwendig ist), kann das Modul nun auch direkt über die Paketquellen installiert werden &#8211; was die Installation erheblich verkürzt. Siehe den entsprechenden Abschnitt unten.</p>
<h3>Installation von Passenger und weiteren Dependencies unter Ubuntu 9.10</h3>
<p>Zuerst werden die für Redmine benötigten Pakete installiert.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ruby rails rubygems ruby1.8-dev libgemplugin-ruby libgemplugin-ruby1.8 libruby-extras libruby1.8-extras rubygems1.8 rake apache2-threaded-dev libapache-dbi-perl libapache2-mod-perl2 libdigest-sha1-perl libopenssl-ruby build-essential</pre></div></div>

<p><em>Hinweis: bei mir wurde die über die Paketverwaltung installierte Version von Rails später nicht erkannt &#8211; und generell sollte man Rails möglichst nur auf eine Art und Weise installieren, entweder via Paketverwaltung oder gem. Deshalb sollte &#8220;rails&#8221; eventuell lieber gleich weggelassen werden. Installation via gem siehe unten.</em></p>
<p>Dann wird ein virtueller Apache-Host angelegt, dazu wird z.B. das Verzeichnis /var/www/redmine.example.lit/redmine angelegt.</p>
<p>Unter Ubuntu 9.10 ist das in den Paketquellen enthaltene Passenger-Apache-Modul nicht mit dem apache2-mpm-prefork kompatibel &#8211; der wiederum ist für PHP5 erforderlich. Deshalb habe ich mich für die Installation via <a href="http://de.wikipedia.org/wiki/RubyGems">gem</a> entschieden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> passenger</pre></div></div>

<p>Nach der Installation muss das Apache-Modul kompiliert werden, die benötigten Pakete sollten alle bereits installiert sein. Um das Modul zu erstellen, wird folgendes ausgeführt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>gems<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">1.8</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>passenger-install-apache2-module</pre></div></div>

<p>Nun wird man durch den Kompiliervorgang des Moduls geführt, eventuell fehlende Abhängigkeiten werden beschrieben und notwendige Schritte erläutert. Danach ist das apache2-Modul kompiliert und muss noch aktiviert werden. Dazu wird die Datei /etc/apache2/mods-available/passenger.load mit folgendem Inhalt angelegt:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">LoadModule</span> passenger_module /var/lib/gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-2.2.9/ext/apache2/mod_passenger.so</pre></div></div>

<p>Nun wird noch die Modul-Konfigurationsdatei (/etc/apache2/mods-available/passenger.conf) mit folgendem Inhalt angelegt:</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">PassengerRoot /var/lib/gems/<span style="color: #ff0000;">1.8</span>/gems/passenger-2.2.9
PassengerRuby /usr/bin/ruby1.8</pre></div></div>

<p><em>(Die Pfade können bei neueren Versionen oder anderen Distributionen abweichen.)</em></p>
<p>Nun muss das Modul noch aktiviert und Apache neu gestartet werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod passenger
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre></div></div>

<h3>Installation von Passenger ab Ubuntu 10.04</h3>
<p>Ab Ubuntu 10.04 können fast alle Abhängigkeiten (inkl. Passenger) direkt über die Paketverwaltung installiert werden:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> ruby rails rubygems ruby1.8-dev libgemplugin-ruby libgemplugin-ruby1.8 libruby-extras libruby1.8-extras rubygems1.8 rake libapache-dbi-perl libapache2-mod-perl2 libdigest-sha1-perl libopenssl-ruby libapache2-mod-passenger</pre></div></div>

<p><em>Hinweis: bei mir wurde die über die Paketverwaltung installierte Version von Rails später nicht erkannt &#8211; und generell sollte man Rails möglichst nur auf eine Art und Weise installieren, entweder via Paketverwaltung oder gem. Deshalb sollte &#8220;rails&#8221; eventuell lieber gleich weggelassen werden. Installation via gem siehe unten.</em></p>
<h3>Installation von Redmine</h3>
<p>Jetzt kann Redmine heruntergeladen werden. Für einfache spätere Updates wird das Auschecken des stable-Branchs via SVN oder git empfohlen. Dann reicht später ein Update über das Versionskontrollsystem zur Aktualisierung. <em>Wem die Installation via Paketverwaltung lieber ist, kann Redmine seit Ubuntu 10.04 auch direkt aus den Paketquellen installieren, hat ggf. aber nicht die aktuellste Version. Dafür reicht ein &#8220;aptitude install redmine redmine-mysql&#8221; (für die Verwendung mit MySQL als Datenbank). Mehr im <a href="http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_Ubuntu#Ubuntu-104-using-Passenger">offiziellen How-To</a>.</em></p>
<p>Für die Installation via SVN wird der aktuelle stabile Zweig ausgecheckt:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><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>redmine.rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>branches<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.9</span>-stable<span style="color: #000000; font-weight: bold;">/</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>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Nach dem Checkout sollte der Besitzer dieses Verzeichnisses und aller Unterordner/Dateien geändert werden. Entweder wird ein eigener Benutzer für Redmine angelegt oder es wird der Benutzer des Webservers (&#8220;www-data&#8221;) verwendet. Hintergrund: Passenger führt die Anwendung später mit diesem Benutzer aus! Deshalb sollte dies keinesfalls root sein.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data <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>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Ich habe mich für MySQL als Datenbank entschieden, es steht aber unter anderem auch SQLite zur Verfügung. Vorbereitend wird nun eine Datenbank (z.B. via phpMyAdmin) erstellt, ggf. mit eigenem DB-Benutzer:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">CREATE DATABASE <span style="color: #000000; font-weight: bold;">`</span>redmine<span style="color: #000000; font-weight: bold;">`</span> DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;</pre></div></div>

<p>Dann muss eine DB-Konfigurationsdatei aus der Beispieldatei erstellt und im Bereich &#8220;production&#8221; die richtigen DB-Verbindungsdaten angegeben werden:</p>

<div class="wp_syntax"><div 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>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> database.yml.example database.yml
<span style="color: #c20cb9; font-weight: bold;">nano</span> database.yml</pre></div></div>

<p>Anschließend wird der Mailversand konfiguriert:</p>

<div class="wp_syntax"><div 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>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> email.yml.example email.yml
<span style="color: #c20cb9; font-weight: bold;">nano</span> email.yml</pre></div></div>

<p>Dort muss bei Verwendung von sendmail nur folgendes eingetragen werden:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">production:
  delivery_method: <span style="color:#ff3333; font-weight:bold;">:sendmail</span></pre></div></div>

<p>Bei der verwendeten SVN-Version muss noch ein Session-secret erzeugt werden, dies ist wohl bei den &#8220;richtigen Releases&#8221; nicht notwendig:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rake generate_session_store</pre></div></div>

<p>Nun wird die Datenbankstruktur erzeugt und die Standard-Konfiguration in die Datenbank geschrieben. Dazu wird folgendes (im Wurzelverzeichnis der Installation) aufgerufen:</p>

<div class="wp_syntax"><div 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>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> rake db:migrate <span style="color: #007800;">RAILS_ENV</span>=<span style="color: #ff0000;">&quot;production&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> rake redmine:load_default_data <span style="color: #007800;">RAILS_ENV</span>=<span style="color: #ff0000;">&quot;production&quot;</span></pre></div></div>

<p>Sollte die folgende folgende Fehlermeldung erscheinen:</p>
<blockquote><p>Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.</p></blockquote>
<p>oder die folgende:</p>
<blockquote><p>The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted!</p></blockquote>
<p>muss Rails (wie oben erwähnt) oder der MySQL-Treiber für Rails noch wie beschrieben installiert werden. Außerdem muss ruby-openid installiert sein, damit das OpenID-Feature genutzt werden kann.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-v</span>=2.3.5 rails
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql
<span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> ruby-openid</pre></div></div>

<p>Nun kann der virtuelle Apache-Host nach folgendem Muster konfiguriert werden (z.B. /etc/apache2/sites-available/redmine.example.lit):</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">   &lt;<span style="color: #000000; font-weight:bold;">virtualhost</span> *:<span style="color: #ff0000;">80</span>&gt;
      <span style="color: #00007f;">ServerName</span> redmine.example.lit
      <span style="color: #00007f;">DocumentRoot</span> /var/www/redmine.example.lit/redmine/public
      &lt;<span style="color: #000000; font-weight:bold;">directory</span> /var/www/redmine.example.lit/redmine/public&gt;
         <span style="color: #00007f;">AllowOverride</span> <span style="color: #0000ff;">all</span>
         <span style="color: #00007f;">Options</span> -MultiViews
      &lt;/<span style="color: #000000; font-weight:bold;">directory</span>&gt;
   &lt;/<span style="color: #000000; font-weight:bold;">virtualhost</span>&gt;</pre></div></div>

<p>Nach dem Aktivieren des virtuellen Hosts und dem Neuladen der Apache-Konfiguration mittels</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> a2ensite redmine.example.lit
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 reload</pre></div></div>

<p>ist Redmine über die entsprechende (Sub-)Domain erreichbar. Nun kann Redmine über die Oberfläche konfiguriert werden. Die Administrator-Zugangsdaten sind admin/admin (und sollten gleich geändert werden).</p>
<h3>Einrichten eines öffentlich lesbaren GIT-Repositorys via HTTP/WebDAV mit Redmine als Zugriffskontrolle</h3>
<p>Nach dem Anlegen einiger Projekte habe ich für diese ein Git-Repository angelegt. Git wird der Einfachheit halber für die Nutzung via HTTP/WebDAV konfiguriert, auch wenn dies deutlich weniger performant als die anderen zur Verfügung stehenden Varianten ist. Ein weiterer Vorteil ist die Erreichbarkeit auch aus Umgebungen mit restriktiven Firewalls. Außerdem kann so die anfangs erwähnte Authentifizierung via Redmine genutzt werden.</p>
<p>Falls noch nicht vorhanden, muss git installiert werden.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> git-core</pre></div></div>

<p>Von einem installierten Apache2 mit mod_dav wird ausgegangen. Zuerst wird &#8211; am Besten außerhalb der DocumentRoot &#8211; ein Verzeichnis für das Repository angelegt. Danach wird ein git-Repository in diesem Ordner erstellt, das durch die Option &#8211;bare nicht mit einer Arbeitskopie in Verbindung steht. Anschließend wird der Benutzer und die Gruppe des Webservers als Eigentümer des Verzeichnisses gesetzt, bei Debian und Ubuntu ist dies &#8220;www-data&#8221;.</p>
<p>Wichtig ist, dass der Name des Repository-Ordners mit dem existierenden GIT-Projekt-Identifier übereinstimmt, damit Redmine später die Zuordnung gelingt.</p>

<div class="wp_syntax"><div 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>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #c20cb9; font-weight: bold;">git</span>
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #c20cb9; font-weight: bold;">git</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> example-project
<span style="color: #7a0874; font-weight: bold;">cd</span> example-project
<span style="color: #c20cb9; font-weight: bold;">git</span> <span style="color: #660033;">--bare</span> init
<span style="color: #7a0874; font-weight: bold;">cd</span> ..
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> www-data:www-data example-project</pre></div></div>

<p>Nun wird die Zugriffskontrolle via Redmine eingerichtet. Dazu wird erst einmal mod_perl, mod_dav und weitere Abhängigkeiten installiert und die erforderlichen Module aktiviert. Redmine stellt zur Authentifizierung ein Perl-Modul bereit.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">aptitude</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod dav
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod dav_fs
<span style="color: #c20cb9; font-weight: bold;">sudo</span> a2enmod <span style="color: #c20cb9; font-weight: bold;">perl</span></pre></div></div>

<p>Dann wird das Redmine-Perl-Modul an die richtige Stelle verlinkt:</p>

<div class="wp_syntax"><div 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>var<span style="color: #000000; font-weight: bold;">/</span>www<span style="color: #000000; font-weight: bold;">/</span>redmine.example.lit<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>Redmine.pm <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>perl5<span style="color: #000000; font-weight: bold;">/</span>Apache<span style="color: #000000; font-weight: bold;">/</span>Redmine.pm</pre></div></div>

<p>Nun muss ein virtueller Apache-Host für den Zugriff konfiguriert werden. Dazu wird z.B. ein neuer virtueller Apache-Host nach folgendem Muster konfiguriert (im unteren Teil den Namen sowie die Zugangsdaten für die Datenbank einsetzen). Das Verzeichnis, das als DocumentRoot angegeben ist, sollte existieren.</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">   &lt;<span style="color: #000000; font-weight:bold;">virtualhost</span> *:<span style="color: #ff0000;">80</span>&gt;
      <span style="color: #00007f;">ServerName</span> code.example.lit
      <span style="color: #00007f;">DocumentRoot</span> /var/www/redmine.example.lit/code
&nbsp;
      PerlLoadModule Apache::Redmine
&nbsp;
      <span style="color: #00007f;">Alias</span> /git /var/www/redmine.example.lit/git
&nbsp;
      &lt;<span style="color: #000000; font-weight:bold;">location</span> /git&gt;
          <span style="color: #00007f;">DAV</span> <span style="color: #0000ff;">on</span>
&nbsp;
          <span style="color: #00007f;">AuthType</span> Basic
          <span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span>
          <span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;Git&quot;</span>
&nbsp;
          <span style="color: #00007f;">Options</span> +<span style="color: #0000ff;">Indexes</span> -ExecCGI -<span style="color: #0000ff;">Includes</span>
&nbsp;
          PerlAccessHandler Apache::Authn::Redmine::access_handler
          PerlAuthenHandler Apache::Authn::Redmine::authen_handler
&nbsp;
          RedmineDSN <span style="color: #7f007f;">&quot;DBI:mysql:database=redmine;host=localhost&quot;</span>
          RedmineDbUser <span style="color: #7f007f;">&quot;username&quot;</span>
          RedmineDbPass <span style="color: #7f007f;">&quot;password&quot;</span>
      &lt;/<span style="color: #000000; font-weight:bold;">location</span>&gt;
   &lt;/<span style="color: #000000; font-weight:bold;">virtualhost</span>&gt;</pre></div></div>

<p>Anschließend ist das Git-Repository des Projekts &#8220;example-project&#8221; &#8211; jedenfalls laut Beispielkonfiguration &#8211; unter code.example.lit/git/example-project erreichbar. Falls das Projekt in Redmine auf &#8220;öffentlich&#8221; geschaltet ist, kann jeder auf dieses Repository lesend zugreifen. Schreibzugriffe haben alle Redmine-Benutzer, die dem Projekt als Mitglied zugeordnet sind.</p>
<p>Damit der Repository-Browser von Redmine das Repository findet, kann es eventuell nötig sein, in der Projektkonfiguration für das Repository &#8220;Git&#8221; auszuwählen und den (lokalen!) Pfad anzugeben, z.B. /var/www/redmine.example.lit/git/example-project</p>
<p>Sollte beim Anzeigen des Repositories in Redmine ein Fehler auftreten, kann dies daran liegen, dass es noch keinen Commit gab.</p>
<p>Weiterführende Hinweise finden sich auf folgenden Seiten: </p>
<ul>
<li><a href="http://www.redmine.org/wiki/redmine/RedmineInstall">http://www.redmine.org/wiki/redmine/RedmineInstall</a></li>
<li><a href="http://www.modrails.com/documentation/Users%20guide.html">http://www.modrails.com/documentation/Users%20guide.html</a></li>
<li><a href="http://wiki.ousli.org/index.php/RedmineUbuntu">http://wiki.ousli.org/index.php/RedmineUbuntu</a></li>
<li><a href="http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_in_Ubuntu">http://www.redmine.org/wiki/redmine/HowTo_Install_Redmine_ in_Ubuntu</a></li>
<li><a href="https://help.ubuntu.com/community/RubyOnRails">https://help.ubuntu.com/community/RubyOnRails</a></li>
<li><a href="http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/">http://www.railsgarden.com/2008/04/12/configurating-passenger-mod_rails-on-slicehost-with-ubuntu-710/</a></li>
<li><a href="http://library.linode.com/development/project-management/redmine/ubuntu-9.10.txt">http://library.linode.com/development/project-management/redmine/ubuntu-9.10.txt</a></li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt">http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt</a></li>
<li><a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository">http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#setting-up-a-public-repository</a></li>
<li><a href="http://www.redmine.org/wiki/1/Repositories_access_control_with_apache_mod_dav_svn_and_mod_perl">http://www.redmine.org/wiki/1/Repositories_access_control_ with_apache_mod_dav_svn_and_mod_perl</a></li>
<li><a href="http://www.redmine.org/wiki/redmine/RedmineRepositories">http://www.redmine.org/wiki/redmine/RedmineRepositories</a></li>
<li><a href="http://www.simonecarletti.com/blog/2009/07/configuring-git-repository-with-redmine/">http://www.simonecarletti.com/blog/2009/07/configuring-git-repository-with-redmine/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://raphael.kallensee.name/journal/installation-von-redmine-und-git-unter-ubuntu/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>

