Changes

From Amahi Wiki
Jump to: navigation, search
47 bytes removed ,  01:56, 1 February 2019
<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>
12,424

edits