Installing the Redmine bugtracker on Gentoo
I wanted a bugtracker for my (inexisting) applications.
On one side it helps me to keep track of the problems I am aware of and on the other side of what I still have to do.
Additionally, I thought that it would be great if (inexisting) users would be able to post their own bugs or the features that they wished , so that the app would become a killer-app(lication!) and I would be able to take over the world more quickly.
I therefore started looking around for a software that would provide these functionalities.
Had a look around and the ones I saw were either too simple or too complicated - e.g. when I tried to use "Bugzilla" some years ago to post my first bug for Gentoo I started thinking that some of the people that programmed these apps are most probably IT-narcissists or that at least they try very hard to discourage people from submitting bugs.
With my scope in mind - find something happy and simple - I went through the apps I saw and in the end Redmine was the one that provided what I needed without making things too complicated.
To be honest, I don't know Ruby nor Ruby on Rails and I personally think that it's a pity that such an app does not exist for the PHP realm, but in the end it's still better than Java and especially Perl. (don't like Java because it uses a lot of memory - pro-Java people, you can tell me what you want but that's how things are for somebody that does not know every Java-trick. Dont like Perl because I don't like its syntax and the apps are usually overly-complicated in their configuration, their life-expectancy & quality is lower than the ones written for PHP and each time that I upgrade Perl I have to recompile all the apps/libs/etc... to make sure that the dependencies aren't broken).
This is how I installed Redmine to use a SQLite3 database on a Gentoo server (installation will be different if you're using other distros like Fedora, CentOS or Ubuntu - but you might still need some of the details mentioned here) - I do have MySQL installed but because of it being now property of Oracle (therefore with the chance that its open-source availability will be dropped in the future or that its development will artificially be limited to avoid interferences with the commercially most used DB in the world) I tend to prefer other solutions if the requirements aren't too demanding (btw., I still have to have a look at PostgreSQL).
- emerge redmine
The current version in my case is 1.2.1-r1.
In my case the packages that had to be unmasked were:
The use-flags I used were:
www-apps/redmine sqlite3 imagemagick -fastcgi -mysql -openid -passenger -postgres -test
- Created in /var/www/localhost/htdocs a symlink - just to remember where redmine is installed and how the hostname of Apache's vhost is called:
bugtracker -> /var/lib/redmine/
- Created a separate directory where to store Redmine-related stuff, like the DB (as I'm not using MySQL but SQLite).
chown -R redmine:redmine /home/redmine_bugtracker
...and prepared the DB-config file:
cp -iv database.yml.example database.yml
Changed in there the following:
#MYCUSTOM-commented original settings
# adapter: mysql
# database: redmine
# host: localhost
# username: root
# encoding: utf8
#MYCUSTOM-my DB settings to use sqlite
- In the same directory, prepared the normal config file:
cp -iv configuration.yml.example configuration.yml
These are all the lines that in my case are uncommented (not sure if it's stupid to mention to change the informations that I wrote in capital letters, but in any case now you know):
password: "SET HERE THE PASSWORD"
- Again in the same directory have a look at the file "settings.yml". For the time being the only thing I changed in there was:
- Go to the root directory of Redmine...
...and generate the session store (no clue what it does where):
- Now check with...
...if you have a sqlite3 extension installed - if yes you'll see an entry similar to this one (the line mentioning "sqlite3"):
*** LOCAL GEMS ***
If you don't see it, install it:
- Still in the same directory run the scripts to prepare the DB schemas...
RAILS_ENV=production rake db:migrate
...(you should now see the file containing the DB in the directory "/home/redmine_bugtracker/db") and then run the script to load the default data into the DB:
RAILS_ENV=production rake redmine:load_default_data
Before forgetting, change the owner of the DB-file that was just created:
chown redmine:redmine /home/redmine_bugtracker/db/redminedb.sqlite3
- Go to /var/lib and change the ownership of the log directory:
chown -R redmine:redmine redmine/
- No changes done to /etc/conf.d/redmine:
# /etc/conf.d/redmine: config file for /etc/init.d/redmine
# Bind to specified address
# You can set to 0.0.0.0 to accept requests anywhere
# additional opts
- You can now sign-in. The initial UserID and password are both "admin" and you should change them immediately.
- After having started Redmine change if needed the owner of the (log directory) and file:
chown -R redmine:redmine /var/log/redmine/
- If you're using httpS to access Redmine through Apache you'll have to add the following to your Apache vhost config:
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
#Specific for Redmine - otherwise when saving changes I get redirected to http instead of https.
RequestHeader set X_FORWARDED_PROTO 'https'
- Theme installation
The Red-Andy theme is very nice (see link below).
Download it and put the "red-andy" directory below "/var/lib/redmine/public/themes/" and then change again the owner of the new files:
chown -R redmine:redmine /var/lib/redmine/public/themes/red-andy/
In Redmine go to "Administration => Settings => Display" and select "Red-andy" as theme.
- This is how it looks like once it's installed.