Wednesday, 2 March 2016

Install SVN Versioning Server On CentOS 6.5:


Install SVN Versioning Server On CentOS 6.5:
============================


SVN – Apache subversion

SVN – Subversion is a versioning and revision control system used by developers to track and keep up earlier versions of their source codes.


# yum update

Before installing SVN packages, you must install and configure apache ( Webserver ) .
Install and configure apache

Step 1 » Type the below command to install apache along with dependencies.

# yum install httpd

Step 2 » Open the file /etc/httpd/conf/httpd.conf .

and add this line below . “ServerName youripaddress:80″

#ServerName www.example.com:80
ServerName 192.168.1.2:80

Step 3 » Issue the below command to start apache service .

# service httpd start

and type this below command to start apache service automatically while booting.

# chkconfig httpd on

Now open your server ip address in the browser . you can see the apache test page.

If you not able to see the apache test page, Disable the firewall ( iptables ) and selinux service on your server .
Disable firewall ( Iptables ) »
[root@krizna ~]# service iptables stop
[root@krizna ~]# chkconfig iptables off

Disable Selinux » open the file /etc/selinux/config and find the line
SELINUX=enforcing

and replace with
SELINUX=disabled

now reboot the server and try again.
Install and configure svn server

Step 4 » Now start installing svn packages, Just type the below command .

# yum install subversion mod_dav_svn

Step 5 » Now create new directory for svn repository.

# mkdir /svn

Step 6 » Create a new repository in the svn by issuing the below command

# svnadmin create /svn/newrep

Step 7 » Now issue the below commands one by one for necessary permissions.

# chown -R apache.apache /svn/newrep/

# chcon -h system_u:object_r:httpd_sys_content_t /svn/newrep/

# chcon -R -h apache:object_r:httpd_sys_content_t /svn/newrep/

Step 8 » Now create a password file “newrep.users” with username “krizna” by typing below command

# htpasswd -cm /svn/newrep.users admin

Step 9 » Now open the SVN apache config file ( /etc/httpd/conf.d/subversion.conf ) and add the below lines at the end of the file .

   
<location /repos>
DAV svn
# SVN path
SVNParentPath /svn
AuthType Basic
AuthName "Authorization Realm"
#password file path
AuthUserFile /svn/newrep.users
Require valid-user
</location>

:wq

Step 10 » Restart apache service
[root@krizna ~]# service httpd restart

Step 11 » Now open your svn path http://yourserverip/repos/newrep in a browser( Ex: http://192.168.1.2/repos/newrep ) . you can see newrep revision page after typing username and password created (step 8).

Step 12 » Create basic repository structure with the below commands

# mkdir -p /tmp/svn/{trunk,branches,tags}

# svn import -m 'Initializing basic repository structure' /tmp/svn/ http://localhost/repos/newrep/

Step 13 »  Now you can see updated revision and structure details .

http://192.168.100.120/repos/newrep


Disable anonymous access
If you want to disable the anonymous user to access the repository, just  edit the following line in ‘ostechnix_repo/conf/svnserver.conf’ file.

[root@server ~]# vi /var/www/svn/ostechnix_repo/conf/svnserve.conf
## Line no 12 - Uncomment and Change to 'none' ##
anon-access = none
## Line No 27 - Uncomment to enable acess control ##
authz-db = authz



Ref:
https://ostechnix.wordpress.com/2013/04/30/install-subversion-server-in-centos-6-4-rhel-6-4-scientific-linux-6-4/
http://tecadmin.net/setup-svn-subversion-server-on-centosrhel-56-fedora/
https://www.howtoforge.com/how-to-install-svn-with-apache-dav_svn-on-centos-7
http://www.krizna.com/centos/install-svn-server-on-centos-6/
http://wiki.centos.org/HowTos/Subversion

=================================================================================================================

How To Install Websvn In CentOS :

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.

Features

WebSVN offers the following features:

    Easy to use interface;
    Customisable templating system;
    Colourisation of file listings;
    Blame view;
    Log message searching;
    RSS feed support.

Installation:

1 – Download the websvn to /var/www/html.

# cd /var/www/html
# wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip

2 – Extract the zip package.

# unzip websvn-2.3.3.zip

# mv websvn-2.3.3 websvn

3 – Installl php to your system.

# yum install php

4 – Edit web svn config.

# cd /var/www/html/websvn/include

# cp distconfig.php config.php

# vi config.php

// 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";

:wq

# service httpd restart

Browse websvn now:

http://192.168.100.120/websvn/

Note: if you got error can not find enscript toosl under /usr/bin/enscript

Then fire below command and restart http and browse once again:

#  yum install enscript



Refer:

http://linoxide.com/linux-how-to/install-websvn-subversion-centos-7/
http://www.unixmen.com/install-websvn-centos-7/

No comments: