HowTo Install Redmine 212 in Ubuntu 1210 and Apache Passenger » History » Revision 2

Revision 1 (Julian Perelli, 2012-11-07 18:29) → Revision 2/14 (Julian Perelli, 2012-11-07 18:29)

h1. HowTo Install Redmine 212 in Ubuntu 1210 and Apache Passenger 

 Inspired in "HowTo Install Redmine 210 on Debian Squeeze with Apache Passenger", from this same wiki, so meta-kudos, to the original authors. 

 h2. Assumptions 

 * We will be using; so every time you see this below, replace it by your own domain 
 * If you are behind a proxy, you could do export http_proxy="http://proxy.domain.tld:port" and the installation should work ok. 

 h2. Warming up 

 We will first need to install basic packages: 
 apt-get install ruby rubygems libruby libapache2-mod-passenger 
 Download the latest version of Redmine (2.1.2 in our case) and untar it, then move it to /usr/local/share 
 tar -xzvf redmine-2.1.2.tar.gz 
 ln /usr/local/share/redmine-2.1.2 /usr/local/share/redmine 
 chown -R root:root /usr/local/share/redmine-2.1.2 

 Install development libraries for MySQL and MySQL: 
 apt-get install libmysqlclient-dev 

 Install development libs for Imagick: 
 apt-get install libmysqlclient-dev libmagickcore-dev libmagickwand-dev (install shitload of packages) 

 h2. Running the Gem stuff 

 Install Bundler (removing useless module, which would otherwise create dependencies): 
 gem install bundler 
 cd /usr/local/share/redmine/ 
 /var/lib/gems/1.8/bin/bundle install --without development test postgresql sqlite 

 h2. Configuration 

 Copy config/database.yml.example to config/database.yml and edit this file in order to configure your database settings for "production" environment. 
 Example for a MySQL database using ruby1.8 or jruby: 
   adapter: mysql 
   database: redmine 
   host: localhost 
   username: redmine 
   password: my_password 

 Generate a session store secret: 
 /var/lib/gems/1.8/bin/rake generate_secret_token 

 Generate the database structure: 
 RAILS_ENV=production /var/lib/gems/1.8/bin/rake db:migrate 

 Generate default configuration data: 
 RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:load_default_data 
 (using “es” for Spanish language in terminal prompt) 

 Setup config file in config/configuration.yml 

 Change database_ciphr_key: ******* 
 /var/lib/gems/1.8/bin/rake db:encrypt RAILS_ENV=production 

 h2. Apache 

 Setup Apache’s VirtualHost config 

 # 8080 in this case is because we use a reverse proxy before Apache. Otherwise simply use "*:80" 

 <VirtualHost *:8080> 
  DocumentRoot /usr/local/share/redmine/public 
  <Directory /usr/local/share/redmine/public> 
    AllowOverride all 
    Options -MultiViews 

 Once you enable this virtual host (a2ensite and reload Apache (/etc/init.d/apache2/reload), you should see your site running on 

 The default login/password is admin/admin (don't forget to change this). 

 h2. Sources of inspiration 

 We used the following resources as a starting point. Thanks to their respective authors. 

 * (outdated, for Lenny)