Project

General

Profile

Install Redmine with git and svn support over https on Debian wheezy using the Debian repository » History » Version 5

Jan Niggemann (redmine.org team member), 2014-06-11 21:07
Add out of support and security notice

1 1 Wim Bertels
h1. Install Redmine with git and svn support over https on Debian wheezy using the Debian repository
2
3
This a short (incomplete) howto for those who want to stay within the debian repository.
4 5 Jan Niggemann (redmine.org team member)
*%{color:red}IMPORTANT: The Debian package is v1.4.4. That version is out of support and has multiple security issues.%*
5 1 Wim Bertels
6 3 Wim Bertels
* Basic install using postgresql backend
7 1 Wim Bertels
_See references for configuration_
8
Redmine version 1.4.4 is present the debian repository.
9
<pre>
10 4 Fedir RYKHTIK
aptitude install postgresql redmine redmine-pgsql redmine-plugin-botsfilter
11 1 Wim Bertels
</pre>
12
13 3 Wim Bertels
* make sure all the necesarry modules for apache are loaded
14 1 Wim Bertels
_See references for configuration_
15
eg.
16
<pre>
17
aptitude install libdbd-pg-perl
18
</pre>
19
20 3 Wim Bertels
* set up the vhosts
21 1 Wim Bertels
_See references for configuration_
22 3 Wim Bertels
** svn, apache enabled site
23 2 Wim Bertels
in /etc/apache2/sites-enabled dir a site containing
24
<pre>
25
<VirtualHost *:443>
26
        ServerAdmin email@of.you
27
        DocumentRoot /var/www/redmine
28
        ServerName your.dns.org
29
30
        SSLEngine On
31
32
        SSLCertificateFile    /etc/apache2/ssl/yourcert.pem
33
        SSLCertificateKeyFile /etc/apache2/ssl/yourcert.key
34
        SSLCertificateChainFile /etc/apache2/ssl/yourcert.certificate_chain # optional, can be self signed
35
36
        <Directory /var/www/redmine>
37
                RailsBaseURI /
38
                PassengerResolveSymlinksInDocumentRoot on
39
                # http://httpd.apache.org/docs/current/misc/perf-tuning.html
40
                AllowOverride None
41
        </Directory>
42
43
        ErrorLog /var/log/apache2/error.log
44
45
        # Possible values include: debug, info, notice, warn, error, crit,
46
        # alert, emerg.
47
        LogLevel warn
48
49
        CustomLog /var/log/apache2/access.log combined
50
</VirtualHost>
51
</pre>
52
53 3 Wim Bertels
** in conf.d dir eg svn.conf
54 2 Wim Bertels
<pre>
55
# /svn location for users
56
PerlLoadModule Apache::Redmine
57
<Location /svn>
58
    DAV svn
59
    SVNParentPath "/var/svn" 
60
    Order deny,allow
61
    Deny from all
62
    Satisfy any
63
64
    PerlAccessHandler Apache::Authn::Redmine::access_handler
65
    PerlAuthenHandler Apache::Authn::Redmine::authen_handler
66
    AuthType Basic
67
    AuthName "Projectwerk Subversion Repository" 
68
69
    #read-only access    
70
    <Limit GET PROPFIND OPTIONS REPORT>
71
        Require valid-user
72
        # Allow from [my server ip]
73
        Allow from putyourserver.ipadress
74
        Allow from 127.0.0.1
75
        # Allow from another-ip
76
        Satisfy any
77
    </Limit>
78
    # write access
79
    <LimitExcept GET PROPFIND OPTIONS REPORT>
80
        Require valid-user
81
    </LimitExcept>
82
    ErrorDocument 404 default
83
84
    # postgresqlconnection
85
    RedmineDSN "DBI:Pg:dbname=redmine_default;host=localhost" 
86
    RedmineDbUser "redmine" 
87
    RedmineDbPass "geheim"
88
</Location>
89
</pre>
90
91 3 Wim Bertels
** git
92 1 Wim Bertels
93 2 Wim Bertels
in conf.d dir a git.conf file
94
<pre>
95
PerlLoadModule Apache::Redmine
96
97
SetEnv GIT_PROJECT_ROOT /var/git/
98
SetEnv GIT_HTTP_EXPORT_ALL
99
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/
100
101
<Location /git>
102
  AuthType Basic
103
  Require valid-user
104
  AuthName "Projectwerk Git Repository"
105
106
  PerlAccessHandler Apache::Authn::Redmine::access_handler
107
  PerlAuthenHandler Apache::Authn::Redmine::authen_handler
108
 
109
  # postgresqlconnectie leggen
110 1 Wim Bertels
  RedmineDSN "DBI:Pg:dbname=redmine_default;host=localhost"
111
  RedmineDbUser "redmine"
112
  RedmineDbPass "geheim"
113 2 Wim Bertels
</Location>
114
</pre>
115
116 3 Wim Bertels
don't forget to restart apache
117
118
* set up cron repository creation
119 2 Wim Bertels
_See references for configuration_
120 3 Wim Bertels
** choose either only svn or git (one can only be the master repo)
121
** if you want both u will need to register the second repo (git or svn) by hand on the redmine project site, for that you also need to make you use force.
122 2 Wim Bertels
<pre>
123
eg
124
*/5 * * * * root ruby /usr/share/redmine/extra/svn/reposman.rb --redmine localhost --scm Subversion --svn-dir /var/svn --owner www-data --url file:///var/svn --key=ARAZERAEZRZAER >> /var/log/redmine/reposman.log
125
*/30 * * * * root ruby /usr/share/redmine/extra/svn/reposman.rb -r localhost --scm Git --svn-dir /var/git --owner www-data --url /var/git --key=ARAZRRAEZRAEZRAEZ --verbose -f >> /var/log/redmine/reposman.log
126 1 Wim Bertels
</pre>
127 2 Wim Bertels
128 3 Wim Bertels
* svn repo appear after enabling repository module on the site,
129 2 Wim Bertels
if u also have the git cron added, then u can add the git repo manually,
130 1 Wim Bertels
redmine will complain, but it exists. So checkout the git repo, add a file, commit and push to server, redmine will no longer complain.
131
132
References:
133
http://www.redmine.org/issues/4905
134
http://www.redmine.org/issues/3958
135
https://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.html
136
http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_using_Debian_package
137
http://www.redmine.org/projects/redmine/wiki/HowToInstallRedmineOnUbuntuServer