• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to Install & Configure Apache Subversion (SVN) in CentOS 7

555

To Install & Configure Apache Subversion (SVN) in CentOS 7

Apache Subversion is an open source revision controlling program. It stores the historic source codes, documents, and web pages.Installation & configuration of SVN on CentOS 7 is explained in this article.


To install SVN & Apache Packages

Run the following command to install the svn & apache (http) packages.

[root@linuxhelp1 ~]# yum install httpd subversion mod_dav_svn
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.webwerks.com
 * extras: centos.webwerks.com
 * updates: centos.webwerks.com
Resolving Dependencies
-->  Running transaction check
.
.
.
Installed:
  httpd.x86_64 0:2.4.6-40.el7.centos.1            mod_dav_svn.x86_64 0:1.7.14-10.el7           
  subversion.x86_64 0:1.7.14-10.el7              

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7                             apr-util.x86_64 0:1.5.2-6.el7          
  httpd-tools.x86_64 0:2.4.6-40.el7.centos.1           mailcap.noarch 0:2.1.41-2.el7          
  subversion-libs.x86_64 0:1.7.14-10.el7              

Complete!

To configure Apache Subversion

Open the configuration file in your favourite editor

[root@linuxhelp1 ~]# vim /etc/httpd/conf.modules.d/10-subversion.conf

Add the following lines.

Alias /svn /var/www/svn

DAV svn
SVNParentPath /var/www/svn/
AuthType Basic
AuthName " SVN Repository" 
AuthUserFile /etc/svn-auth-accounts
Require valid-user

Save and Quit the file.

To create SVN Users

Use htpasswd command in order to create SVN users.

[root@linuxhelp1 ~]# htpasswd -cm /etc/svn-auth-accounts linuxhelpuser
New password:
Re-type new password:
Adding password for user linuxhelpuser

The &ndash c option &rarr to create the password file
The &ndash m option &rarr to create MD5 encryption password for the user.

Utilise the following command to create & configure SVN Repository.

[root@linuxhelp1 ~]# mkdir /var/www/svn
[root@linuxhelp1 ~]# cd /var/www/svn
[root@linuxhelp1 svn]# svnadmin create repo
[root@linuxhelp1 svn]# chown apache.apache repo/
[root@linuxhelp1 svn]# chcon -R -t httpd_sys_content_t /var/www/svn/repo/
[root@linuxhelp1 svn]# chcon -R -t httpd_sys_rw_content_t /var/www/svn/repo/

Add the http and https services in the firewall

[root@linuxhelp1 svn]# firewall-cmd --permanent --zone=public --add-service=http
success
[root@linuxhelp1 svn]# firewall-cmd --permanent --zone=public --add-service=https
success
[root@linuxhelp1 svn]# firewall-cmd --reload
success

Enable and start the http services

[root@linuxhelp1 svn]# systemctl enable httpd.service
ln -s ' /usr/lib/systemd/system/httpd.service'  ' /etc/systemd/system/multi-user.target.wants/httpd.service' 
[root@linuxhelp1 svn]# systemctl restart httpd.service

Open the web browser and try to access SVN repo using https://< IP_address> /svn/repo
Install-Configure-Apache-Subversion-SVN-revision-controlling-program-stores-historic-source-codes-documents-web-pages-CentOS7-access-SVN-repo

Install-Configure-Apache-Subversion-SVN-revision-controlling-program-stores-historic-source-codes-documents-web-pages-CentOS7-repo-revision0

To disable anonymous access on SVN Repository

Open the svnserve.conf file.

[root@linuxhelp1 svn]# vim /var/www/svn/repo/conf/svnserve.conf

Add the following lines.

anon-access = none
authz-db = authz

To import project directory’ s content to SVN repository.

[root@linuxhelp1 svn]# cd /mnt/
[root@linuxhelp1 mnt]# mkdir linuxhelpproject
[root@linuxhelp1 mnt]# cd linuxhelpproject/
[root@linuxhelp1 linuxhelpproject]# touch testfile_1   touch testfile_2
[root@linuxhelp1 linuxhelpproject]#

Run the SVN command to import the linuxhelpproject to the repo.

[root@linuxhelp1 linuxhelpproject]# svn import -m " First SVN Repo"  /mnt/linuxhelpproject/ file:///var/www/svn/repo/linuxhelpproject
Adding         testfile_1
Adding         testfile_2

Committed revision 1.

Open the browser and navigate to https://< IP_address> /svn/repo
Install-Configure-Apache-Subversion-SVN-revision-controlling-program-stores-historic-source-codes-documents-web-pages-CentOS7-Open-browser

Install-Configure-Apache-Subversion-SVN-revision-controlling-program-stores-historic-source-codes-documents-web-pages-CentOS7-testfiles

Tags:
noah
Author: 

Comments ( 1 )

shankar
I had committed from client machine to svn repo , i had created repo in /var/www/svn/ after committing the project structure is not visible . But when i had checked in browser the status was updated. Please help me to solve
Add a comment

Frequently asked questions ( 5 )

Q

Installation procedure for Fedora, please?

A

Run the following command,
# dnf install httpd subversion mod_dav_svn

Q

Under htpasswd for svn what type of authentication is used?

A

This is basic authentication which undergoes base64 encoding

Q

I wanna enable only for certain users?

A

disable anonymous access on SVN Repository,
" /var/www/svn/repo/conf/svnserve.conf"
anon-access = none
authz-db = authz

Q

How to import already created project to it?

A

Gfirst mount your project under a mount point and then follow svn import -m "First SVN Repo" /mnt/linuxhelpproject/ file:///var/www/svn/repo/linuxhelpproject

Q

How do I check out the Subversion code?

A

Use the Subversion client:
# svn co http://svn.apache.org/repos/asf/subversion/trunk subversion

Related Tutorials in How to Install & Configure Apache Subversion (SVN) in CentOS 7

Related Tutorials in How to Install & Configure Apache Subversion (SVN) in CentOS 7

How To Install AnyDesk on Centos 7
How To Install AnyDesk on Centos 7
Apr 2, 2018
How to install Tiki Wiki CMS Groupware on CentOS 7
How to install Tiki Wiki CMS Groupware on CentOS 7
May 31, 2018
How to install PHP ImageMagick on CentOS 7
How to install PHP ImageMagick on CentOS 7
Nov 4, 2017
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
How to Upgrade and Downgrade the PHP Versions on CentOS 7.6
Jun 4, 2019
How to install Apache from Source Code on CentOS 7
How to install Apache from Source Code on CentOS 7
Oct 21, 2017
How to enable or disable repositories in CentOS
How to enable or disable repositories in CentOS
Mar 28, 2018
How to install AWStats on CentOS 7
How to install AWStats on CentOS 7
Dec 8, 2017
How to install Apache JMeter in CentOS 7
How to install Apache JMeter in CentOS 7
Mar 24, 2017

Related Forums in How to Install & Configure Apache Subversion (SVN) in CentOS 7

Related Forums in How to Install & Configure Apache Subversion (SVN) in CentOS 7

CentOS
connor class=
How To Completely Remove Apache package On CentOS 7.6
May 14, 2019
CentOS
ceriaimmaculate class=
setfacl : command not found
Jan 3, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018
CentOS
landon class=
Command to find SNMP Version
May 28, 2018
CentOS
arjitharon class=
cannot start minio service help
Mar 10, 2018
Apache tomcat
AadrikaAnshu class=
Cannot find ./catalina.sh The file is absent or does not have execute permission This file is needed to run this program
Jun 17, 2019
gitlab
caden class=
Insufficient space in download directory /var/cache/yum/x86_64/6/base/packages
Jul 22, 2019
OpenVAS
frank class=
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error"
Dec 20, 2018
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help David Lopez Guillen ?
Ayuda urgente instale SSL para servidor Opensuse y ahora no funciona tengo servicio web

hola segui este tutorial para tener un certificado ssl y ahora no se ve mi app en la red, espero alguien pueda ayudarme, tengo M9oodle en3.5 en un servidor open suse y ahora no funciona por favor ayuda.

https://www.linuxhelp.com/how-to-create-ssl-certificate-in-opensuse

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.