Mateen Ahmed

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Friday, 14 December 2012

SVN Server on RHEL6

Posted on 03:45 by Unknown

Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).

Subversion is well-known in the open source community and is used on many open source projects, including Apache Software Foundation, KDE, Free Pascal, FreeBSD, GCC, Python, Django, Ruby, Mono, SourceForge.net, ExtJS and Tigris.org. Google Code also provides Subversion hosting for their open source projects. BountySource systems use it exclusively. Codeplex offers access to both Subversion as well as other types of clients.

Subversion is also being adopted in the corporate world. In a 2007 report by Forrester Research, Subversion was recognized as the sole leader in the Standalone Software Configuration Management (SCM) category and a strong performer in the Software Configuration and Change Management (SCCM) category.


Here’s how I installed subversion on a machine with RHEL6
For anyone learning or using Subversion, I highly recommend that you read the book.

  [mateen@reuters ~]$ yum install *subversion
now Check version

mateen@reuters ~]$ svn --version
svn, version 1.6.11 (r934486)
   compiled May 31 2011, 05:46:33


Then you’ll need to setup at least one repository. I’m going to need multiple repositories that I can use for different clients so I have a bit of extra admin work ahead of me. You can setup as many repositories as you need, but no matter what you’ll need at least one. Here create the folders…
# mkdir /svn
# mkdir /svn/repos
# mkdir /svn/users
# mkdir /svn/permissions
Now you have to give   proper permissions to folder
chown -R apache.apache /svn
Then need to tell subversion to make a  repository.
svnadmin create /svn/repos
Then, I need to setup a config file for svnserve.
cd  /svn/repos/conf/
 vim svnserve.conf
Then, look for variations of the following code and edit it as necessary. By default any anonymous user can access the code so to disable that you must include anon-access = none, just commenting the value out will not prevent anonymous access.
[general]
anon-access = none
password-db = passwd   <-Passwd file
realm = My SVN Repository
auth-access = write
Please note: don’t just insert these three lines at the very end, like I did. They need to go in the [general] section, not the [sasl] section, otherwise “Authorization failed” type errors will occur whenever you try to check in any new stuff
vim passwd
svnuser = password
Now start SVN Server
$svnserve -d

One side note – svnserve just runs and doesn’t have a way to stop besides killing the process. If you make changes to the svnserve.conf or user file you’ll need to restart svnserve.

To back up a Subversion repository
Don’t try and copy and paste the repository or anything like that. Create a gzipped Subversion file as follows:

$svnadmin dump /MyPath/Repos | gzip > MyBackupRepos.svn.gz



Now, let’s setup apache.
Create a new apache include file that will hold our configurations (You may already have this is subversion was already installed).
vim /etc/httpd/conf.d/subversion.conf
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
DAV svn
SVNPath /svn/repos
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile /svn/users/svnpass
Require valid-user
AuthzSVNAccessFile /svn/permissions/svnauthz


htpasswd -cm  /svn/permissions/svnauthz admin
 password 








Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Linux Kernel /etc/sysctl.conf
    /etc/sysctl.conf can be a powerful way of changing kernel settings at run-time. If you have sysctl.conf support compiled into your kernel, y...
  • Domain name formulation
    The right-most label conveys the top-level domain; for example, the domain name  www.example.com  belongs to the top-level domain com. The h...
  • How To Add a non-login User in Linux so that he/she doesn't have shell.
    useradd & usermod commands are used to add and modify the users in linux. When invoked without the -D option, the useradd command creat...
  • To Increase Networking Performance Network Stack (Buffers Size)
    By default the Linux network stack is not configured for high speed large file transfer across WAN links. This is done to save memory resour...
  • SVN Server on RHEL6
    Subversion (SVN) is a version control system initiated in 2000 by CollabNet Inc. It is used to maintain current and historical versions of f...
  • Types of NameServer
                                                            There are four primary nameserver configuration:    Master Server:  The primary mast...
  • Apache Security with SELinux
    Security with Apache is an important topic, of which SELinux is a part. The reason for discussing SELInux at this point is so that you have ...
  • How do I hide the Apache version number under Linux server?
    You can easily hide Apche (httpd) version number and other information. There are two config directives that controls Apache version. The S...
  • Configuring ssh Server
                                                          SSH SERVER CONFIGURATIONS ssh command is a client remote login program to connect remo...
  • TOP - Process Activity Command
    The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-int...

Blog Archive

  • ►  2013 (19)
    • ►  July (1)
    • ►  June (6)
    • ►  May (1)
    • ►  April (11)
  • ▼  2012 (12)
    • ▼  December (11)
      • 20 ways to Secure your Apache Configuration
      • How do I hide the Apache version number under Lin...
      • Apache Security with SELinux
      • SVN Server on RHEL6
      • Displays The Processes
      • Tell How Long The System Has Been Running
      • TOP - Process Activity Command
      • Types of NameServer
      • Configuring ssh Server
      • Domain name formulation
      • lshw command – List hardware information in Linux
    • ►  November (1)
Powered by Blogger.

About Me

Unknown
View my complete profile