Redmine is a open source, flexible web-based project management and issue tracking tool that provides integrated multiple projects management features. It’s written using the Ruby on Rails framework. It is cross-platform and cross-database.
Key Features :
Prerequisites: Apache, mod-passenger, and MySQL
Redmine needs that alternative support packages will install first. Apache installation is easy if you simply follow the prompts and settle for the defaults.
$ sudo apt-get install apache2 libapache2-mod-passenger
Installing mysql takes just a little more, so the details are spelled out.
$ sudo apt-get install mysql-server mysql-client
Installing and configuring the Ubuntu Redmine package Now install redmine itself.
$ sudo apt-get install redmine redmine-mysql
You want to allow dbconfig-common to configure the database when prompted so select Yes from the prompt in the panel below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Configuring redmine The redmine/instances/default package must have a database installed and configured before it can be used. This can be optionally handled with dbconfig-common. If you are an advanced database administrator and know that you want to perform this configuration manually, or if your database has already been installed and configured, you should refuse this option. Details on what needs to be done should most likely be provided in /usr/share/doc/redmine/instances/default. Otherwise, you should probably choose this option. Configure database for redmine/instances/default with dbconfig-common? Yes </strong>
Then you want to provide the “root” password for the database, so that the installer can create the redmine database. This is the password set when you installed mysql.
1 2 3 4 5 6 7 8 9
Configuring redmine Please provide the password for hte administrative account with which this package should create its MySQL database and user. Password of the database's administrative user: ****** Ok Cancel
Tell the redmine installer we are using mysql for this installation by highlighting “mysql” from the list of database choices:
1 2 3 4 5 6 7 8 9 10 11 12 13
Configuring redmine The redmine/instances/default package can be configured to use one of several database types. Below, you will be presented with the available choices. Database type to be used by redmine/instances/default: sqlite3 pgsql mysql Ok Cancel
Now you are asked to provide a password that will be used to protect the redmine database. Redmine itself will use this when it wants to access mysql.
1 2 3 4 5 6 7 8 9 10
Configuring redmine Please provide a password for redmine/instances/default to register with the database server. If left blank, a random password will be generated. MySQL application password for redmine/instances/default: ******* Ok Cancel
1 2 3 4 5 6 7
Configuring redmine Password confirmation: ******* Ok Cancel
Ensure the bundler gem is installed.
$ sudo gem update $ sudo gem install bundler
You need to modify two files for apache. The first is /etc/apache2/mods-available/passenger.conf which needs the text PassengerDefaultUser www-data added as seen below. Do not replace whole file content!
1 2 3 4 5
<IfModule mod_passenger.c> PassengerDefaultUser www-data PassengerRoot /usr PassengerRuby /usr/bin/ruby </IfModule>
Now create a symlink to connect Redmine into the web document space:
$ sudo ln -s /usr/share/redmine/public /var/www/html/redmine
And modify /etc/apache2/sites-available/000-default.conf (before apache 2.4 /etc/apache2/sites-available/default) to insert the following with the other
1 2 3 4
<Directory /var/www/html/redmine> RailsBaseURI /redmine PassengerResolveSymlinksInDocumentRoot on </Directory>
Create and set the ownership of a Gemfile.lock file so that apache’s www-data user can access it:
$ sudo touch /usr/share/redmine/Gemfile.lock $ sudo chown www-data:www-data /usr/share/redmine/Gemfile.lock
Now restart apache:
$ sudo service apache2 restart
You should now be able to access redmine from the local host
$ firefox http://127.0.0.1/redmine
In the upper right corner of the browser window you should see the “Sign in” link. Click that and enter “admin” at both the Login: and Password: prompts. Note: this is not the password you set during the installation process. Click the Login button.
I recommend that the next thing you do is to click on My account in the upper right corner and change that password. In the page that is displayed there should be a Change password link in the upper right of the white area of the page. Click to change the password.
Backing up Redmine
You should arrange a regular backup of the Redmine database and the files that users upload/attach. The database can be dumped to a text file with:
/usr/bin/mysqldump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz
rsync -a /var/lib/redmine/default/files /path/to/backups/files
You can have these commands run automatically by creating a script called /etc/cron.daily/redmine that contains:
1 2 3
#!/bin/sh /usr/bin/mysqldump -u root -p<password> redmine_default | gzip > /path/to/backups/redmine_db_`date +%y_%m_%d`.gz rsync -a /var/lib/redmine/default/files /path/to/backups/files
Again, be sure to substitute the mysql root password for
Additional semi-optional packages
There are some services that Redmine can use that are not absolutely necessary, but are useful. These are email and software repository/revision control systems.
At some purpose, you will probably want Redmine to be able to send email. For this you will need to install and configure email. This will be achieved by installing the postfix package. I don’t recommend the exim4 package, as there are few incompatibilities in the way the ‘sendmail’ command is handled between Redmine and exim4. Unless everyone has an email account on the redmine server you will want to set up outer email as a full web host. Once email service is installed, you will have to restart apache for Redmine that has access to email services.
$ sudo apt-get install postfix
Now that you can send email, you have to tell Redmine about it. You need to create/edit the file /etc/redmine/default/configuration.yml and add the following lines:
1 2 3
production: email_delivery: delivery_method: :sendmail
Then restart apache so that Redmine reloads the configuration file:
$ sudo service apache2 restart
Revision control repository setup
In order to have your software repository on the system Redmine will need the corresponding software installed.
$ sudo apt-get install git subversion cvs mercurial $ sudo service apache2 restart
That covers it as far as I have gotten in my use of Redmine to date. That’s all. Now we have completely installed Redmine on our OS and can reach it from any machine in our network easily.