Sunday, January 17, 2010

Setting-up the development infrastructure 1 - Redmine

The sooner we write down all decisions the better. Thus, the Wiki is the most important tool and has to be installed first.

Setting up Redmine is straightforward. We used Redmine's own installation guide. On Fedora-Core 11 (FC11), we had to install the following packages in advance:
$ yum install mysql mysql-server ruby rubygem-rake

We also installed the ruby-C-mysql-connector. Since the connector has to be built from scratch, we had to get additional FC11 packages:
$ yum install ruby-devel mysql-devel gcc

Installing these packages is necessary; without we got the errors:
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mysql
can't find header files for ruby.

and
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install mysql
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***

Now, the ruby-C-mysql-connector can be installed via gem
$ gem install mysql


Making Redmine accessible via Apache


Since Redmine is written in Ruby on Rails, we use the Apache passenger module to pass client-request through Apache to Redmine. The passenger module is compiled from scratch, therefore, we installed the httpd-devel and gcc-c++ packages via yum and used gem to install the module:
$ yum install httpd-devel gcc-c++
$ gem install passenger
$ passenger-install-apache2-module

On FC11 and older Fedora-Core installations, the httpd configuration resides under /etc/httpd. The main config file is /etc/httpd/conf/httpd.conf. Since user configurations should go into the directory /etc/httpd/conf.d, we enabled virtual hosting by making the file /etc/httpd/conf.d/vhosts.conf:
NameVirtualHost *:80

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.5
PassengerRuby /usr/bin/ruby
LoadModule dav_svn_module modules/mod_dav_svn.so

<VirtualHost *:80>
ServerName our-domain.org
DocumentRoot /var/www/redmine-0.8.5/public
</VirtualHost>

By entering the address http://our-domain.org in a browser, we saw the Redmine start page.

0 comments:

Post a Comment