Differences between revisions 2 and 3
Revision 2 as of 2015-03-31 11:35:05
Size: 5168
Editor: ?Wim Bertels
Comment:
Revision 3 as of 2015-05-01 10:13:02
Size: 5264
Editor: ?Wim Bertels
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:
}}}
to use passenger for http version control
{{{
aptitude install libapache2-mod-passenger

= Installing Redmine on Debian Stable

This a short (incomplete) howto for those who want to stay within the debian repository. IMPORTANT: The Debian package is v1.4.4. That version is out of support and has multiple security issues. See https://security-tracker.debian.org/tracker/source-package/redmine

== Install Redmine with git and svn support over https on Debian wheezy using the Debian repository

* Basic install using postgresql backend _See references for configuration_ Redmine version 1.4.4 is present the debian repository.

aptitude install postgresql redmine redmine-pgsql redmine-plugin-botsfilter

* make sure all the necesarry modules for apache are loaded _See references for configuration_ eg.

aptitude install libdbd-pg-perl

to use passenger for http version control

aptitude install libapache2-mod-passenger

* set up the vhosts _See references for configuration_

** svn, apache enabled site in /etc/apache2/sites-enabled dir a site containing

<VirtualHost *:443>
        ServerAdmin email@of.you
        DocumentRoot /var/www/redmine
        ServerName your.dns.org

        SSLEngine On

        SSLCertificateFile    /etc/apache2/ssl/yourcert.pem
        SSLCertificateKeyFile /etc/apache2/ssl/yourcert.key
        SSLCertificateChainFile /etc/apache2/ssl/yourcert.certificate_chain # optional, can be self signed

        <Directory /var/www/redmine>
                RailsBaseURI /
                PassengerResolveSymlinksInDocumentRoot on
                # http://httpd.apache.org/docs/current/misc/perf-tuning.html
                AllowOverride None
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

** in conf.d dir eg svn.conf

# /svn location for users
PerlLoadModule Apache::Redmine
<Location /svn>
    DAV svn
    SVNParentPath "/var/svn" 
    Order deny,allow
    Deny from all
    Satisfy any

    PerlAccessHandler Apache::Authn::Redmine::access_handler
    PerlAuthenHandler Apache::Authn::Redmine::authen_handler
    AuthType Basic
    AuthName "Projectwerk Subversion Repository" 

    #read-only access    
    <Limit GET PROPFIND OPTIONS REPORT>
        Require valid-user
        # Allow from [my server ip]
        Allow from putyourserver.ipadress
        Allow from 127.0.0.1
        # Allow from another-ip
        Satisfy any
    </Limit>
    # write access
    <LimitExcept GET PROPFIND OPTIONS REPORT>
        Require valid-user
    </LimitExcept>
    ErrorDocument 404 default

    # postgresqlconnection
    RedmineDSN "DBI:Pg:dbname=redmine_default;host=localhost" 
    RedmineDbUser "redmine" 
    RedmineDbPass "geheim"
</Location>

** git

in conf.d dir a git.conf file

PerlLoadModule Apache::Redmine

SetEnv GIT_PROJECT_ROOT /var/git/
SetEnv GIT_HTTP_EXPORT_ALL
ScriptAlias /git/ /usr/lib/git-core/git-http-backend/

<Location /git>
  AuthType Basic
  Require valid-user
  AuthName "Projectwerk Git Repository"

  PerlAccessHandler Apache::Authn::Redmine::access_handler
  PerlAuthenHandler Apache::Authn::Redmine::authen_handler
 
  # postgresqlconnectie leggen
  RedmineDSN "DBI:Pg:dbname=redmine_default;host=localhost"
  RedmineDbUser "redmine"
  RedmineDbPass "geheim"
</Location>

don't forget to restart apache

* set up cron repository creation _See references for configuration_

** choose either only svn or git (one can only be the master repo)

** 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.

eg
*/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
*/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

* svn repo appear after enabling repository module on the site, if u also have the git cron added, then u can add the git repo manually, redmine will complain, but it exists. So checkout the git repo, add a file, commit and push to server, redmine will no longer complain.

* git and public projects:

** readonly

** workaround for read/write access: http.receivepack param should be true for the git project, so go the dir containing the git repo of the project and issue:

git config --file config http.receivepack true
git config -l 

References: http://www.redmine.org/issues/4905 http://www.redmine.org/issues/3958 https://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.html http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_using_Debian_package http://www.redmine.org/projects/redmine/wiki/HowToInstallRedmineOnUbuntuServer


CategorySystemAdministration CategorySystemAdministration