You are not logged in. Click here to log in.

codeBeamer ALM

Search In Project

Search inClear

Tags:  not added yet

Configuring Apache for Subversion

Accessing Subversion Repositories via Apache has several advantages: neither extra port for external access nor SSH key setup is required. This page describes how to setup Apache to Serve Subversion Repositories.

codeBeamer must be installed and started before this description can be used. mod_evasive apache module must be disabled (if enabled) to ensure that remote-api and webdav work properly.

Windows

Please choose the 32 bits version of all software mentioned below even when running 64 bits Windows

This description assumes that codeBeamer has been installed into

C:\CB-5.5
.
  • Download Apache 2.2.17 from the location below or from a mirror:
    http://ftp-stud.hs-esslingen.de/pub/Mirrors/ftp.apache.org/dist//httpd/binaries/win32/httpd-2.2.17-win32-x86-no_ssl.msi
    
  • Install Apache to the default location (
    C:\Program Files\Apache Software Foundation
    ) and take Typical Installation.
  • Edit the Apache configuration:
Click on Start->All Programs->Apache HTTP Server 2.2->Configure Apache Server->Edit the Apache
httpd.conf
Configuration File!
  • Append the lines of
    C:\\CB-5.5\repository\scmweb\httpd.conf.svn
    to the end of Apache
    httpd.conf
  • Copy
    mod_authz_svn.so
    and
    mod_dav_svn.so
    from
    C:\CB-5.5\libexec\svn\bin
    to
    C:\Program Files\Apache Software Foundation\Apache2.2\modules
  • Add
    C:\CB-5.5\libexec\svn\bin
    to your
    PATH
    on
    Control Panel > System > Advanced
    .
  • Test configuration:
Click on Start->All Progeams->Apache HTTP Server 2.2->Configure Apache Server->Test Configuration
  • If everything's fine restart Apache:
Click on Start->All Programs->Apache HTTP Server 2.2->Configure Apache Server->Control Apache Server->Restart

Linux/Unix

It is important that codeBeamer operating system user and apache belong to the same GID!

Ubuntu

This description assumes that codeBeamer has been installed into
/home/codebeamer/CB
.
  • First you have to install Apache HTTP Server using the following command:
    sudo apt-get install apache2
    
  • Then execute this command:
    sudo apt-get install libapache2-svn
    
This will install and enable the modules required in order to user Subversion with Apache.
  • Copy httpd.conf.svn
    sudo cp /home/codebeamer/CB/repository/scmweb/httpd.conf.svn /etc/apache2/mods-available/svn.conf
    
  • Enable svn support
    sudo ln -s /etc/apache2/mods-available/svn.conf /etc/apache2/mods-enabled/svn.conf
    
  • Finally test the apache configuration:
    sudo apache2ctl configtest
    

If everything's fine you can restart Apache:

sudo /etc/init.d/apache2 restart

RedHat

  • First you have to install Apache HTTP Server and the required moduled:
    sudo yum install httpd subversion mod_dav_svn
    
  • Copy
    /home/codebeamer/CB/repository/scmweb/httpd.conf.svn
    to
    /etc/httpd/conf.d/svn.conf
  • Finally test the apache configuration:
    apachectl configtest
    

If everything's fine you can restart Apache:

sudo /etc/init.d/httpd restart

SUSE 11

  • Install subversion and subversions' apache2 modules using this command:
    sudo zypper install subversion subversion-server subversion-tools
    svn --version
    
  • Copy
    /home/codebeamer/CB/repository/scmweb/httpd.conf.svn
    to
    /etc/apache2/conf.d/httpd.conf.svn
  • Edit the newly copied /etc/apache2/conf.d/httpd.conf.svn file and remove all "LoadModule" statements, for example the final result should be this:
    <Location /svn>
    #       AuthBasicAuthoritative Off # http://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html
    
            DAV svn
            SVNParentPath "/home/codebeamer/CB/repository/svn/"
            #SVNListParentPath on
    
            AuthzSVNAccessFile "/home/codebeamer/CB/repository/acl.svn"
    
            AuthName "Subversion Repository"
            AuthType Basic
            AuthUserFile "/home/codebeamer/CB/repository/.htaccess"
    
            require valid-user
    </Location>
    
  • Edit /etc/apache2/httpd.conf file and add this line to the end so the new SVN configuration will be loaded
    Include /etc/apache2/conf.d/httpd.conf.svn
    
  • Edit
    /etc/sysconfig/apache2
    file and add these modules to APACHE_MODULES line:
    APACHE_MODULES="... dav_svn authz_svn"
    
  • Restart Apache2 using this command:
    rcapache2 restart
    
  • Now the SVN checkout and commit should work. You can test this using a checkout command like:
    svn co http://suse.codebeamer.com/svn/mysvn
    

How to checkout from a codeBeamer repository and commit to it

  • Create a new codeBeamer project with a Managed Mercurial Repository and the name of the repository should be svntest. Follow the steps described in Creating Managed Repositories.
  • Create a new issue in the Bugs tracker of the new project. This example assumes that the new issue gets the ID 1000 and the project was created by the account bond that has the password 007.
It is strongly NOT recommended using user/password in URL!
  • On Linux/Unix hg must be in your
    PATH
    , on Windows add Mercurial to the
    PATH
    with the command below:
    set PATH="C:\Dokumente und Einstellungen\zk\Eigene Dateien\CB\libexec\svn";%PATH%
  • Checking out from the repository:
    svn checkout http://bond:007@localhost/svn/svntest
  • Adding a new file to the repository
    cd svntest
    echo hello > readme.txt
    svn add readme.txt
  • Committing to a codeBeamer issue
    svn commit -m "#1000 just a commit"
  • Now after refreshing the browser window with issue details and the change set should appear under SCM Commits tab.