HowTo Install Redmine using Debian package

Version 9 (Piotr Serwa, 2011-02-09 03:35)

1 1 Jérémy Lal
h1. HowTo Install Redmine using Debian package
2 1 Jérémy Lal
3 1 Jérémy Lal
A redmine debian package is available in squeeze, sid and "lenny-backports":http://backports.org/dokuwiki/doku.php?id=instructions
4 1 Jérémy Lal
Featuring:
5 1 Jérémy Lal
* automatic database configuration,
6 1 Jérémy Lal
* multiple instances support.
7 1 Jérémy Lal
8 1 Jérémy Lal
The core package is redmine.
9 1 Jérémy Lal
Three packages (redmine-*) provide correct dependencies for mysql, pgsql, sqlite.
10 1 Jérémy Lal
11 1 Jérémy Lal
Currently there is no plugins support, although it's on the way.
12 2 Piotr Serwa
13 2 Piotr Serwa
14 2 Piotr Serwa
h1. Installation details
15 2 Piotr Serwa
16 3 Piotr Serwa
h2. Install the necessary packages 
17 2 Piotr Serwa
18 3 Piotr Serwa
From root console:
19 1 Jérémy Lal
20 3 Piotr Serwa
@apt-get install mysql@
21 3 Piotr Serwa
during mysql setup, provide a new root password for mysql
22 1 Jérémy Lal
23 3 Piotr Serwa
@apt-get install redmine@
24 3 Piotr Serwa
during redmine install, select mysql database with local connection, set the admin password for redmine_default database
25 2 Piotr Serwa
26 3 Piotr Serwa
@apt-get install libapache2-mod-passenger@
27 2 Piotr Serwa
28 3 Piotr Serwa
29 3 Piotr Serwa
h2. Do some configuration
30 3 Piotr Serwa
31 1 Jérémy Lal
@ln -s /usr/share/redmine/public /var/www/redmine@
32 2 Piotr Serwa
@chown -R www-data:www-data /var/www/redmine@
33 2 Piotr Serwa
@echo "RailsBaseURI /redmine" > /etc/apache2/sites-available/redmine@
34 2 Piotr Serwa
@a2ensite redmine@
35 2 Piotr Serwa
@/etc/init.d/apache2 reload@
36 2 Piotr Serwa
@/etc/init.d/apache2 restart@
37 2 Piotr Serwa
38 4 Piotr Serwa
h2. Configure email smtp server
39 4 Piotr Serwa
40 4 Piotr Serwa
Copy from template:
41 4 Piotr Serwa
@cp /usr/share/doc/redmine/examples/email.yml.example /etc/redmine/default/mail.yml@
42 4 Piotr Serwa
43 5 Piotr Serwa
Edit (at the end, there are uncommented production / development blocks to be filled in):
44 4 Piotr Serwa
@vi /etc/redmine/default/mail.yml@
45 4 Piotr Serwa
46 3 Piotr Serwa
h2. Run the browser
47 3 Piotr Serwa
48 3 Piotr Serwa
Open http://localhost/redmine
49 4 Piotr Serwa
50 1 Jérémy Lal
Log in as admin / admin
51 6 Piotr Serwa
52 6 Piotr Serwa
h2. Futher configuration - SVN
53 6 Piotr Serwa
54 7 Piotr Serwa
Get the API key (settings / repositories)
55 1 Jérémy Lal
56 8 Piotr Serwa
Make a crontab to have repositories generated in the background: 
57 8 Piotr Serwa
58 8 Piotr Serwa
@crontab -e@
59 8 Piotr Serwa
60 9 Piotr Serwa
In the editor, paste the following (this runs the scan of the projects and if needed it creates the svn repositories):
61 9 Piotr Serwa
@/5 * * * * /usr/bin/ruby /usr/share/redmine/extra/svn/reposman.rb --redmine localhost/redmine --svn-dir /usr/home/svn --owner www-data --group www-data --url file:///usr/home/svn --verbose --key=YOUR_API_KEY_HERE --command="/usr/bin/svnadmin create" >> /var/log/reposman.log@
62 6 Piotr Serwa
63 6 Piotr Serwa
Configure servername/svn, so that svn repositories are available over apache webdav:
64 6 Piotr Serwa
fixme