SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Sponsor:

Would you like to sponsor this site?
Or buy me a beer?:


Recently Changed Pages:

View All Pages
View All Q Pages


View All Tags


Sign up for Q to post comments.





WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Terms And Conditions for Q users


Pages with comments

PageDateDiscussionTags
2018/09/18 10:47 1 Comment
2017/04/20 16:35 1 Comment
2017/04/20 15:28 1 Comment
2017/04/20 15:23 1 Comment
2017/04/19 14:59 1 Comment
2017/04/19 14:45 3 Comments
2017/04/19 14:44 1 Comment
2017/04/17 20:10 1 Comment
2017/04/17 20:07 1 Comment
2017/04/17 19:58 1 Comment
2017/04/17 19:52 1 Comment

View All Comments

subversion

Subversion

When you've created a subversion server as described here at opensuse you really should add a repository, LDAP authentication and provide a backup:

How to Add a Subversion Repository to the Server

A separate IP address is needed for every repository if you want to use SSL to connect. The newly selected IP address should be added to the subversion server as an additional address. Next is to configure the Subversion repository (in this case the repository “it”).

Set Up a Project Repository

svnadmin create /srv/svn/it
chown -R wwwrun:www /srv/svn/it/

Create SSL Certificate

openssl genrsa -des3 -out /etc/apache2/vhosts.ssl/it.svn.company.local.key 1024
openssl req -new -key /etc/apache2/vhosts.ssl/it.svn.company.local.key -out /etc/apache2/vhosts.ssl/it.svn.company.local.csr

cp /etc/apache2/vhosts.ssl/it.svn.company.local.key /etc/apache2/vhosts.ssl/it.svn.company.local.key.org

openssl rsa -in /etc/apache2/vhosts.ssl/it.svn.company.local.key.org -out /etc/apache2/vhosts.ssl/it.svn.company.local.key
openssl x509 -req -days 3650 -in /etc/apache2/vhosts.ssl/it.svn.company.local.csr -signkey /etc/apache2/vhosts.ssl/it.svn.company.local.key -out /etc/apache2/vhosts.ssl/it.svn.company.local.crt

Create Log Directory

mkdir /var/log/apache2/it.svn.company.local

Create Apache Configuration

vi /etc/apache2/vhosts.d/it.svn.company.local.conf
<VirtualHost 10.10.10.100:443>
        ServerName it.svn.company.local

        ServerSignature on
        DocumentRoot /srv/svn/it/
        DirectoryIndex index.php index.html index.htm index.shtml
        LogLevel error
        HostNameLookups off

        ErrorLog /var/log/apache2/it.svn.company.local/error_log
        CustomLog /var/log/apache2/it.svn.company.local/access_log combined

        SSLEngine on

        #   Server Certificate:
        SSLCertificateFile /etc/apache2/vhosts.ssl/it.svn.company.local.crt

        #   Server Private Key:
        SSLCertificateKeyFile /etc/apache2/vhosts.ssl/it.svn.company.local.key

        #   Server Certificate Chain:
        SSLCertificateChainFile /etc/apache2/vhosts.ssl/svn.company.local-ca.crt

        #   Certificate Authority (CA):
        SSLCACertificateFile /etc/apache2/vhosts.ssl/svn.ompany.local-ca.crt

        #SSLPassPhraseDialog exec:/etc/apache2/vhosts.ssl/svn-passphrase.sh

        # I have different locations for different repositories

<Location />
  AllowOverride None
  Options None
  Order allow,deny
  Allow from all

  DAV svn
  SVNPath /srv/svn/it/

  AuthBasicProvider ldap
  AuthType Basic
  AuthName "SubVersion"
  AuthLDAPURL ldap://ldap.company.local:389/OU=services,O=company?uid?sub
  Require ldap-group CN=AccessSubversion,OU=SecurityGroups,OU=services,O=company

</Location>
</VirtualHost>

Restart Apache

rcapache2 restart

Configure Backup

Create a directory in /srv/svn/backup, in this case:

/srv/svn/backup/full.it

Edit the crontab file and add the following line (and edit it for the just created repository), increase the first number with 5 from the previous line.

10 20 * * * root perl /srv/svn/fullbackup.sh -v -i 500 --out-dir /srv/svn/backup/full.it /srv/svn/it --compress
You could leave a comment if you were logged in.
subversion.txt · Last modified: 2013/05/01 10:52 by sjoerd