미루고 미루던 소스관리를 위해서 Linux 서버에 TRAC + SVN 을 셋업했습니다. 과정이 조금 복잡했는데 결국은 아래의 문서를 통해서 해결되었습니다(mysql-python 컴파일 오류로 인해)
관련링크
centos svn 설정
http://tykim.wordpress.com/2007/06/04/centos-50%EC%97%90-subversionsvn-%EC%84%A4%EC%B9%98/
mod_dav_svn
https://support.railsmachine.com/index.php?pg=kb.page&id=42
CentOS 5.0에 subversion - viewvc 설치
http://tykim.wordpress.com/2007/12/27/centos-50%ec%97%90-subversion-viewvc-%ec%84%a4%ec%b9%98/
Centos Trac setup
http://www.techyouruniverse.com/software/installing-trac-with-subversion-on-cent-os-5-with-neon-and-quicksilver
http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008
http://www.madboa.com/geek/trac-centos/
http://sunsson.iptime.org/tc/730
http://theeye.pe.kr/tag/clearsilver
http://earthfall.egloos.com/1715676
http://www.reiden.net/blog/628
http://kldp.org/node/84957
centos 소스 설치 : http://www.xinublog.com/449
사전작업
yum install python
yum install mod_python
yum install mysql*Setup Subversion and Trac on CentOS 5
Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several Subversion repositories with associated Trac projects.
There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a few problems and I hope this post may help at least a few people trying to do the same as me. I am not going to rewrite the great tutorials out there, I will just point you to them and note what things I did differently.
This 'guide' should get you from a fresh install of CentOS 5 linux to one or more working Subversion (SVN) repositories and associated Trac wiki's. Apache/WebDAV is used as the network layer. I have only tested this on a fresh install of CentOS 5.
The Environment
I am aiming for the following:
- CentOS 5, SVN installed. Apache2 as the network layer using mod_dav_svn.
- Trac running on Apache with mod_python
- SVN repositories located at: /srv/svn (e.g. /srv/svn/my-project), accessible via http://server/svn/my-project
- Trac projects located at: /srv/trac (e.g /srv/trac/my-project) accessible via http://server/trac/my-project
How I did it
Not all the steps are vital (probably) but this is how I got it working. Feel free to skip any non-relevant steps (i.e. there is probably no need for a fresh install). Replace any occurence of <project> with the name of your first project.
1. Fresh install of CentOS. I followed most of the Perfect Setup Guide, except the mail and ISPConfig stuff. The important part is setting up the Apache2 web server.
2. Make sure SVN and mod_dav_svn are installed. As root:
yum install subversion mod_dav_svn
vim /etc/httpd/conf/httpd.conf
If the following two lines are not present, add them:
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
3. Install Trac: Follow Nick's guide with the alternative Clearsilver installation below. Skip the Apache Configuration part.
Follow all of parts 1 and 2. Instead of part 3 do:
wget http://dag.wieers.com/rpm/packages/clearsilver/clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i clearsilver-0.10.4-1.el5.rf.i386.rpm
wget http://dag.wieers.com/rpm/packages/clearsilver/python-clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpm
Continue with parts 4.1 and 4.2 of Nick's guide. Remember, leave out Apache configuration section.
4. Create your first SVN Repository:
svnadmin create --fs-type fsfs /srv/svn/<project>
5. Initialise a Trac project for your new repository:
trac-admin /srv/trac/<project> initenv
For the trac-admin command use the defaults if not sure, giving a descriptive name for the project. The `Path to repository` is: /srv/svn/<project>.
6. Set the correct file permissions for apache
chown -R apache.apache /srv/svn/<project>
chown -R apache.apache /srv/trac/<project>
7. Tell apache where to find the new repository. Here we create an additional Apache configuration file specifically for the SVN repositories.
vim /etc/httpd/conf.d/subversion.conf
Add the following directive:
<Location /svn/<project>>
DAV svn
SVNPath /srv/svn/<project>
AuthType Basic
AuthName "<project> Repository"
AuthzSVNAccessFile /srv/svn/svn-acl-conf
AuthUserFile /srv/svn/<project>.htpasswd
Require valid-user
</Location>
8. Add a repository user:
touch /srv/svn/<project>.htpasswd
htpasswd -m /srv/svn/<project>.htpasswd <username>
9. Create the Access Control List for the SVN Repository
vim /srv/svn/svn-acl-conf
Add the following directives:
[<project>:/]
<username> = rw
Where <username> represents the username of the repository user you created earlier.
10. Tell apache where to find the new Trac project. Here we create an additional Apache configuration file specifically for the Trac projects.
vim /etc/httpd/conf.d/trac.conf
Add the following directives:
<Location /trac/<project>>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /srv/trac/<project>
PythonOption TracUriRoot /trac/<project>
</Location>
<Location "/trac/<project>/login">
AuthType Basic
AuthName "trac"
AuthUserFile /srv/trac/<project>.htpasswd
Require valid-user
</Location>
11. Add a Trac user:
touch /srv/trac/<project>.htpasswd
htpasswd -m /srv/trac/<project>.htpasswd <username>
12. Give admin permissions to the Trac user you just created:
trac-admin /srv/trac/<project> permission add <username> TRAC_ADMIN
Where <username> represents the username of the Trac user you just created.
13. Restart Apache:
service httpd restart
You should now have SVN and Trac installed. You will have an SVN repository setup (http://server/svn/<project>) and the Trac wiki (http://server/trac/<project>) associated with the repository.
Please let me know if this helped you. If you come across any problems I will be happy to try and help.
Resources
The last part of CentOS HowTos: Subversion will give you a quick introduction on how to use SVN.
Subversion setup guides: here and here
Trac setup guides: here and here.
ClearSilver template system (used by Trac).
"방법론,실용주의,애자일" 카테고리의 다른 글
- 단편적 지식과 검색형 인간. 2008/09/03
- Trac C# 지원 삽질기. 2008/07/19
- 자료 정리와 공유 (MediaWiki 관련 Study) 2008/07/08
- vi tutor 2008/06/20
- Trac + svn + apache python module setup on cen... 2008/06/17
- 프로그래밍 10년 완성 2008/06/16
- 멀티랭귀지 프로그래밍 2008/06/06
- 기술관리자는 기술이 아니라 사람을 다룬다 2008/05/29
- 온라인학습생태계 2008/05/29
- 4시간일하기. 2008/05/29






12164
18
17









댓글을 달아 주세요
송대리님 주소 알고 방문했어요~~
종종 놀러 올께요
반가와요~ 자주 놀러오세요~