Install SVN Server on Fedora 31/30, CentOS/RHEL 8.0/7.7 - Comment Page: 4
This is guide, howto install SVN (Subversion) server on Fedora 31/30/29/28, CentOS 8.0/7.7/6.10, Red Hat (RHEL) 8.0/7.7/6.10.
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 changed. In this regard, many people think of a version control system as a sort of "time machine".
[inttf_post_ad1]
Install SVN (Subversion) Server on Fedora 31/30/29/28, CentOS 8.0/7.7/6.10, Red Hat (RHEL) 8.0/7.7/6.10
1. Change root user
su -
## OR ##
sudo -i
2. Install needed...
Yeah, now that I tried to type in the Location tags I see it goes away.
I believe I’m having a permissions error. When I go to http://localhost/svn/testrepo/ I am getting Could not open the requested SVN filesystem. Where should I look first?
Hi Jen,
Could you first post your subversion.conf, you can put it inside following tags:
<pre lang=”bash”>content</pre> :)
I tried SVNParentPath and it throws an error on httpd restart. No error with SVNPath.
JR, I have it working now. I made another change and went back to the configuration and was able to use SVNParentPath and it now works.
Thank You
Hi Jen,
Nice to hear that you got it working! :)
I believe that your configuration is okay :D This is some WP thing, it allows admin post any tags and filter all other poster tags. I have to take a look that later… :)
But yes, could you try following (on remote machine):
# svn co http://localhost/svn/testrepo .
Authentication realm: Subversion repositories
Password for 'root':
Authentication realm: Subversion repositories
Username: jp
Password for 'jp':
svn: Repository moved permanently to 'http://localhost/svn/testrepo/'; please relocate
[[email protected] testrepo]#
@JD
Looks like everything is okay, but it’s not still working…I just tested this on clean installed CentOS 6.2 and Fedora 16 and this guide is working normally for me…
Could you still post output of following commands:
I’m also using Fedora 16.
# ls -laZ / |grep var
drwxr-xr-x. root root system_u:object_r:var_t:s0 srv
drwxr-xr-x. root root system_u:object_r:var_t:s0 var
# ls -laZ /var |grep www
drwxr-xr-x root root ? www
Clean install the best option? :)
Thanks and actually problem might be with security context of /var/www directory, try to set httpd_sys_content_t also to /var/www dir, with following command:
Then try svn checkout, import, commit, etc? :)
First maybe svn repos clean install, before whole system clean install… :D
I modified your install instructions slightly and wanted to share them with you. These have been used over and over again without problem. The only real difference is that I created OS level accounts for each user and changed some permissions. The most important part was adding apache to the svnusers group because it’s really that account that is running the svn commands and not the actual user.
Note: I am running this in an Oracle VM. To gain access to the repo on my host machine’s browser I had to change the network adapter to Bridged. For my CentOS wired connection I had to remove the “Require IPv4 addressing for this connection to complete”. This will give you the IP address you need to use instead of trying the http://localhost
Create OS user accounts for each user (this is normal for my environment anyway)
repoadm is my svn repo administrator account
Created OS group account called svnusers
Add all accounts that will access the svn repo to svnusers group
Add apache account to the svnusers group
As root, install the mod_dav and subversion
yum install mod_dav_svn subversion
Update the subversion.conf file as you described
As root, create and modify the svn authorized user file
htpasswd -cm /etc/svn-auth-users repoadm (-cm is only used this one time)
htpasswd -m /etc/svn-auth-users testuser (-m to modify the svn-auth-users file)
Create the repo directory structure
mkdir /var/www/svn
chown -R repoadm.svnusers /var/www/svn
As repoadm, create SVN repository
cd /var/www/svn
svnadmin create repo
chown -R repoadm.svnusers repo
Run secure linux commands against the repo
chcon -R -t httpd_sys_content_t /var/www/svn/repo
chcon -R -t httpd_sys_rw_content_t /var/www/svn/repo
As root
Modify the repo permissions and restart apache service
cd /var/www/svn
chmod -R g+w repo
service httpd restart
Thanks again Will, excellent work! :)
If you want to, then you can post this guide to If !1 0 Forums and I can add link to it from this guide as an alternative installation method.
Hey JR,
Just wanted to let you know that I created my own post as you suggested. Here’s the site: http://forums.if-not-true-then-false.com/index.php/topic,70.0.html
Great tutorial, simple and nice ! Thanks!
i am not able to open multiple svn repository configured with ldap active directory authentication one repos is working file but another have same configuration but i am not able to browse others only one repos is going fine.
will anyone is help me out.
i am not able to browse more than one svn repository. i have configured svn with ldap (active directory) authentication but not able to more than one repos. i have checked my httpd.conf, subversion.conf, and every repos have same configuration file one is opened fine with username & passwd of active directory user. another repos gave the error ….
Not Found
The requested URL /1000 was not found on this server.
Apache/2.2.3 (CentOS) Server at 10.0.0.108 Port 80
i am not able to browse more than one svn repository. i have configured svn with ldap (active directory) authentication but not able to more than one repos. i have checked my httpd.conf, subversion.conf, and every repos have same configuration file one is opened fine with username & passwd of active directory user. another repos gave the error ….
Not Found
The requested URL /1000 was not found on this server.
Apache/2.2.3 (CentOS) Server at 10.0.0.108 Port 80
Hi,
Getting Conflict error message while trying to commit a file from different PCs and logged in as different Users. Please help to resolve the issue.
Hi Kiran,
Could you post full error message and your svn configuration?
first check the permission.. what permission the user have.. than after check the same file or folder is there already exists…
i did easyapache update to dav,installed subversion via yum but when installing mod_dav_svn i get this:
[email protected] [~]# yum install mod_dav_svn
Loaded plugins: rhnplugin
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mod_dav_svn.x86_64 0:1.6.11-2.el6.4 will be installed
–> Processing Dependency: httpd-mmn = 20051115 for package: mod_dav_svn-1.6.11-2.el6.4.x86_64
–> Finished Dependency Resolution
Error: Package: mod_dav_svn-1.6.11-2.el6.4.x86_64 (cloudlinux-x86_64-server-6)
Requires: httpd-mmn = 20051115
You could try using –skip-broken to work around the problem
** Found 5 pre-existing rpmdb problem(s), ‘yum check’ output follows:
bandmin-1.6.1-5.noarch has missing requires of perl(bandmin.conf)
bandmin-1.6.1-5.noarch has missing requires of perl(bmversion.pl)
bandmin-1.6.1-5.noarch has missing requires of perl(services.conf)
exim-4.77-1.x86_64 has missing requires of perl(SafeFile)
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
it is apache 2.2.22 cpanel with centos 6.2×64
Hi Maroje,
Could you please post output of following commands:
The same problem with Maroje Sardelich. Output commands:
[email protected] [~]# rpm -qa httpd\*
[email protected] [~]# yum list httpd\*
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirrors.xmission.com
* extras: mirror.san.fastserv.com
* updates: mirrors.sonic.net
Error: No matching Packages to list
Can you help me? Thanks!
[email protected] [~]# rpm -qa httpd\*
[email protected] [~]# yum list httpd\*
Loaded plugins: rhnplugin
cloudlinux-x86_64-server-6 | 1.0 kB 00:00
Error: No matching Packages to list
this is the output.first command doesnt output anything.i forgot to tell,it is cloudlinux.
@Thuan and @Maroje
Could you both post output of following commands:
[email protected] [~]# yum repolist
Loaded plugins: rhnplugin
repo id repo name status
cloudlinux-x86_64-server-6 CloudLinux Server 6 x86_64 8,896+619
repolist: 8,896
lsb_release says command not found
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CloudLinuxServer
Description: CloudLinux Server release 6.2
Release: 6.2
Codename: n/a
Maybe stupid question, but is your system registered?
http://www.cloudlinux.com/docs/cln_register.php
Could you paste output of following command (example to http://pastebin.com):
it is :)
http://www.adriadata.net/somefile.txt
Hi Maroje,
Sorry for long wait…I forgot to check this, but looks like your repos doesn’t have httpd package at all… :/ Maybe you should use some external repo to get httpd installed.
well since it is a cpanel server working perfectly,I’m not sure what do you mean with httpd,since yum works just fine…
I’m not sure what web server CloudLinux cpanel is using, but CloudLinux repo does not have httpd package which is dependency for mod_dav_svn package.
cloudlinux is just an kernel replacement,nothing else is touched,httpd is standard cpanel compiled httpd,therefore it is not updated thru yum,but only via inbuilt easyapache in cpanel.So I have to go around that dependency to get it installed?
Okay, now I understand. You could try to install mod_dav_svn manually without yum if you then can get it running with your easyapache installation.