If Not True Then False

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

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.

dp

m not getting the access to repository

its telling me (‘.’ is not a working copy) what does that implies ??

reply Reply
dp

well m using fedora 12 n m trying to install svn so tht my co worker can work on the project properly

i installed as said above but wen m doing the
step 5 i.e.
Create and configure SVN repository

these two command is not working

chcon -R -t httpd_sys_content_t /var/www/svn/testrepo

## Following enables commits over http ##
chcon -R -t httpd_sys_rw_content_t /var/www/svn/testrepo

as it is showning me “chcon: can’t apply partial context to unlabeled file”

reply Reply
JR

Hi dp,

Try following instead:


chcon -R -t apache:object_r:httpd_sys_rw_content_t /var/www/svn/testrepo
reply Reply
dp

Now for a fresh installation when I’m trying to run your command or previous one,it’s throwing :
chcon: failed to set type security context component to `apache:object_r:httpd_sys_rw_content_t’: Invalid argument

plz help

reply Reply
dp

well,it run,after disabling SELinux.but now a new issue:
svn : couldn’t perform atomic initialization

while trying to import a file or checking out the repository.

reply Reply
dp

well i did all possible combination ….

still getting the error svn: could not perform atomic initialization

meanwhile i updated SQlite

yum update sqlite

n its running fine
m all set to go now thnx for ur support n time

@JR wud you like to gv me your email id jst in case future i need ur help for linux related issues…

reply Reply
JR

Hi Ajith,

Could you tell more specific about your problem?

reply Reply
RM

Add a soft link to the svn area to make it accessible by the port 80 http service:

ln -s /var/www/svn /var/www/html/svn

reply Reply
ac

I have setup svn successfully.

But during initial Import I’m getting the error :
——————————————————–
svn : Repository moved permanently to ‘http://localhost/svn/xxxxxx/’; please relocate
——————————————————–

my svn location is -> /var/www/svn

my subversion.conf settings is:
———————————————————-
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so

DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/svn-auth-users
Require valid-user

————————————————-

I have virtual host environment.
—————————————————-

ServerName svn
DocumentRoot /var/www/svn/

—————————————————-

reply Reply
ac

please find the configurations as below:

/etc/httpd/conf.d/sunversion.conf

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

DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/svn-auth-users
Require valid-user

virtualhost – /etc/httpd/conf/virtualhost.conf

ServerName svn
DocumentRoot /var/www/svn/

reply Reply
JR

Hi ac,

Location tags are missing.

So could you post again same configs to http://pastebin.com or here inside following tags:
<pre lang=”bash”>config</pre>

reply Reply
ac

DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/svn-auth-users
Require valid-user

reply Reply
ac

DAV svn
SVNParentPath /var/www/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/svn-auth-users
Require valid-user

reply Reply
JR

Hi ac,

What if you try change your virtual host config:


DocumentRoot /var/www/svn

And restart your web server? Does it make any difference?

reply Reply
Will

This may seem like a silly question, but did you create the repo?

reply Reply
Dan

very much similar to a git-http-backend setup. good simple intro, thanks!

reply Reply
JR

Hi Fernando,

You can add files simple using “svn add” command, following is full example (howto create some directory, checkout, create file, add it to svn, check status and commit):


mkdir /home/fernando/testrepo

cd /home/fernando/testrepo

svn co http://localhost/svn/testrepo/trunk .

echo "Test content" > test1.txt

svn add test1.txt

svn status

svn commit
reply Reply
Ramesh G

Hi,
Thanks for the useful site. Could anyone clarify my doubt. I installed the SVN successfully as per the above method and when i want to access the path it should always ask for the user id and passwrd. Now it is only one time it is asking. Any suggestion please.

reply Reply
ck

the “chcon” section of commands refers to SELINUX permissive states, you can skip that is SELINUX is disabled or not installed at all.
#sestatus command will show you one of its 3 states if installed.

reply Reply
JR

Hi ck,

Very good point, you are totally right that chcon commands it’s not needed if you have SELinux disabled or not installed at all. I will update this guide too, thank you for this.

reply Reply
johnwilcox

Hi,

Is it a requirement for the SVN users also to have accounts under /home/, ? I am using CentOS and I keep getting the following ;

svn ls http://x.y.x.z/svn/ –username t1 –password xxx

svn: access to ‘http://x.y.x.z/svn’ forbidden

My SVN directory setup is as follows;
/var/projects/svn

The config file is as follows;

cat /etc/httpd/conf.d/subversion.conf

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

DAV svn
SVNParentPath /var/projects/svn
AuthType Basic
AuthName “Subversion repositories”
AuthUserFile /etc/svn-auth-users
AuthzSVNAccessFile /etc/svn-access-control
Require valid-user

$ cat /etc/svn-access-control
[groups]
testgroup = j1mb1r, testsvn

[/testrepo:/]
@testgroup = rw

I don’t have home directories for these users. Do I need to set it ?

reply Reply
JR

Hi johnwilcox,

You don’t need real Linux users, it should be enough if you have this user on your “auth-users” file and “access-control” file. Check both files and restart Apache.

reply Reply
Orozco

please teach me

1. how to delete the exist user (such like testuser)?
2. I complete all the steps you show up, and I use Tortoise tool to access SVN. When I check-out the folder from SVN in local folder and I do some tests (such like import some files in the folder). Then I can’t see any additional label on those files such labels are like “Green confirmed”, “Red exclamation” …etc. Can you teach me how to enable those functions?

thanks

reply Reply
JR

Hi Orozco,

1. You can delete user from htpasswd file using following command:


htpasswd -D /etc/svn-auth-users testuser

2. Do you mean some Tortoise SVN client specific options? You can check Tortoise SVN settings, maybe you can enable those colors from there.

reply Reply