Introduction

Apache Subversion () 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 used to configure subversion repositories. Its goal is to eliminate using line interface for creation of new SVN projects and users.

In this guide we will SVN with Apache, mod_dav_svn and USVN web interface for user and repository management.

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

,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: SELinux

and reboot your server.

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 wizard:

usvn1

Step 6: Follow USVN Installation Wizard

usvn2
Select your language and time zone:

usvn3

Accept the CeCILL FREE SOFTWARE LICENSE:

usvn4

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.

usvn6
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:

usvn7
Create administrator account and setup password for it:

usvn8
Choose whether you want USVN to checks for updates:

usvn9
Copy and paste following lines at the end of your httpd.conf:

usvn10
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/

usvn11
Go to “Admin” >>> “Users” and create new user account (for example “test_user”):

usvn12
Create new Project (for example “test_proj”):

usvn13
Grant “test_user”access to the “test_proj” project. Go to “Admin” >>> “Groups”:

usvn14
and click the selection:

usvn15
In drop-down menu choose ”test_user” account and add it:

usvn16
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

usvn17
Click OK and enter SVN username and password created above:

usvn18
If all goes well, you will be connected to the repository:

usvn19
Now you can try to upload some files into the repository. Go to the “Repository” >>> “Import” >>> “Import Folder Content …”:

usvn20
You can upload progress at “Console” tab. If everything is OK you will see “Operation successful” message:

usvn21

Print Friendly

Comments

comments

Bài viết liên quan