If Not True Then False

Install SVN Server on Fedora 25/24, CentOS/RHEL 7.3/6.8/5.11 - Comment Page: 7

This is guide, howto install SVN (Subversion) server on Fedora 25/24/23/22/21/20, CentOS 7.3/6.8/5.11, Red Hat (RHEL) 7.3/6.8/5.11. What is SVN (Subversion)? Subversion is a free/open-source version control system. Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data, or examine the history of how your data...

311 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Input your comment.
help

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Input your name.

sam

Oh i have another problem,htpassd can’t create the file /etc/svn-auth-users,What should i do?

reply Reply
JR

Hi sam,

You have to create this file also as root user.

If you check this guide first step, here is commands howto change root user:


su -
## OR ##
sudo -i
reply Reply
sam

Hi, i cant execute this command. chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo, even the apache cant restart?

reply Reply
sam

Do i have to follow apache and svn read more installations and configurations for svn to work?

reply Reply
varun Kumar

hi team,
i can access svn repos from URL but when i am committing project on the svn server then not taking user name and password. and below mentioned error i am getting.

error while creating module: org.tigris:subversion.javal.clientException :RA Layerrequest failed
svn: server sent unexpected return value (403 Forbidden) in response to MKACTIVITY request for /SVN/Repos/!Svn/act/3b9f9810-2eb1-4a37-a16832f74506b35a

reply Reply
JR

Hi varun,

A few questions first.

Is this just fresh install or was this working before?

Are you using some external client to do commit?

Did you updated some packages or modified configs, before this problem occurred?

What OS you are running?

reply Reply
varun Kumar

No i dont have any client i was using through eclipse, can you help me for the svn client for centos 6.0

Please help me for SVN client

reply Reply
JR

Actually you use client when you use SVN through Eclipse. One question is, do you have exactly same path on SVN server what you use on your Eclipse client?

Another thing to try is use svn command line client on server. Do you still get same error?

And you can also check your server /etc/audit/audit.log file, do you have any svn/subversion errors?

And also you could post output of following commands:


ls -laZ /path/to/repoparent/repo

## And also ls -laZ from your repo parent ##
ls -laZ /path/to/repoparent
reply Reply
Cuadrato

Hello
Thaks for this tutorial, it make me the day!

I have an error with fedora 18, on importing templates with:
svn import -m ‘Initial import’ /tmp/svn-structure-template/ http://localhost/svn/testrepo/

but trubel was when i added next two lines to block anonymous users:
## Disable anonymous access ##
anon-access = none

## Enable access control ##
authz-db = authz

for some reason fedora have trubels for recognize them.

Simply coment lines (becuse mark an errorr to restart httpd), restar it and create template with your instructions.

I hope this coment was helpful.

Regards

reply Reply
Cuadrato

Hello again.
Let me make an correction.
SELinux was active and send to me an un expected server answer.

setenforece 0

do de job

Regards

reply Reply
varun Kumar

Hi Team,

can i receive mail when users commit his project on the SVN server, If this is possible then please help me what need to be do?

reply Reply
JR

Hi varun Kumar,

Just check alternatives to accomplish this task.

Actually you can use svn post-commit hook, like described here or you can use redeveloped/improved version of mailer.py svnmailer, which looks actually very nice script.

I haven’t tested this, but looks very easy to get email notifications after commits.

reply Reply
Akhil

Hi JR

I am getting httpd unpacking error while trying to install mod_dav_svn. on centOS 6.4

Running Transaction
Installing : subversion-1.6.11-9.el6_4.x86_64 1/3
Installing : httpd-2.2.15-29.el6.centos.x86_64 2/3
Error unpacking rpm package httpd-2.2.15-29.el6.centos.x86_64
warning: /etc/httpd/conf/httpd.conf created as /etc/httpd/conf/httpd.conf.rpmnew
warning: /etc/httpd/conf/magic created as /etc/httpd/conf/magic.rpmnew
error: unpacking of archive failed on file /etc/httpd/logs: cpio: rename
Installing : mod_dav_svn-1.6.11-9.el6_4.x86_64 3/3
Verifying : mod_dav_svn-1.6.11-9.el6_4.x86_64 1/3
Verifying : subversion-1.6.11-9.el6_4.x86_64 2/3
Verifying : httpd-2.2.15-29.el6.centos.x86_64 3/3

Installed:
mod_dav_svn.x86_64 0:1.6.11-9.el6_4 subversion.x86_64 0:1.6.11-9.el6_4

Failed:
httpd.x86_64 0:2.2.15-29.el6.centos

reply Reply
JR

Hi Akhil,

Could you post output of following commands:


ls -la /etc/httpd

ls -la /etc/httpd/logs
reply Reply
Jirong Hu

I followed your articles to install my SVN server with Apache2 successfully. Now I want to enable https. Do you have some instructions like this?

reply Reply
JR

Hi Jirong Hu,

Do you want use self-signed SSL certificate or commercial SSL certificate?

reply Reply
sinhatpro

Hi JR

I’m post some step then I to do. Please help me a sulotion for error :

DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/apache2/dav_svn.passwd
AuthzSVNAccessFile /etc/apache2/mods-enabled/dav_svn.authz
Require valid-user

5. Create Repository for test:
mkdir /var/www/svn

6. Authencation for user access forder
svnadmin create myproject
chown -R www-data myproject

7. Create username
htpasswd -cm /etc/sapache2/dav_svn.passwd testuser1
htpasswd -m /etc/apache2/dav_svn.passwd testuser2

9. Configure file dav_svn.authz control access for every user.
[groups]
testuser1
testuser2

[myproject:/]
testgroup1 = rw
testuser2 = r

reply Reply
JR

Hi sinhatpro,

I read your both comments and looks like you don’t have myproject2 just only myproject?

Then also your dav_svn.authz file groups is missing group names, you only list testuser1 and testuser2, then you set rw permission to testgroup1.

But yes you are right, it’s not SELinux problem, because you are using Ubuntu…

reply Reply
zinger

If step 5 fails with message

chcon: can't apply partial context to unlabeled file

do these commands instead


chcon -h system_u:object_r:httpd_sys_content_t /var/www/svn/testrepo
chcon -R -h apache:object_r:httpd_sys_content_t /var/www/svn/testrepo/*

reply Reply
edivaldo

I’m not getting add.

for example:

[cit@Ltv10 repos]$ svn add test.txt
svn: ‘.’ is not a working copy

[cit@Ltv10 repos]$ svn status
svn: warning: ‘.’ is not a working copy

[cit@Ltv10 repos]$ svn commit
svn: ‘/var/www/svn/repos’ is not a working copy

But,

[cit@Ltv10 repos]$ sudo svn co http://localhost/svn/repos/
[sudo] password for cit:
A repos/trunk
A repos/branches
A repos/tags
Checked out revision 1.


follown my file subversion.config:

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

DAV svn
SVNParentPath /var/www/svn
SVNPathAuthz off

Do you can help me?

TKS,

reply Reply
JR

Hi edivaldo,

You can’t add files or do anything if you have not working copy.

What happens after checkout, if you run:


svn status
reply Reply