How to install SVN server with USVN, Apache, mod_dav_svn on CentOS 6
Introduction
Apache Subversion (SVN) is an open source version control system. It is used by developers to maintain versions of files such as source code, documents, web pages etc.
USVN stands for User-Friendly SVN. It is a web interface written in PHP used to configure subversion repositories. Its goal is to eliminate using command line interface for creation of new SVN projects and users.
In this guide we will install SVN server with Apache, mod_dav_svn and USVN web interface for user and repository management.
We can install SVN on your VPS or dedicated server just for $40. Click here too order SVN server installation service.
Step 1: Install Basic Packages
We will install LAMP, additional module for Apache (mod_dav_svn), Subversion and several useful utilities like (wget and unzip).
We use the following software versions:
- Apache/2.2.15
- PHP 5.3.3
- mysql,version 5.1.73
- svn, version 1.6.11
- USVN, version: 1.0.7
Set all services to start automatically after system reboot:
Step 2: Create System User for USVN
Step 3: Download and Install USVN Code
Add “apache” user to “usvnuser” group:
Step 4: Disable SELinux
and reboot your VPS.
Step 5: Configure Apache Virtual Host for USVN
Edit apache configuration file and put VirtualHost config for USVN there. Replace usvn.example.com with your domain.
save httpd.conf file and restart httpd daemon:
To start the installation USVN via web-interface we need to fix a bug in app/bootstrap.php.
find this line:
and change it to:
Now, try opening URL http://usvn.myexample.com. If everything is configured correctly you will see the setup wizard:
Step 6: Follow USVN Installation Wizard
Select your language and time zone:
Accept the CeCILL FREE SOFTWARE LICENSE:
Create directory named “files” in /home/usvnuser/public_html/, change owner to “usvnuser” and set 777 permissions to allow Apache write access to that directory.
General configuration settings. You can keep default.
![6](http://www.webhostingzone.org/wp-content/uploads/2014/07/6.png)
Step 7: Database Configuration
Login to mysql console as root, create new user, database and grant user privileges to access database:
Fill in database access details:
Create administrator account and setup password for it:
Choose whether you want USVN to checks for updates:
Copy and paste following lines at the end of your httpd.conf:
Add code below to the end of httpd.conf:
save file and restart apache:
Step 8: Creating Your First Repository
Login as admin at http://usvn.myexample.com/login/
Go to “Admin” >>> “Users” and create new user account (for example “test_user”):
Create new Project (for example “test_proj”):
Grant “test_user”access to the “test_proj” project. Go to “Admin” >>> “Groups”:
In drop-down menu choose ”test_user” account and add it:
After those steps, you can try to access SVN repository using SVN client. I will be using SyncroSVN client.
Step 9: Accessing Repository via SVN client
Open Syncro SVN Client, go to the “Repository” >>> “New Repository Location…”
Repository URL is: http://usvn.myexample.com/svn/test_proj/trunk
Click OK and enter SVN username and password created above:
If all goes well, you will be connected to the repository:
Now you can try to upload some files into the repository. Go to the “Repository” >>> “Import” >>> “Import Folder Content …”:
You can monitor upload progress at “Console” tab. If everything is OK you will see “Operation successful” message: