Changes

From Amahi Wiki
Jump to: navigation, search
814 bytes added ,  01:56, 1 February 2019
{{NeedsUpdate}}
 
 
'''NOTE:''' There is a [http://www.amahi.org/apps/apache-subversion one-click app] currently in ALPHA being tested.
'''NOTE:''' Tested on Fedora 14.
 
==Setup==
<ul>
<li>Choose '''Create'''</li>
<li>[[Open_Terminal_as_root|Open a terminal as root]] user and do the following:
{{Code| cd /etc/httpd/conf.d}}</li>
<li>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|Text=<Location /svn>
DAV svn
SVNParentPath /var/hda/web-apps/apachesvn/html
AuthUserFile /etc/svn-auth-users
Require valid-user
</Location>}}</li>
<li>Create web page to browse repository</li>
{{Code|<pre>cd /var/hda/web-apps/apachesvn
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
</BODY>
</HTML>' > html/index.html
chown apache.users html/index.html}}</pre>
</ol>
<li>Install dependencies
{{Code| yum install mod_dav_svn subversion -y}}
<li>Establish a user account (change ''username'' and ''password'' to whatever you desire)
{{Code| htpasswd -cmb /etc/svn-auth-users username password}}
<li>Create and setup the repository (call it anything you like)
{{Code|<pre>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}}</pre>
<li> Configure the repository</li>
{{Code| sed -i '13 i anon-access <nowiki>=</nowiki> none' html/myrepo/conf/svnserve.conf sed -i '15 i authz-db <nowiki>=</nowiki> authz' html/myrepo/conf/svnserve.conf}}
<li>Restart web server to enable the changes
{{Code| /etc/init.d/httpd restart}}</li>
<li>Perform initial repository import (''username'' and ''password'' same as above); when prompted, choose '''no''' for password being stored as plain text
{{Code|<pre>mkdir -p /tmp/svn-structure-template/<nowiki>{trunk,branches,tags}</nowiki>
svn import -m 'Initial import' --username username --password password /tmp/svn-structure-template/ http://apachesvn/svn/myrepo
sed -i '113s/#\s//' /root/.subversion/servers​}}</pre>
</ul>
==References==
[http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel 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:
<p>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 <i>If Not True then False</i> blog:</p>
 
[http://www.if-not-true-then-false.com/2010/install-svn-subversion-server-on-fedora-centos-red-hat-rhel/ Install SVN Server on Fedora]
 
<p><b>Important:</b>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 <i>subversion.conf</i> file just before the <i>&lt;Location...</i> block. See this posting on the user forum for details:</p>
 
[https://forums.amahi.org/viewtopic.php?f=26&t=5798 Forum posting on SVN installation]
12,424

edits