Sunday, December 25, 2011

Redmine on Ubuntu 10.10

Most tutorials for setting up Redmine on Ubuntu end with using Webbrick to test, but I wanted a production setup. This is a reconstruction of what finally worked (assuming no prior installs of ruby or rails, but a fully set up LAMP stack):

$ sudo apt-get install ruby-dev redmine
$ sudo gem install passenger
$ sudo apt-get install apache2-dev libapr1-dev libaprutil1-dev 
$ echo "export PATH=/var/lib/gems/1.8/bin:$PATH" >> ~/.bashrc
$ sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module 
$ sudo a2enmod rewrite

$ sudo vim /etc/apache2/sites-enabled/000-default
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-3.0.11/ext/apache2/
PassengerRoot /var/lib/gems/1.8/gems/passenger-3.0.11
PassengerRuby /usr/bin/ruby1.8
<VirtualHost *:80>
  DocumentRoot /usr/share/redmine/public
  <Directory /usr/share/redmine/public>
    AllowOverride all
    Options -MultiViews

And some bind, if you are running your own DNS...

$sudo vim /etc/bind/named.conf.local

zone "" {
      type master;
      file "/var/lib/bind/";

$sudo vim /var/lib/bind/

$ttl 38400    IN    SOA    tower110103. (
            38400 )    IN    NS        IN     A    IN    A    IN    A    

Restart apache and bind

$ sudo /etc/init.d/apache2 restart
$ sudo /etc/init.d/bind9 restart