Difference between revisions of "SVN Trac Install"

From C4 Wiki
Jump to: navigation, search
Line 1: Line 1:
 
----
 
----
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://egebyromedu.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://egebyromedu.co.cc CLICK HERE]=
 +
----
 +
</div>
 +
----
 +
&lt;div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 
----
 
----
 
=[http://ynejynezex.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
 
=[http://ynejynezex.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]=
Line 6: Line 14:
 
=[http://ynejynezex.co.cc CLICK HERE]=
 
=[http://ynejynezex.co.cc CLICK HERE]=
 
----
 
----
</div>
+
&lt;/div>
 
= Setup SVN For Multiple Users =
 
= Setup SVN For Multiple Users =
 
Creat umask wrapper scripts to protect permissions on the database.
 
Creat umask wrapper scripts to protect permissions on the database.
  
 
  # backup
 
  # backup
  mv /usr/bin/svn /usr/bin/svn.orig &amp;&amp;
+
  mv /usr/bin/svn /usr/bin/svn.orig &amp;amp;&amp;amp;
  mv /usr/bin/svnserve /usr/bin/svnserve.orig &amp;&amp;
+
  mv /usr/bin/svnserve /usr/bin/svnserve.orig &amp;amp;&amp;amp;
  
 
  # create skripts
 
  # create skripts
  cat >> /usr/bin/svn &lt;&lt; "EOF" &amp;&amp;
+
  cat >> /usr/bin/svn &amp;lt;&amp;lt; "EOF" &amp;amp;&amp;amp;
 
  #!/bin/sh
 
  #!/bin/sh
 
  umask 002
 
  umask 002
 
  /usr/bin/svn.orig "$@"
 
  /usr/bin/svn.orig "$@"
 
  EOF
 
  EOF
  cat >> /usr/bin/svnserve &lt;&lt; "EOF" &amp;&amp;
+
  cat >> /usr/bin/svnserve &amp;lt;&amp;lt; "EOF" &amp;amp;&amp;amp;
 
  #!/bin/sh
 
  #!/bin/sh
 
  umask 002
 
  umask 002
Line 72: Line 80:
 
  # your repository
 
  # your repository
 
  ScriptAlias /repository /usr/share/trac/cgi-bin/trac.cgi
 
  ScriptAlias /repository /usr/share/trac/cgi-bin/trac.cgi
  &lt;Location /repository>
+
  &amp;lt;Location /repository>
 
     SetEnv TRAC_ENV "/home/www/trac/repository"
 
     SetEnv TRAC_ENV "/home/www/trac/repository"
  &lt;/Location>
+
  &amp;lt;/Location>
  
 
  # icons
 
  # icons
  &lt;Directory "/usr/share/trac/htdocs/">
+
  &amp;lt;Directory "/usr/share/trac/htdocs/">
 
         Options -Indexes -MultiViews
 
         Options -Indexes -MultiViews
 
         AllowOverride None
 
         AllowOverride None
 
         Order allow,deny
 
         Order allow,deny
 
         Allow from all
 
         Allow from all
  &lt;/Directory>
+
  &amp;lt;/Directory>
 
  Alias /trac "/usr/share/trac/htdocs/"
 
  Alias /trac "/usr/share/trac/htdocs/"
  
 
[[Category:Tools]][[Category:Infos]]
 
[[Category:Tools]][[Category:Infos]]

Revision as of 02:19, 24 November 2010



UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


CLICK HERE



<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">


This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page


CLICK HERE


</div>

Setup SVN For Multiple Users

Creat umask wrapper scripts to protect permissions on the database.

# backup
mv /usr/bin/svn /usr/bin/svn.orig &amp;&amp;
mv /usr/bin/svnserve /usr/bin/svnserve.orig &amp;&amp;
# create skripts
cat >> /usr/bin/svn &lt;&lt; "EOF" &amp;&amp;
#!/bin/sh
umask 002
/usr/bin/svn.orig "$@"
EOF
cat >> /usr/bin/svnserve &lt;&lt; "EOF" &amp;&amp;
#!/bin/sh
umask 002
/usr/bin/svnserve.orig "$@"
EOF
# set perms
chmod 0755 /usr/bin/svn{,serve}
# debian add diversion 
#/usr/sbin/dpkg-divert --divert /usr/bin/svn.orig  --add /usr/bin/svn
#/usr/sbin/dpkg-divert --divert /usr/bin/svnserve.orig  --add /usr/bin/svnserve


Setup SVN For Group Access

Add a group which has r/w access to the repository.

addgroup --system svn

Add Apache User To SVN Group

Add the user running the apache process to the svn group. Either by editing /etc/group directly or by:

usermod -g www-data -G svn apache

Change Permissions On The Repository

The svn group needs write access to the svn repository database.

REP=/home/svn/repository
chown svn:svn -R $REP/
chmod -R g+w $REP/
chmod g+s $REP/db

Create Trac Wiki

mkdir -p /home/www/trac/repository
trac-admin /home/www/trac/repository initenv

Edit Trac Options

trac-admin /home/www/trac/repository
vi conf/trac.ini

Change Permissions On The Trac Wiki

The apache user needs full access to the trac directory.

chown -R www-data  /home/www/trac/repository/*

Add Trac To Apache Config

# your repository
ScriptAlias /repository /usr/share/trac/cgi-bin/trac.cgi
&lt;Location /repository>
    SetEnv TRAC_ENV "/home/www/trac/repository"
&lt;/Location>
# icons
&lt;Directory "/usr/share/trac/htdocs/">
        Options -Indexes -MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
&lt;/Directory>
Alias /trac "/usr/share/trac/htdocs/"