In this Post I will explain you how to install subversion and expose it via Apache2 server while enabling SSL. So I have blogged on how to install Apache2 and enable SSL here. So As a prerequisite follow the above blog and install Apache2 server and configure SSL.
So lets install and configure subversion with Apache2.
Installing Subversion
First update Ubuntu repositories
Now install Subversion
After installing you can verify the installed version by executing the following command
Now create a directory and navigate to that directory
By executing following create a new SVN repository
Now changer ownership of the directory
change permission of the directory
Configure Apache2 with SVN
First lets install SVN related packages to Apache2
Now lets add users, to add initial users execute the following
So lets install and configure subversion with Apache2.
Installing Subversion
First update Ubuntu repositories
sudo apt-get update sudo apt-get upgrade
Now install Subversion
sudo apt-get install subversion
After installing you can verify the installed version by executing the following command
svn --version
Now create a directory and navigate to that directory
mkdir ~/svn cd ~/svn
By executing following create a new SVN repository
svnadmin create svnqarepo
Now changer ownership of the directory
1 | sudo chown -R www-data:www-data *
|
change permission of the directory
chmod 755 -R *
Configure Apache2 with SVN
First lets install SVN related packages to Apache2
sudo apt-get install libapache2-svn
Install extra Packages that are required
sudo apt-get install apache2-utils
Note: apache2-utills are required to htpasswd when adding users
Now Open /etc/apache2/mods-available/dav_svn.conf and add the following
1 2 3 4 5 6 7 8 | <Location /svn> DAV svn SVNPath /home/ubuntu/svn/svnqarepo AuthType Basic AuthName "myproject subversion repository" AuthUserFile /etc/subversion/passwd Require valid-user </Location> |
Now lets add users, to add initial users execute the following
sudo htpasswd -c /etc/subversion/passwd wso2qauser
Execute following command and restart Apache server
Type the password when password is asked. Now you should be able to access the SVN repository with the following URL
sudo a2enmod dav_svn sudo service apache2 restart
Type the password when password is asked. Now you should be able to access the SVN repository with the following URL
http://<HOST_NAME>/svn https://<HOST_NAME>/svn
When you access the URL it will be like following, and username/password should be entered when accessing the repository.
Now you are done configuring the server, Please drop a comment if you have queries. :)
0 comments:
Post a Comment