<?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>Actinux &#187; ruby</title>
	<atom:link href="http://www.actinux.org/index.php/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.actinux.org</link>
	<description>La réponse libre à un monde libre</description>
	<lastBuildDate>Tue, 09 Feb 2010 10:53:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installer un serveur Redmine sur Centos 5.2</title>
		<link>http://www.actinux.org/index.php/2009/03/24/installer-un-serveur-redmine-sur-centos-52/</link>
		<comments>http://www.actinux.org/index.php/2009/03/24/installer-un-serveur-redmine-sur-centos-52/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 08:52:38 +0000</pubDate>
		<dc:creator>bpa</dc:creator>
				<category><![CDATA[Tutos]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[redmine]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.actinux.org/?p=11</guid>
		<description><![CDATA[Le but de cet article est d'écrire le processus d'installation d'un serveur <a href="http://www.redmine.org" target="_blank">RedMine </a>sur une Centos 5.2]]></description>
			<content:encoded><![CDATA[<p>Le but de cet article est d&#8217;écrire le processus d&#8217;installation d&#8217;un serveur <a href="http://www.redmine.org" target="_blank">RedMine </a>sur une Centos 5.2</p>
<h2>Description de RedMine</h2>
<p>Redmine est un outil de gestion de projet en Web. Il est écrit en utilisant le framework &laquo;&nbsp;Ruby on Rails&nbsp;&raquo;. Il est multi-plateforme et fonctionne avec plusieurs bases de données.<br />
<span id="more-11"></span></p>
<p>Redmine est un projet Open Source sous licence GNU General Public License v2 (GPL).</p>
<p>Les fonctionnalités :</p>
<ul>
<li> gestion multi-projets</li>
<li> gestion fine des droits utilisateurs définis par des rôles</li>
<li> rapports de bugs, demandes d&#8217;évolutions</li>
<li> Wiki multi-projets</li>
<li> forums multi-projets</li>
<li> Flux RSS / ATOM</li>
<li> Notifications par email</li>
<li> Gestion de feuilles de route, GANTT, calendrier</li>
<li> Historique</li>
<li> Intégration avec divers suivis de versions : SVN, CVS, Mercurial, Git, Bazaar &amp; Darcs</li>
<li> Identification possible via LDAP</li>
<li> Multilingue (25 langues)</li>
<li> Support de plusieurs bases de données : MySQL, PostgreSQL ou SQLite</li>
</ul>
<h2>Installation des Prés-requis</h2>
<p>Installer Ruby on Rails 2.2.2 sur Centos 5.2</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> ruby ruby-devel ruby-libs-RDOC irb ruby-mysql ruby-rdoc</pre></div></div>

<h3>Télécharger et installer Ruby</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">45905</span><span style="color: #000000; font-weight: bold;">/</span>rubygems-1.3.1.tgz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvf rubygems-1.3.1.tgz
<span style="color: #7a0874; font-weight: bold;">cd</span> rubygems-1.3.1
ruby setup.rb</pre></div></div>

<h3>Installer le framework Rails</h3>

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

<h3>Installer le serveur MySQL</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> mysql-server
service mysqld start</pre></div></div>

<h3>Installer et configurer Subversion</h3>

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

<h2>Installation de Redmine</h2>

<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>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>rubyforge.org<span style="color: #000000; font-weight: bold;">/</span>frs<span style="color: #000000; font-weight: bold;">/</span>download.php<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">52944</span><span style="color: #000000; font-weight: bold;">/</span>redmine-0.8.2.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> redmine-0.8.2.tar.gz
<span style="color: #c20cb9; font-weight: bold;">mv</span> redmine-0.8.2 <span style="color: #000000; font-weight: bold;">/</span>opt
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>redmine<span style="color: #000000; font-weight: bold;">*</span>
adduser redmine
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> redmine. <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>redmine</pre></div></div>

<h3>Créer une base de donnée MySQL</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-u</span> root
create database redmine character <span style="color: #000000; font-weight: bold;">set</span> utf8;</pre></div></div>

<h3>Modifier le fichier de configuration de connexion MySQL</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> config<span style="color: #000000; font-weight: bold;">/</span>database.yml.example config<span style="color: #000000; font-weight: bold;">/</span>database.yml
<span style="color: #c20cb9; font-weight: bold;">vi</span> config<span style="color: #000000; font-weight: bold;">/</span>database.yml</pre></div></div>

<p>Exemple pour une base MySQL</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">production:
adapter: mysql
database: redmine
host: localhost
username: bduser
password: bdpasswd
socket:<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>mysql<span style="color: #000000; font-weight: bold;">/</span>mysql.sock</pre></div></div>

<h3>Créer la structure de la base de donnée</h3>

<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>opt<span style="color: #000000; font-weight: bold;">/</span>redmine
rake db:migrate <span style="color: #007800;">RAILS_ENV</span>=<span style="color: #ff0000;">&quot;production&quot;</span></pre></div></div>

<h3>Insérer des données de pré-configuration (cette étape est facultative mais fortement recommandée)</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rake redmine:load_default_data <span style="color: #007800;">RAILS_ENV</span>=<span style="color: #ff0000;">&quot;production&quot;</span></pre></div></div>

<h3>Modifier les droits de l&#8217;utilisateur redmine</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> tmp public<span style="color: #000000; font-weight: bold;">/</span>plugin_assets
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> redmine. files log tmp public<span style="color: #000000; font-weight: bold;">/</span>plugin_assets
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #660033;">-R</span> <span style="color: #000000;">755</span> files log tmp public<span style="color: #000000; font-weight: bold;">/</span>plugin_assets</pre></div></div>

<h3>Démarrer le serveur</h3>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ruby script<span style="color: #000000; font-weight: bold;">/</span>server webrick <span style="color: #660033;">-e</span> production</pre></div></div>

<p>Vous pouvez tester que votre serveur fonctionne :</p>
<p><strong>http://ipduserveur:3000</strong></p>
<p>Login et mot de passe par défaut:</p>
<blockquote><p>Login: admin<br />
Mot de passe: admin</p></blockquote>
<h4>Ajouter les librairies ImageMagick</h4>
<p>Cette étape est nécessaire pour la réalisation des diagramme de Gantt</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
<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><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>src
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>ftp.imagemagick.org<span style="color: #000000; font-weight: bold;">/</span>pub<span style="color: #000000; font-weight: bold;">/</span>ImageMagick<span style="color: #000000; font-weight: bold;">/</span>ImageMagick.tar.gz
<span style="color: #c20cb9; font-weight: bold;">tar</span> xvfz ImageMagick.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> ImageMagick<span style="color: #000000; font-weight: bold;">*</span>
.<span style="color: #000000; font-weight: bold;">/</span>configure
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>lib <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">wc</span> -l<span style="color: #000000; font-weight: bold;">`</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;/usr/local/lib&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ld.so.conf
ldconfig
gem <span style="color: #c20cb9; font-weight: bold;">install</span> rmagick <span style="color: #660033;">-r</span> <span style="color: #660033;">--no-ri</span> <span style="color: #660033;">--no-rdoc</span></pre></div></div>

<h2>Ajouter la gestion automatique des dépot SVN</h2>
<p>Redmine est capable de gérer automatiquement la création de vos dépots SVN; de plus, en fonction du type de projet (public ou privé) les dépots seront accessibles aux membres uniquement.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> mod_dav_svn mod_perl perl-Apache-DBI perl-Digest-SHA1 perl-DBD-mysql
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> root.apache <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span>
yum <span style="color: #c20cb9; font-weight: bold;">install</span> mod_dav_svn</pre></div></div>

<p>Récupérer une version plus récente de Redmine.pm</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>tmp
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>redmine.rubyforge.org<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>trunk<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>Redmine.pm
<span style="color: #c20cb9; font-weight: bold;">cp</span> Redmine.pm <span style="color: #000000; font-weight: bold;">/</span>opt<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><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">mv</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>vendor_perl<span style="color: #000000; font-weight: bold;">/</span>5.8.8<span style="color: #000000; font-weight: bold;">/</span>Apache<span style="color: #000000; font-weight: bold;">/</span></pre></div></div>

<p>Corriger une petit problème sur un des fichers ruby:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>opt<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><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>reposman.rb</pre></div></div>

<p>Ajouter :</p>
<blockquote><p>require &#8216;rdoc/ri/ri_paths&#8217;</p></blockquote>
<p>Avant le bloc:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">require <span style="color: #ff0000;">'getoptlong'</span>
require <span style="color: #ff0000;">'rdoc/usage'</span>
require <span style="color: #ff0000;">'soap/wsdlDriver'</span>
require <span style="color: #ff0000;">'find'</span>
require <span style="color: #ff0000;">'etc'</span></pre></div></div>

<p>Editer le fichier /etc/httpd/conf.d/subversion.conf et ajouter à la fin:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DAV <span style="color: #c20cb9; font-weight: bold;">svn</span>
SVNParentPath <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span>
SVNListParentPath on</pre></div></div>

<p>Créer une fichier redmine.conf dans /etc/httpd/conf.d</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/</span>svn-private<span style="color: #000000; font-weight: bold;">&gt;</span>
DAV <span style="color: #c20cb9; font-weight: bold;">svn</span>
SVNParentPath <span style="color: #ff0000;">&quot;/opt/svn&quot;</span>
Order deny,allow
Deny from all
<span style="color: #666666; font-style: italic;"># only allow reading orders</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>Limit GET PROPFIND OPTIONS REPORT<span style="color: #000000; font-weight: bold;">&gt;</span>
Allow from 192.168.0.40
<span style="color: #000000; font-weight: bold;">&lt;/</span>Limit<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span>
&nbsp;
PerlLoadModule Apache::Redmine
   <span style="color: #000000; font-weight: bold;">&lt;</span>Location <span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">&gt;</span>
     DAV <span style="color: #c20cb9; font-weight: bold;">svn</span>
     SVNParentPath <span style="color: #ff0000;">&quot;/opt/svn&quot;</span>
&nbsp;
     AuthType Basic
     AuthName redmine
     Require valid-user
&nbsp;
     PerlAccessHandler Apache::Authn::Redmine::access_handler
     PerlAuthenHandler Apache::Authn::Redmine::authen_handler
&nbsp;
     <span style="color: #666666; font-style: italic;">## for mysql</span>
     RedmineDSN <span style="color: #ff0000;">&quot;DBI:mysql:database=redmine;host=localhost&quot;</span>
&nbsp;
     RedmineDbUser <span style="color: #ff0000;">&quot;userdb&quot;</span>
     RedmineDbPass <span style="color: #ff0000;">&quot;userpwd&quot;</span>
  <span style="color: #000000; font-weight: bold;">&lt;/</span>Location<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>Ajouter à la crontab:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">*/</span><span style="color: #000000;">5</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> ruby <span style="color: #000000; font-weight: bold;">/</span>opt<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><span style="color: #c20cb9; font-weight: bold;">svn</span><span style="color: #000000; font-weight: bold;">/</span>reposman.rb <span style="color: #660033;">--redmine-host</span>=localhost:<span style="color: #000000;">3000</span> <span style="color: #660033;">--svn-dir</span>=<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">svn</span> <span style="color: #660033;">--owner</span>=apache <span style="color: #660033;">--url</span>=http:<span style="color: #000000; font-weight: bold;">//</span>IP<span style="color: #000000; font-weight: bold;">/</span>svn-private<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #660033;">--verbose</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>reposman.log</pre></div></div>

<p>Tout devrait à présent fonctionner.<br />
L&#8217;idéal serait de mettre en place un cluter Mongrel, mais il semble que la gestion des dépots SVN ne fonctionne plus. </p>
<p>Si vous l&#8217;utilisez avec Mongrel, n&#8217;hésiter pas <img src='http://www.actinux.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.actinux.org/index.php/2009/03/24/installer-un-serveur-redmine-sur-centos-52/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
