HowTo Install Redmine 231 On Ubuntu 1204 clean installation with git and Redmine Git Hosting plugin

Installing LAMP

apt-get update && apt-get upgrade -y
apt-get install tasksel

choose LAMP server and choose a password for MySQL root account

Installing Packages

apt-get install ruby rubygems libruby libapache2-mod-passenger ruby-dev libmysqlclient-dev libmagickcore-dev libmagickwand-dev git git-core -y

It is not necessary to reboot your machine.

Installing Redmine

cd /tmp
tar -xzvf redmine-2.3.4.tar.gz
mv redmine-2.3.4 /usr/local/share/redmine-2.3.4
ln -s /usr/local/share/redmine-2.3.1 /usr/local/share/redmine
chown -R root:root /usr/local/share/redmine-2.3.4
gem install bundler

People may find the following helpful:  gem install rdp-mysql2

cd /usr/local/share/redmine/

bundle install --without development test postgresql sqlite

Setting up Redmine user and database in MySQL

mysql -u root -p

CREATE USER 'redmine'@'localhost' IDENTIFIED BY 'my_password';
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost';


File permissions

useradd redmine
mkdir -p tmp tmp/pdf public/plugin_assets
sudo chown -R redmine:redmine files log tmp public/plugin_assets
sudo chmod -R 755 files log tmp public/plugin_assets

Copy /usr/local/share/redmine/config/database.yml.example to /usr/local/share/redmine/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: mysql2      (note: For Rails < 3.1 use mysql instead of mysql2)
  database: redmine
  host: localhost
  username: redmine
  password: my_password

Generate a session store secret:

rake generate_secret_token

(Note - do this upon error message about mysql2:    bundle install   )

Generate the database structure:

bundle exec rake db:migrate RAILS_ENV=production

Generate default configuration data:

bundle exec rake redmine:load_default_data RAILS_ENV=production

Encrypt SCM and LDAP passwords

If you want to encrypt SCM and LDAP passwords do as follows:

  1. Copy the default config file /usr/local/share/redmine/config/configuration.yml.example to /usr/local/share/redmine/config/configuration.yml
  2. Edit configuration.yml and create a cipher key there for the environment you've used so thus far - production. Be sure to read the comment in this file. They are very detailed and there for you.
  3. Run:
    bundle exec rake db:encrypt RAILS_ENV=production


Setup Apache’s VirtualHost config

vim /etc/apache2/sites-available/

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

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

(Note: That didnt work out for me, so I played it fast and loose by killing the 'default' file and using the 'modified
default' from )

TODO:: The redmine installation works, but user editing return an error when using Passenger and adding Git Plugin

Once you enable this Virtual Host (a2ensite and reload Apache (apache2ctl graceful), you should see your site running on

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

Sources of inspiration

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

Updated by Jan Niggemann ( team member) about 10 years ago · 19 revisions