SVN+Trac Fedora Core 6
우선 trac을 설치 한다. RPM을 인터넷 상에서 다운 받기 보단...
yum을 이용하면 편하다.
# yum install trac
svn은 리눅스를 깔면 기본적으로 깔려 있다. 그리고 /srv 디렉토리에 svn과 trac을 위한 디렉토리를 생성한다.
# mkdir -p /srv/svn
# mkdir -p /srv/trac
svn의 레파지 토리를 생성한다.
# svnadmin create --fs-type fsfs /srv/svn
foobar이라는 프로젝트를 생성하기 위해 Trac 환경 셋팅을 한다.
# trac-admin /srv/trac/foobar initenv
Creating a new Trac environment at /test/trac/foobar
Trac will first ask a few questions about your environment
in order to initalize and prepare the project database.
Please enter the name of your project.
This name will be used in page titles and descriptions.
Project Name [My Project]> Project Name
Please specify the connection string for the database to use.
By default, a local SQLite database is created in the environment
directory. It is also possible to use an already existing
PostgreSQL database (check the Trac documentation for the exact
connection string syntax).
Database connection string [sqlite:db/trac.db]> [Enter]디폴트 설정값
Please specify the type of version control system,
By default, it will be svn.
If you don't want to use Trac with version control integration,
choose the default here and don't specify a repository directory.
in the next question.
Repository type [svn]> [Enter]디폴트 설정값
Please specify the absolute path to the version control
repository, or leave it blank to use Trac without a repository.
You can also set the repository location later.
Path to repository [/path/to/repos]> /srv/svn 레파지토리의 절대 경로
Please enter location of Trac page templates.
Default is the location of the site-wide templates installed with Trac.
Templates directory [/usr/share/trac/templates]> [Enter]디폴트 설정값
Creating and Initializing Project
Installing default wiki pages
/usr/share/trac/wiki-default/WikiHtml => WikiHtml
/usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
/usr/share/trac/wiki-default/TracSearch => TracSearch
:
:
:
/usr/share/trac/wiki-default/TracRss => TracRss
/usr/share/trac/wiki-default/WikiPageNames => WikiPageNames
/usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
/usr/share/trac/wiki-default/TracWiki => TracWiki
Indexing repository
---------------------------------------------------------------------
Project environment for 'My Project' created.
You may now configure the environment by editing the file:
/test/trac/foobar/conf/trac.ini
If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:
tracd --port 8000 /test/trac/foobar
Then point your browser to http://localhost:8000/foobar.
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web server).
The latest documentation can also always be found on the project
website:
Congratulations!
httpd데몬이 trac과 svn디렉토리를 접근 할수 있도록 권한 설정을 꼭해야 한다.
# chown -R apache /srv/trac
# chown -R apache /srv/svn
httpd에서 trac에 접근할 수 있도록 환경 설정을 한다.
환경 설정이 제대로 되었는지는 http://xxx.xxx.xxx.xxx/cgi-bin/trac.cgi 접근해 보고 에러 메시지가
나오는지를 보고 디버깅해 나간다.
# vi /etc/httpd/conf.d/trac.conf
# Replace all occurrences of /srv/trac with your trac root below
# and uncomment the respective SetEnv and PythonOption directives.
<LocationMatch /cgi-bin/trac\.f?cgi>
SetEnv TRAC_ENV /srv/trac/foobar
</LocationMatch>
<IfModule mod_python.c>
<Location /cgi-bin/trac.cgi>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /srv/trac/foobar
</Location>
</IfModule>
httpd 데몬을 다시 시작한다.
# service httpd restart
웹에서 확인한다.
http://xxx.xxx.xxx.xxx/cgi-bin/trac.cgi
** 위의 내용은 인터넷상에서 쉽게 찾을수 있지만 fedora core 6의 /etc/httpd/conf.d/trac.conf파일이 조금 다르게 구성되어 있다. 계정 로그인 관련된 부분은 추후
[출처] SVN+Trac Fedora Core 6|작성자 대가리