NOTE: This is a complete rewrite of our Redmine install how-to. Previously, Ruby packages needed by Redmine needed to be installed manually with rubygems. Now we have Ruby packages needed for Remine in our repository. As of writing, ruby packages are maintained in testing repository.
- For this how-to we assume you are running an Hard-disk install of Alpine Linux. If you are running from RAM, please make sure you use LBU.
- Alpine Linux uses Lighttpd as default web-server. Redmine will be running with FastCGI inside Lighttpd. If you like to install Redmine with any other web-server, you will need to install it manually. Which are currently: ruby-rails ruby-fcgi ruby-rmagick ruby-i18n ruby-openid rubygems
- We are using MySQL as database for our Redmine install. Redmine is also able to run with PostgreSQL or SQLite.
- MySQL is running on a remote location. Please follow other tutorials on how to setup MySQL. (need link).
- Detailed information regarding Redmine installation can be found: http://www.redmine.org/projects/redmine/wiki/RedmineInstall
apk install redmine
On a Alpine base install this should pull in approximately 38 packages including (almost) all Ruby dependencies and Lighttpd. If you like to run a different webserver, you will need to skip redmine package and install all deps manually with apk.
For Redmine to communicate with MySQL server we will need to have the mysql ruby package. (if you want to run another db, just install the appropriate db package).
apk install ruby-mysql
Now before we continue we need to prepare our database. According Redmine website you need to do the following:
create database redmine character set utf8; create user 'redmine'@'localhost' identified by 'my_password'; grant all privileges on redmine.* to 'redmine'@'localhost';
If you need mysql client, you can install it like this:
apk add mysql-client
You can of course also use a tool like phpmyadmin to create the database and setup the user.
Redmine default config files are located inside /etc/redmine. For Redmine to find your database, please edit database.yml. We have removed all entries accept the default production one. For examples please check: /var/www/localhost/htdocs/redmine/config If you need to edit additional configuration files, please move them to /etc/redmine and link them back to the original location. This way apk will use config protect and not overwrite your config files on update. Don't forget to edit the other files, like your SMTP configuration.
First we need to generate a session store secret:
cd /var/www/localhost/htdocs/redmine /usr/lib/ruby/gems/1.8/bin/rake generate_session_store
Now we populate the database:
cd /var/www/localhost/htdocs/redmine RAILS_ENV=production /usr/lib/ruby/gems/1.8/bin/rake db:migrate
Now our database is ready, we need to configure Lighttpd. We have included an example Redmine/Ligghtpd configuration based on FastCGI. You can find it in /etc/lighttpd. When you are finished setting up Ligghtpd configuation include it inside lighttpd.conf and we can start it.
If your server does not run, you can find information in /var/log/lighttpd. If that does not provide a clue you can also run Lighttpd in foreground. It should display some more debug information.
/etc/init.d/lighttpd stop lighttpd -f /etc/lighttpd/lighttpd.conf -D
This document is a Work In Progress.