'Ubuntu trac svn'에 해당되는 글 1건

  1. 2009.10.31 Trac + SVN 설치

Trac + SVN 설치

TIPs 2009. 10. 31. 21:16
참고 : http://kldp.org/node/84957

필요한 패키지 설치
# aptitude install trac subversion libapache2-svn libapache2-mod-python

Trac, SVN root directory 생성
# mkdir /var/svn
# mkdir /var/trac
# chown -R www-data.www-data /var/svn
# chown -R www-data.www-data /var/trac

SVN repository 생성
# svnadmin create /var/svn/<project>
# svn mkdir file://localhost/var/svn/<project>/branches -m "initial structure1"
# svn mkdir file://localhost/var/svn/<project>/tags -m "initial structure2"
# svn mkdir file://localhost/var/svn/<project>/trunk -m "initial structure3"

Track 환경 생성 및 초기화
# trac-admin /var/trac/<project> initenv

사용자 계정 생성
# htpasswd -cm /var/trac/<project>/passwd admin
# htpasswd -m  /var/trac/<project>/passwd user

아파치에 읽기, 쓰기 권한 주기
# chown -R www-data.www-data /var/trac
# chown -R www-data.www-data /var/svn

SVN, TRAC apache 설정
/etc/apache2/mods-available/dav_svn.conf
<location /svn/<project>>
	  DAV svn
	  SVNPath /var/svn/<project>
	  #SVNParentPath /var/svn
	  AuthType Basic
	  AuthName "Subversion Repository"
	  AuthUserFile /var/trac/<project>/passwd

	  <limitexcept get="" propfind="" options="" report="">
	  	       Require valid-user
	  </limitexcept>
</location>
# a2enmod dav_svn

/etc/apache2/sites-available/trac
<Location /trac/<project>>
	SetHandler mod_python
	PythonHandler trac.web.modpython_frontend
	PythonOption TracEnvParentDir /var/trac/<project>
	
	PythonOption TracEnv /var/trac/<project>
	PythonOption TracUriRoot /trac/<project>

	AuthType Basic
	AuthName "Repository"
	AuthUserFile /var/trac/<project>/passwd
	Require valid-user
</Location>

#<Location /trac/*/login>
<Location /trac/<project>/login>
	AuthType Basic
	AuthName "Repository"
	AuthUserFile /var/trac/<project>/passwd
	Require valid-user
</Location>
# a2ensite trac

/etc/init.d/apache2 restart
: