Subversion on cloud

 1-click AWS Deployment    1-click Azure Deployment

Overview

Subversion is a free, open-source control system that can be used to keep track of source file and documents.Subversion comes with mod_dav_svn, which is an Apache module that allows you to access and manage the Subversion repository through a web-based interface 

Apache Subversion (often abbreviated SVN, after its command name svn) is a software versioning and revision control system distributed as open source under the Apache License.[2] Software developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly compatible successor to the widely used Concurrent Versions System (CVS). 

Apache Subversion 1.7.14 is a super set of all previous Subversion releases and is as of the time of its release considered the current “best” release. Any feature or bug fix in 1.0.x through 1.7.x is also in 1.8, but 1.8 contains features and bug fixes not present in any earlier release. The new features will eventually be documented in a 1.8 version of the free Subversion book (svnbook.red-bean.com).

How to Install Apache Subversion :

Prerequisites

 

Two Alibaba Cloud ECS instances, one installed with an Ubuntu 16.04 server version and the other with an Ubuntu 16.04 desktop version..

  • A static IP address 192.168.0.102 that is set up with one of your ECS instances.
  • A root password that is set up to your instance.

For reference on how to complete these prerequisites, you can refer to create a new ECS instance and connect to your instance. Next, once you are logged in to your ECS instance, make sure to run the apt-get update -y command to update your base system with the latest available packages.

Install Apache Subversion

First, you will need to install Apache web server to your system. You can install it with the following command:

apt-get install apache2 apache2-utils -y

Once the Apache web server is installed, start Apache service and enable it to start on boot time with the following commands:

systemctl start apache2
systemctl enable apache2

Next, install Apache Subversion by running the following command:

apt-get install subversion subversion-tools libapache2-mod-svn libapache2-svn -y

Configure Subversion

First, you will need to create a directory for Subversion repository. You can create it with the mkdir /opt/svn command. Next, create the repository called svnrepo inside /opt/svn directory with the following command:

svnadmin create /opt/svn/svnrepo

Then give proper permission to the repository with the following command:

chown -R www-data:www-data /opt/svn/svnrepo

Next, you will need to configure Apache virtual host file for svn repository. You can do this with the nano /etc/apache2/mods-enabled/dav_svn.conf command. After which, you want to add the following lines:

<Location /svn>
 DAV svn
 SVNParentPath /opt/svn
 AuthType Basic
 AuthName "Subversion Repository"
 AuthUserFile /etc/apache2/svn.passwd
 Require valid-user
</Location>

Save and close the file. Then, create a password file for user (hitesh) with the following command:

htpasswd -cm /etc/apache2/svn.passwd hitesh

Provide your passwords.

New password: 
Re-type new password: 
Adding password for user hitesh

Next, enable required Apache modules and restart Apache service with the following command:

a2enmod dav
a2enmod dav_svn
systemctl restart apache2

Access Repository

Apache Subversion is now installed, so now it’s time to test it from the remote system using the web browser.

Now, log in to your ECS instance installed with Ubuntu 16.04 Desktop version, open your web browser and type the address http://192.168.0.102/svn/svnrepo. You will be redirected to the following page:

1

Now, provide your username and password, then click on Sign in button. You should see your repository in the following page:

2

Next, create a directory called svnlocalrepo on the remote system (Ubuntu 16.04 desktop) with the mkdir svnlocalrepo command, and then check out your repository on svnlocalrepo with the following command:

svn checkout http://192.168.0.102/svn/svnrepo --username hitesh svnlocalrepo/

You will be prompt to provide password for hitesh as shown below:

Authentication realm: <http://192.168.0.102:80> Subversion Repository
Password for 'hitesh': *********

Provide your password and press the Enter button. You should see the following output:

-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <http://192.168.0.102:80> Subversion Repository

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
Checked out revision 0.

Next, change the directory to the svnlocalrepo and create some directory and files with the following command:

cd svnlocalrepo
mkdir testdir
touch testfile1.txt
touch testfile2.txt

Next, add the above created files and directory with the svn add testdir testfile1.txt testfile2.txt command. You will have the following output:

A         testdir
A         testfile1.txt
A         testfile2.txt

Next, commit the added file with the commit message with the svn commit -m 'My First Commit' command. You should see the following output:

Adding         testdir
Adding         testfile1.txt
Adding         testfile2.txt
Transmitting file data ..done
Committing transaction...
Committed revision 1.

Now, open your web browser and access your repository. You should see the newly added files and directory in the following image:

3

Install Subversion Client and Setup Repository

Apache Subversion is now installed and working. It’s time to install Subversion client (RabbitVCS) on Ubuntu 16.04 Desktop instance and connect it to Apache Subversion.

RabbitVCS is a simple and easy to use graphical front-end for version control systems. You can integrate it into file managers to provide file context menu access to version control repositories. By default, RabbitVCS is not available in the Ubuntu 16.04 desktop default repository. So you will need to add the repository for that to your system.

You can add it with the following command:

add-apt-repository ppa:rabbitvcs/ppa

Once the repository is added, update the repository and install RabbitVCS with the following command:

apt-get install rabbitvcs-nautilus3 rabbitvcs-gedit rabbitvcs-cli rabbitvcs-core -y

Next, open your Documents directory from Filemanager, right click under Documents directory. You should see the following image:

4

Now, click on the RabbitVCS SVN > Checkout. You should see the following page:

5

Now, provide your Subversion repository web address and Destination directory. Then, click on the OK button. You should see the following page:

6

Now, provide your username and password. Then, click on the OK button. Once the repository is check out, you should see the output in the following image:

7

Now, click on the OK button. You should see the svnrepo in the following page:

8

Now, click on the svnrepo directory and create two other files testfile3.txt and testfile4.txt. You should see the following image:

9

Now, right click inside svnrepo directory. You should see the following image:

10

Now, click on the RabbitVCS SVN > add button. You should see the following image:

11

Now, select both files and click on the OK button. Once the files are added to the repository. You should see the following page:

12

Now, press OK button to completed the process.

Next, right click inside svnrepo directory. You should see the following page:

13

Now, click on the Commit button. You should see the following page:

14

Now, type your Commit message and click on the OK button. Once the Commit completed successfully. You should see the output in the following page:

15

Now, click on the OK button to finish the process.

Next, open your web browser and access the Subversion repository. You should see the newly added files in the following page:

16

 

Subversion is owned by Subversion (https://subversion.apache.org/) and they own all related trademarks and IP rights for this software.

Subversion on cloud runs on Amazon Web Services (AWS)  and Azure and  ensures that your websites load faster.

Cognosys provides hardened images of Subversion on all public cloud ( AWS marketplace and Azure ).

Secured Subversion on Ubuntu 14.04 LTS 

Features

Azure

Videos

Subversion on cloud

Related Posts