In this blog post I will guide you about Installing USVN (User Friendly SVN)
Now the questions arise here is What is SVN (Subversion) or USVN? – So, first I will briefly tell you about SVN & USVN, & then we will discuss about How to Install it in Linux. (Those of you who already have a good idea what SVN is please bare with me.)
What is SVN (Subversion)?
Subversion is a free/open source version control system (VCS). That is, 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.”
Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change.
What is USVN (User-friendly SVN)?
USVN is an Open Source Sub Version System which provides you an easy & less confusing way to create and manage SVN repositories on Subversion server. It makes the whole process a piece of cake if you don’t want to get your hand dirty with ‘Command Line’. It is a GUI based system so from configuring the repo to create & manage it is not a difficult task.
Now you can Create New Project, Add New User & Assign User to a Project with just a click. (or to be exact with 2-3 clicks! :P)
Howto Install USVN?
I am using Ubuntu so all the commands & packages I will be using are of Ubuntu & if you are using any other Linux flavor you can modify these packages & commands accordingly.
Step 1: First of all You must update the local cahce.
sudo apt-get autoclean
sudo apt-get update
Step 2: Install the necessary packages.
- Install Apache
- PHP
- MYSQL
- Subversion
To install all these packages run this command.
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server php5-mysql subversion libapache2-svn
Step 3: Now you have to enable the different modules of Apache.
a2enmod rewrite
a2enmod dav_fs
a2enmod authz_svn
Step 4: Restart Apache.
sudo /etc/init.d/apache2 restart ‘or’ sudo service apache2 restart
Step 5: Now the next step is to download the USVN (.tar.gz) from the http://www.usvn.info/download.html (Download the latest version, Which currently available is 1.0.6)
Step 6: This is the Important step in the installation of USVN. Now we have to SCP the downloaded file (Which is in our local machine) to the guest machine i.e Server. (Perform this step in your local machine not on the Guest Server.)
What is SCP?
SCP is a mean of securely transferring computer files between a local host and a remote host or between two remote hosts. It is based on the Secure Shell (SSH) protocol.
A client can send (upload) files to a server, optionally including their basic attributes (permissions, timestamps). Clients can also request files or directories from a server (download). SCP runs over TCP port 22 by default.
SCP Command Structure:
scp file username@IP address:~
scp /home/downloads/file abc@x.x.x.x:~ (/home/downloads is the directory where the file I have downloaded is located it may be or most probably located in another directory on your machine so this is the tricky part, the copy/paste won’t work here! abc is the username, x.x.x.x is the IP of the server & :~ means that we want to copy the file in root directory.)
Step 7: Extract the file (.tar.gz) you transferred via SCP to the Server. (This step will be performed on Guest Machine)
sudo tar -zxf usvn-1.0.6.tar.gz
Step 8: Now Move the file you just uncompressed to /var/www directory. (This is important to move the files to /var/www directory because all the web applications should be placed in this directory. Otherwise, they won’t work!)
mv usvn-1.0.6 /var/www/
Step 9: Change the ownership/Rename the file.
mv usvn-1.0.6 /var/www/usvn
Step 10: Remove index.html file.
cd /var/www (Goto ‘/var/www’ & Remove the file)
rm index.html
Step 11: Change Ownership.
chown -R www-data:www-data /var/www/usvn
chown -R 755 /var/www/usvn
Step 12: Now we have to make some changes in Configuration file of Apache.
vi /etc/apache2/sites-available/usvn (Opening the file with vi editor, You can open it with nano as well.)
and add the below given code in Alias
Alias /usvn /var/svn/usvn/public
<Directory “/var/svn/usvn/public”>
Options +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Step 13: Now you need to restart the Apache server.
/etc/init.d/apache2 restart
Step 14: USVN is installed now! Goto the browser & open this URL “http://ServerIP/usvn/install.php” & the USVN is UP & running.
If you have any difficulties understanding any of the commands feel free to ask in the comments section. THANKS~
excellent guide, but i think there are some mistakes
1) step 11 the correct command is “chmod -R 755 /var/www/usvn”
2) step 12 the correct path is “/var/www/usvn/public”
in my case i had to edit the archive “/etc/apache2/sites-available/default” (step 12) to make it work (creating the archive “/etc/apache2/sites-available/usvn” was useless)
Ignacio,
Thanks for the feedback..
Step 11: chown -R www-data:www-data /var/www/usvn (We are actually giving Apache (User) to access the directory “usvn” placed in /var/www). The good thing about this technique is if at any stage your Server is hacked the hacker will only be able to access this directory only. He won’t have access to go anywhere else.. If you have other things installed on the server like multiple vhosts etc. that would be disastrous.
Step12: /etc/apache2/sites-available/usvn – I agree with you sir, this is actually a syntax thing. I personally like to keep things clean, hence I created a new file. You can keep those settings in the default as well. I would work just fine!
Thanks 🙂
Great guide and I could use the instructions as is…
But after the usvn install thru the web ui, I’m getting the the following error of I goo thru the http://server-ip/usvn.
I already installed through http://server-ip/usvn/install.php.
Configuration Error
English
If you see this page the server configuration is not correct.
This URL should link to the “public” folder of USVN by changing your DocumentRoot or creating an Alias.
If you are not the server administor, please contact him.
Any help will be appreciated. Thank you,
After config usvn, I can use subversion with usvn. But I met an issue that when I commit, I receive an error: “Commit failed (details follow): Server sent unexpected return value (500 Internal Error) in response to POST request for ‘/usvn/svn/svntest/!svn/me'”
Do you know why? Thanks.
@Chen,
I think you need to enable RewriteURL module.
sudo a2enmod rewrite
& you need to install Subversion Module.
sudo apt-get install libapache2-subversion
a2enmod dav_svn
a2enmod authz_svn
Thanks.
Thanks for this tutorial,
But I have a problem I have followed to the letter the steps, but when I go to the interface I am Welcome on USVN but the icons are not shown and if you click on next step j ‘also have this error
AllowOverride Seems to be missing.
Please check your configuration settings and come back.
http://10.1.2.34/usvn/app/login/
Thank you for helping me it’s three days I suffer
Ton tuto est excellent !!!
Bon boulot tu es un grand Merci infinement
I had suffered too much before seeing your tutorial thank you again
I am doing this on Debian 8 and the default Apache root directory is /var/www/html instead of /var/www/ so I pretty much put everything in /var/www/html. This is my /etc/apache2/sites-available/usvn file
Alias /usvn /var/www/html/usvn/public
Options +SymLinksIfOwnerMatch
AllowOverride All
Order allow,deny
Allow from all
I am getting the Configuration Error page when I go to http://ServerIP/usvn/ or http://ServerIP/usvn/install.php
@David,
As you mentioned that you’re using Debain 8 (Jessie) which means the apache version is probably 2.4.10 not one on which the tutorial was actually written & tested (2.2.x).
I think you need to change the following in your vhost,
Alias /usvn /var/www/html/usvn/public
Options +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
Hope this helps 🙂
Hello,
I followed your steps and could access the install.php webpage, but it says that usvn is already installed.
I also can’t access the login page, do you have any idea on what could trigger this issue?
Update : I got it working, the php-mysql version was causing problems regarding the creation of the usvn database. setting it up myself did not resolve the issue, I had to downgrade it. Now it’s fine 😉
Glad it’s working 🙂