- After loggin in change the user into root user
- sudo -i
- You can install required packages using (This command will install Apache if its not already installed)
- yum install mod_dav_svn subversion
- After this step SVN will be installed in the server and now we can configure it :)
- Navigate to /etc/httpd/conf.d/subversion.conf and modify it as below
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so<Location /svn>
<Location>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
LoadModule authz_svn_module modules/mod_authz_svn.so<Location /svn>
<Location>
DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName "Subversion repositories"
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>
- You can create SVN users using following commands
- htpasswd -cm /etc/svn-auth-users testuser
- This will request password for for the user
- Now finally since we sucessfully installed SVN created SVN user next we can create the repository :)
- mkdir /var/www/svn
- cd /var/www/svn
- svnadmin create mySvnRepo
- chown -R apache.apache mySvnRepo
- Next we need to restart the Apache server
- service httpd restart
Once you provided the credentials you will be able to check the your repository and the content if any,
Now lets configure WSO2 servers as Manager and Workers
- Download and install SVNKit (svnClientBundle-1.0.0.jar) from http://dist.wso2.org/tools/svnClientBundle-1.0.0.jar to the/repository/components/dropins folder.
- Download http://maven.wso2.org/nexus/content/groups/wso2-public/com/trilead/trilead-ssh2/1.0.0-build215/trilead-ssh2-1.0.0-build215.jar and copy it to /repository/components/lib folder.
- Open <RepoLocation>/conf/svnserve.conf and set following lines to configure authentication for the new repository.
- anon-access = none
- auth-access = write (permission for authenticated users)
- password-db = passwd (source of authentication)
Enabling DepSync on the manager node
You can configure DepSync in the /repository/conf/carbon.xml file on the manager node by making the following changes,
<DeploymentSynchronizer>
<Enabled>true</Enabled>
<AutoCommit>true</AutoCommit>
<AutoCheckout>true</AutoCheckout>
<AutoCheckout>true</AutoCheckout>
<RepositoryType>svn</RepositoryType>
<SvnUrl>http://localhost/svn/mySvnRep/</SvnUrl>
<SvnUser>testuser</SvnUser>
<SvnPassword>testpass</SvnPassword>
<SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer>
Enabling DepSync on the worker nodes
In worker node you need to set the AutoCommit property to false as below,<DeploymentSynchronizer>
<Enabled>true</Enabled>
<AutoCommit>false</AutoCommit>
<AutoCheckout>true</AutoCheckout>
<RepositoryType>svn</RepositoryType>
<SvnUrl>http://localhost/svn/mySvnRep/</SvnUrl>
<SvnUser>testuser</SvnUser>
<SvnPassword>testpass</SvnPassword>
<SvnUrlAppendTenantId>true</SvnUrlAppendTenantId>
</DeploymentSynchronizer>
[1] https://docs.wso2.com/display/CLUSTER420/SVN-based+Deployment+Synchronizer
[2] www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel
No comments:
Post a Comment