Install Redmine with git and svn support over https on Debian wheezy using the Debian repository » History » Revision 3
Revision 2 (Wim Bertels, 2013-07-05 17:34) → Revision 3/5 (Wim Bertels, 2013-07-05 17:36)
h1. Install Redmine with git and svn support over https on Debian wheezy using the Debian repository This a short (incomplete) howto for those who want to stay within the debian repository. * # Basic install using postgresql backend _See references for configuration_ Redmine version 1.4.4 is present the debian repository. <pre> aptitude install redmine redmine-pgsql redmine-plugin-botsfilter </pre> * # make sure all the necesarry modules for apache are loaded _See references for configuration_ eg. <pre> aptitude install libdbd-pg-perl </pre> * # set up the vhosts _See references for configuration_ ** ## svn, apache enabled site in /etc/apache2/sites-enabled dir a site containing <pre> <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> </pre> ** in conf.d dir eg svn.conf <pre> # /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> </pre> ** ## git in conf.d dir a git.conf file <pre> 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> </pre> 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. <pre> 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 </pre> * 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. 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