How to Install SVN With WebSVN (Web Panel) in Centos/RHEL 6.X

Install SVN With WebSVN on CentOS/RHEL 6.X

What is SVN?

Apache Subversion (often abbreviated SVN, after the command name svn) is a software versioning and revision control system distributed as free software under the Apache License. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation.

What is WebSVN?

WebSVN offers a view onto your subversion repositories that’s been designed to reflect the Subversion methodology. You can view the log of any file or directory and see a list of all the files changed, added or deleted in any given revision. You can also view the differences between two versions of a file so as to see exactly what was changed in a particular revision.

Requirements:

1. Apache
2. Subversion
3. php
4. WebSVN

Step 1: Stop the IPTables and Selinux, and Update the Date Time on the Server :

# service iptables stop
# chkconfig iptables off

# vi /etc/sysconfig/selinux

SELINUX=disabled ###(Change enabled to disabled)

--- save & quit (:wq) ---

# service ntpd restart
# ntpdate pool.ntp.org
# chkconfig ntpd on
# init 6

Step 2: Install & Configure SVN/Subversion with Apache :

A. Install Required Packages:

# yum install -y mod_dav_svn subversion svn httpd httpd-devel php

B. Create subversion.conf file:

# vi /etc/httpd/conf.d/subversion.conf

### add these lines ###

LoadModule dav_svn_module     modules/mod_dav_svn.so
LoadModule authz_svn_module   modules/mod_authz_svn.so

<location /repos>
DAV svn
SVNParentPath /var/www/svn/Repos
AuthType Basic
AuthName "Authorization Realm"
AuthUserFile /var/www/svn/secure/svn-users
AuthzSVNAccessFile /var/www/svn/secure/svn-access-control
Require valid-user

</location>

--- save & quit (:wq) ---

C. Create SVN Directory Tree:

# mkdir -p /var/www/svn/{Repos,secure}
# touch /var/www/svn/secure/svn-access-control
# touch /var/www/svn/secure/svn-users
# service httpd restart

Step 3: Configure some Test Repo & create User for SVN :

A. Create Repo and User:

# cd /var/www/svn/Repos
# svnadmin create testrepo
# chmod -Rf 777 testrepo
# htpasswd -cm /var/www/svn/secure/svn-users testuser (after that give password for "testuser" twice)

B. Modify svn-access-control for Repos Permisions:

# vi /var/www/svn/secure/svn-access-control

### add these lines
[groups]

admin = testuser
testrepo = testuser

[/]
@admin = rw

[testrepo:/]
@testrepo = rw

--- save & quit (:wq) ---

# service svnserve restart

### Check the Svn repo with the url: http://<ip-of-server>/repos/testrepo
username: testuser
password: (Password)

C. update the Repo to Revision 1

# mkdir -p /mnt/svn-structure-template/{trunk,branches,tags}
# svn import -m 'Initial import' /mnt/svn-structure-template/ http://localhost/repos/testrepo

Step 4: Install and Configure WebSVN :

# cd /var/www/html
# wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip
# unzip websvn-2.3.3.zip
# mv websvn-2.3.3 websvn
# cd /var/www/html/websvn/include
# cp distconfig.php config.php
# vi config.php

### add these lines

// Configure these lines if your commands aren't on your path.
//
$config->setSVNCommandPath('/usr/bin'); // e.g. c:\\program files\\subversion\\bin
$config->setDiffPath('/usr/bin');
// For syntax colouring, if option enabled...
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
// For delivered tarballs, if option enabled...
$config->setTarPath('/bin');
// For delivered GZIP'd files and tarballs, if option enabled...
$config->setGZipPath('/bin');
//
$config->parentPath('/svn/');
$extEnscript[".pl"] = "perl";
$extEnscript[".py"] = "python";
$extEnscript[".sql"] = "sql";
$extEnscript[".java"] = "java";
$extEnscript[".html"] = "html";
$extEnscript[".xml"] = "html";
$extEnscript[".thtml"] = "html";
$extEnscript[".tpl"] = "html";
$extEnscript[".sh"] = "bash";

## $config->addRepository('Repo_Path', 'Repo_Url', NULL, 'Repo_User', 'Repo_Pass'); If more Repo added just copy the below Line and Modify it for the New Repo to Access on WebSVN

$config->addRepository('/var/www/svn/testrepo', 'http://192.168.72.243/repos/testrepo', NULL, 'testuser', 'redhat');

--- save & quit (:wq) ---

# vi /etc/httpd/conf/httpd.conf

### After line number 312 add these lines

<Directory "/var/www/html/websvn">
DirectoryIndex index.html index.php index.cgi index.pl
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

--- save & quit (:wq) ---

# service httpd restart

### Check the WebSVN Now on url: http://<ip-of-server>/websvn

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog.

1 comments:

How To Install Svn With Websvn (Web Panel) In Centos/Rhel 6.X - Sample Blog >>>>> Download Now

>>>>> Download Full

How To Install Svn With Websvn (Web Panel) In Centos/Rhel 6.X - Sample Blog >>>>> Download LINK

>>>>> Download Now

How To Install Svn With Websvn (Web Panel) In Centos/Rhel 6.X - Sample Blog >>>>> Download Full

>>>>> Download LINK