Difference between revisions of "Apache Subversion"
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{NeedsUpdate}} | {{NeedsUpdate}} | ||
Revision as of 22:45, 14 September 2015
Update Needed | |
---|---|
The contents of this page have become outdated or irrelevant. Please consider updating it. |
NOTE: There is a one-click app currently in ALPHA being tested.
Apache Subversion is a full-featured version control system originally designed to be a better CVS. Subversion has since expanded beyond its original goal of replacing CVS, but its basic model, design, and interface remain heavily influenced by that goal. Even today, Subversion should still feel very familiar to CVS users.
This tutorial will show you how to install, create a repo, and browse that repo on your HDA. To use Subversion, you will need a client. There are many to choose from but Tortise SVN is one of the most popular.
NOTE: Tested on Fedora 14.
Setup
- Create web app (Advanced Settings must be enabled on HDA)
- From the Dashboard main page, select Apps at the top.
- Choose Webapps
- Select New Web App button at the bottom
- Enter apachesvn for the Name (ensure the path reflects the name correctly)
- Choose Create
- Open a terminal as root user and do the following:
bash code cd /etc/httpd/conf.d
- Look for the ####-apachesvn.conf (#### is some number, i.e. 1000) file and open it in your favorite editor. Add the following to it between ServerAlias and DocumentRoot lines
Text <Location /svn> DAV svn SVNParentPath /var/hda/web-apps/apachesvn/html AuthType Basic AuthName "Subversion repositories" AuthUserFile /etc/svn-auth-users Require valid-user </Location>
- Create web page to browse repository
- Install dependencies
bash code yum install mod_dav_svn subversion -y
- Establish a user account (change username and password to whatever you desire)
bash code htpasswd -cmb /etc/svn-auth-users username password
- Create and setup the repository (call it anything you like)
bash code svnadmin create html/myrepo chown -R apache.apache html/myrepo chcon -R -t httpd_sys_content_t html/myrepo chcon -R -t httpd_sys_rw_content_t html/myrepo
- Configure the repository
- Restart web server to enable the changes
bash code /etc/init.d/httpd restart
- Perform initial repository import (username and password same as above); when prompted, choose no for password being stored as plain text
bash code mkdir -p /tmp/svn-structure-template/{trunk,branches,tags} svn import -m 'Initial import' --username username --password password /tmp/svn-structure-template/ http://apachesvn/svn/myrepo sed -i '113s/#\s//' /root/.subversion/servers
bash code |
---|
cd /var/hda/web-apps/apachesvn echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Your Page Title</title> <meta http-equiv="REFRESH" content="0;url=http://apachesvn/svn/myrepo"></HEAD> <BODY> Optional page text here. </BODY> </HTML>' > html/index.html chown apache.users html/index.html
|
bash code |
---|
sed -i '13 i anon-access = none' html/myrepo/conf/svnserve.conf sed -i '15 i authz-db = authz' html/myrepo/conf/svnserve.conf
|
Complete
Navigate to http://apachesvn. You should see 3 directories: trunk, branches, and tags. Install a Subversion client and begin using your new repository.
References
Install SVN (Subversion) Server on Fedora 16/15, CentOS/Red Hat (RHEL) 6/5.7
NOTE: Users running with Amahi's DHCP and DNS turned off:
The web-app method won't work properly with Amahi's DHCP and DNS turned off, and the instructions here are probably out of date anyway. For setting up a vanilla version of Apache SVN on Fedora 19 under Amahi see the instructions on this page on the If Not True then False blog:
Important:To make this work on the current version of Fedora 19 with Amahi you need to add an alias for Apache to the to the subversion.conf file just before the <Location... block. See this posting on the user forum for details: