How To Install Subversion Too Websvn On Ubuntu 12.04


This write-up contains a fix of didactics on how to install too configure svn too equally setup websvn on an ubuntu 12.04 machine.

1.) Install subversion too apache2
sudo apt-get install subversion sudo apt-get install apache2 sudo apt-get install libapache2-svn 

2.) Create a directory where nosotros volition install subversion repository
sudo mkdir /var/subversion 

3.) Change ownership of the newly created folder
sudo chown www-data:www-data -R /var/subversion 

4.) Change means bits
sudo chmod 770 sudo chmod 770 -R /var/subversion 

 5.) Create a novel repository
sudo svnadmin practice /var/subversion/demo 

6.) Look/check at the newly practice repository
sudo svnlook tree /var/subversion/demo 

7.) Make the repository available to apache
sudo vi /etc/apache2/mods-available/dav_svn.conf 

Add the ff:
  DAV svn   SVNPath /var/subversion/demo   AuthType Basic   AuthName "Subversion Repository"   AuthUserFile /etc/apache2/svn.passwd   Require valid-user   #SSLRequireSSL   *take Federal Reserve annotation that nosotros are using apache's svn.passwd for authentication 
 8.) Restart apache too y'all should last able to access the repository from the url
sudo service apache2 restart 

9.) Create a novel user
sudo htpasswd -c /etc/apache2/svn.passwd usera 
*note brand certain y'all take away -c parameter on sec invocation since it volition delete the file if it exists

10.) Now y'all tin access the repository inwards the url:
http://localhost/svn/demo 
*If y'all direct maintain rapidsvn installed, y'all tin stance the same url

Now for the instant part, how to install too configure websvn
1.) Install websvn (select apache2, too perish along accordingly)
sudo apt-get install websvn 

2.) Move the newly installed websvn folder into /var/www
sudo cp -r /usr/share/websvn/ /var/www/ 

3.) Make that folder available to apache2, yesteryear editing the same file before dav_svn.conf, too add together the below lines:
sudo vi /etc/apache2/mods-available/dav_svn.conf //lines
<Location /websvn> Options FollowSymLinks lodge allow,deny allow from all AuthType Basic AuthName "Subversion Repository" </Location> 
*be careful alongside the spacing it's sensitive

4.) Restart apache2
sudo service apache2 restart 

5.) Access from url : http://localhost/websvn, it should immediately last available.

6.) You tin install enscript, for syntax highlighting:
sudo apt-get install enscript 

7.) If y'all desire to add together to a greater extent than repository, merely edit this file:
sudo vi /etc/websvn/svn_deb_conf.inc  
*by default mine has:
//please edit /etc/websvn/config.php //or user dpkg-reconfigure websvn $config->parentPath("/var/subversion"); $config->addRepository("root", "file:///var/subversion/demo"); $config->setEnscript("/usr/bin"); $config->setSedPath("/bin"); $config->userEnscript(); 

And immediately we're done :-)
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.