Redmine installation on Debian 6 - guide
These are the notes used to install our Redmine repository system.
We use Redmine internally to manage our work - it has a really good set of tools to facilitate the interaction of a team during development.
In our case, we use it with subversion, as it is a reliable system that has plugins for Eclipse, and Visual Studio - which we use on our projects.
Basic Checks
Debian is our platform of choice, and this installation was performed against a Debian 6 amd64 base.
These details should be mostly the same if you are using Ubuntu - just remember to prefix all commands with sudo or login as root while performing this installation.
Start by ensuring that your server has a valid a FQDN - check it with: hostname -f
Installing required software
Firstly we will install all the necessary software before we configure it.
install mysql and redmine connector
do not install redmine yet as it will complaint about its missing connector
apt-get install mysql-server redmine-mysql
install apache2 with required modules
Basic Checksapt-get install apache2 libapache2-svn libapache-dbi-perl libapache2-mod-perl2 libdbd-mysql-perl libdigest-sha1-perl libauthen-simple-ldap-perl libapache2-mod-passenger subversion
install redmine
this step will initiate a configuration wizard - follow the prompts please make notes of the following details as these will be needed later on:
- database name
- database username
- database password
you will find that default options are pretty good for most time
Configuring everything to work with Redmine
to make mysql installation more secure
run the script below and follow the prompts - it should be fine to accept the defauls
mysql_secure_installation
edit passenger config, add default user declaration
nano /etc/apache2/mods-available/passenger.conf
add the following:
PassengerDefaultUser www-data
so it looks like:
<IfModule mod_passenger.c>
PassengerDefaultUser www-data
PassengerRoot /usr
PassengerRuby /usr/bin/ruby
</IfModule>
enable the necessary modules in apache2
a2enmod dav perl dav_svn rewrite passenger
create a syslynk to Redmine.pm to enable apache2 to be able to run it
ln -s /usr/share/redmine/extra/svn/Redmine.pm /usr/lib/perl5/Apache/Redmine.pm
create another syslink to redmine folder, and set permissions
ln -s /usr/share/redmine/public /var/www/redmine
chown www-data:www-data /var/www/redmine
create an apache2 configuration for redmine, and enable it this will allow redmine to run Rails on this location
echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine
a2ensite redmine
service apache2 restart
if all is well - you should be able to login to redmine on http://<your-server-ip>/redmine
then sign in with default user details:
username: admin
password: admin
go to, Administration; Settings; and Repositories
tick the box for Enable WS for repository management
and click on the Generate a key and Save
create a crontab you will need to set the value of the 'key' below with the 'generated key' from the previous step
* * * * * /usr/bin/ruby /usr/share/redmine/extra/svn/reposman.rb --redmine http://localhost/redmine --svn-dir /var/svn/repos --owner www-data --group www-data --url file:///var/svn/repos --verbose --key=<YOUR-REDMINE-KEY> >> /var/log/reposman.log
create folder for subversion repositories, and set permissions
mkdir -p /var/svn/repos
chown -R www-data: /var/svn
create a configuration to allow access to subversion repositories via apache2
PerlLoadModule Apache::Redmine
PerlLoadModule Authen::Simple::LDAP# if connecting to LDAP through a secure channel enable the line below
# and install package - libio-socket-ssl-perl
# PerlLoadModule IO::Socket::SSL<Location /svn>
DAV svn
SVNParentPath "/var/svn/repos"PerlAccessHandler Apache::Authn::Redmine::access_handler
PerlAuthenHandler Apache::Authn::Redmine::authen_handler
AuthType Basic
AuthName "BrainPowered Project - Redmine SVN Repository"
Require valid-user
#
# tried using the configuration below but apache2 seems to ignore it altogether
# instead, the line above fixes the requests for login just fine# Order deny,allow
# Deny from all
# Satisfy any
# Require valid-user#
# #read-only access
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# Require valid-user
# Allow from 127.0.0.1
# Satisfy any
# </LimitExcept>
#
#
# # write access
# <LimitExcept GET PROPFIND OPTIONS REPORT>
# Require valid-user
# </LimitExcept>
### for mysql
RedmineDSN "DBI:mysql::dbname=<redmine mysql database name>;host=localhost"
RedmineDbUser "<redmine mysql username>"
RedmineDbPass "<redmine mysql password"
RedmineCacheCredsMax 50
</Location>
enable svn configuration on apache2, and restart the server
a2ensite svn
service apache2 restart
Extra Notes
i can login using eclipse and through terminal but it fails to allow me to login with apache any suggestions?
Optional steps
Since we run Redmine on our internal network, we have not need to run apache2 using SSL but i will make some notes on how to set it up in future.
create a certificate to enable apache2 to run SSL
follow prompts to create your self-signed certificate - in this case it will last 2 year (730 days)
openssl req -new -x509 -days 730 -nodes -out /etc/ssl/certs/cert.pem -keyout /etc/ssl/certs/cert.pem
sources:
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_using...
http://www.redmine.org/projects/redmine/wiki/Repositories_access_control...
http://kogentadono.wordpress.com/tag/redmine/