Shashikant shah

Saturday 1 September 2012

SVN Subversion Configuration RHEL-5.5


                            SVN Subversion

SERVER IP :- 192.168.0.10

HOSTNAME :- shashi.example.com

1. Create a user :- shashi

2. Create a Directory : -

# mkdir /usr/lib/svn

# cd /usr/lib/svn

3. Download Some package :-


4. Install some package :-
# yum install httpd php
# yum install gcc glibc glibc-common
# yum install gd gd-devel
# yum install zlib
#yum install neon  
-->


5. go to this path :-

# cd /usr/lib/svn
# tar -xvf subversion-1.4.6.tar.gz
#
tar -xvzf subversion_deps-1.4.6.tar.gz (Don’t worry for that it is keeping all 
                                                              the libraries filesinside subversion-1.4.6)
# tar -xvzf apr-1.2.12.tar.gz
# cd apr-1.2.12 (autoconf and libtool )
# ./buildconf
# ./configure
# make

# tar -xvzf apr-util-1.2.12.tar.gz
# cd apr-util-1.2.12
# ./buildconf - -with-apr=path to apr directory (/usr/lib/svn/apr-1.2.12)
# ./configure - -with-apr=path to apr directory (/usr/lib/svn/apr-1.2.12)
# make

# cd subversion-1.4.6
# ./autogen.sh
# ./configure –with-berkelay-db=/usr/lib/svn/db-4.6.21 (path of berkelay data base)
# make
# make install


6. Before that we have to check whether mod_dav_svn and mod_authz_svn modules are present or not,if not then install it.

# yum install mod_dav_svn

# vim /etc/httpd/conf/httpd.conf file
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
Make sure you will add these lines after LoadModule dav_module modules/mod_dav.so.


7. Now create one repository with svnadmin command.Run this command inside your subversion folder
# cd /usr/lib/svn/subvesion-1.4.6
# svnadmin create repos
# ls repos (showing this file)
conf
dav
db
format
hooks
locks
README.txt
8. Then at the end of the httpd.conf file you have to add

#for svn path
<Location /usr/lib/svn/subversion-1.4.6/repos>
DAV svn
SVNPath /usr/lib/svn/subversion-1.4.6/repos
</Location>

# /etc/init.d/httpd restart

# chkconfig httpd on

9. For security purpose to give authentication to the user we have to create authentication file with the command,

htpasswd -cm /etc/svn-auth-file shashi
New password : *****
Re-Type passwd : *****

10. Create svn-access-file inside /etc

# vim /etc/svn-access-file
[/]
* = rw

This will give authentication to every user specified in Require user inside location.

Download repos-style-with-plugins-2.4.zip

# unzip /root/Desktop/repos-style-with-plugins-2.4.zip

# mv /root/Desktop/repos-web /

# cp -rvf  /repos-web /var/www/html

11. You can specify this inside httpd.conf file as

<VirtualName *:80>

ServerName shashi.example.com

ErrorLog "|rotatelogs  /var/log/httpd/svn/error-%Y-%m-%d.log 86400"

Customlog "|rotatelogs  /var/log/httpd/svn/access-%Y-%m-%d.log 86400" common

<Location /usr/lib/svn/subversion-1.4.6/repos>
 

DAV svn
 

SVNPath /usr/lib/svn/subversion-1.4.6/repos
 

AuthzSVNAccessFile /etc/svn-access-file

SVNIndexXSLT /repos-web/view/repos.xsl

AuthType Basic
 

AuthName “Subversion repository”
 

AuthUserFile /etc/svn-auth-file
 

Require valid-user
 

</Location>

# /etc/init.d/httpd restart

12. Now you are ready to import files in the repository, with the following command.

# svn import -m “Initial import” file:///usr/lib/svn/subversion-1.4.6/repos
                         OR
# svn import -m "Initial" file:///usr/lib/svn/subversion-1.4.6/repos

@Add unicom folder 

# mkdir /root/Desktop/unicom

# svn import -m “Initial import” /root/Desktop/unicom  file:///usr/lib/svn/subversion-1.4.6/repos/new folder name

# /etc/init.d/httpd restart

13.Check that you can run it in the browser.


OR





ADD LDAP SERVER ON SVN (SUBVERSION) :-

1. add the openldap client on SVN Server

2. Go to this path in svn server

# vim /etc/httpd/conf/httpd.conf

 

@  SVN login for ldap user :-




Showing some Error:-

<D:error>
     <C:error/>
     <m:human-readable errcode="2">could not open the requested SVN
filesystem
     <m:human-readable>
      </D:error>


Solution :-

go to httpd.conf file

add this line:-

SVNListParentPath   on









No comments:

Post a Comment