이 포스트는 오늘 내가 나의 데비안 서버에 "Trac"이라는 이슈 관리 시스템을 설치한 경험을 기반으로 정리해 본 설치 방법에 관한 포스트이다. Trac 홈페이지에서는 Trac을 다음과 같이 소개하고 있다.
이 포스트는 나의 설치 경험에 기반하므로, 환경이 다른 시스템에서는 제대로 되지 않을 수 있으며, 단지 Trac 설치 시 참고는 가능하리라 생각한다.
설치 환경은 다음과 같다.
1. 필요 패키지 설치
다음과 같이 필요 패키지를 설치해 준다.
내 시스템의 경우, 아파치는 이미 설치되어 있었기 때문에 제외하였으며, 그외에 Trac 설치에 필요한 패키지들은 의존성에 의해 전부 설치 된다.
2. 필요 디렉터리 생성
다음과 같이 필요 디렉터리를 생성하고 소유권을 아파치의 실행 UID인 www-data로 지정해 준다.
서브버전과의 연동을 염두에 두고 있다면, 위와 같이 서브버전 저장소의 루트로 사용할 디렉터리를 '/var/lib/svn'으로 미리 생성해 준다. 이는 Trac의 설치 과정 중 설정값으로 넣을 서브버전 저장소의 프로젝트 디렉터리의 상위 디렉터리가 될 것이다. Trac의 환경 디렉터리 또한 위와 같이 '/var/lib/trac'으로 생성해 준다. '/var/lib/htpasswd' 디렉터리는 Trac 접속 계정 정보 파일이 저장될 디렉터리이다. 이 디렉터리들은 임의의 위치에 생성될 수 있다.
3. Trac 프로젝트 생성
Trac의 프로젝트를 다음과 같이 생성해 준다. 여기서는 프로젝트의 디렉터리 명을 'test'로 하였다. 생성 과정 중 입력해야 할 것은 볼드체로 표기하였다.
이 과정을 마치고 나면 Trac의 환경 디렉터리(여기선 /var/lib/trac) 아래에 프로젝트 디렉터리 및 내부의 파일들이 새로 생성되므로 이 모든 디렉터리 및 파일들에 아파치가 접근할 수 있도록 다음과 같이 소유권을 변경한다.
4. 웹 서버(아파치) 연동
아파치 연동을 위해 /etc/apache2/site-available 디렉터리에 'trac'이라는 파일을 만들고, 아래와 같이 가상 호스트 설정을 해준다. 아래는 8080 포트에서 Trac 프로젝트 사이트가 서비스 될 수 있도록 한 것이다.
추가한 가상 호스트 설정을 다음의 명령어로 /etc/apache2/sites-enabled 디렉터리에 추가한다.
아파치를 재시작하고, Trac에 접속하여 잘 설치되었는지 확인한다.
http://localhost:8080/trac
위 페이지에서 프로젝트 목록이 링크로 제대로 출력되는 것을 볼 수 있어야 한다.
5. 관리자 계정 추가
다음과 같이 관리자 계정을 생성하고, Trac 프로젝트에 등록한다.
6. 필수 플러그인 설치
Trac 사용에 필수적인 다음의 플러그인들을 설치한다.
6-1. IniAdminPlugin 설치
http://trac-hacks.org/wiki/IniAdminPlugin에서 iniadminplugin_0.11-r5728.zip 파일을 다운로드 한 후, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 IniAdmin 플러그인을 설치한 후, 아파치를 재시작한다.
그런 다음 Trac 프로젝트 사이트(여기서는 http://pcandme.net:8080/trac/test)의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'IniAdmin 0.2' 플러그인을 활성화한다. IniAdmin 플러그인이 활성화 되면 Admin 메뉴 페이지에서 좌측 메뉴에 'trac.ini' 카테고리가 추가 된다.
6-2. AccountManagerPlugin 설치
http://trac-hacks.org/wiki/AccountManagerPlugin에서 accountmanagerplugin_0.11-r5728.zip 파일을 다운로드 한 뒤, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 AccountManager 플러그인을 설치한 후, 아파치를 재시작한다.
그런 다음 Trac 프로젝트 사이트의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'TracAccountManager 0.2.1dev' 플러그인의 컴포넌트 중 다음만을 활성화한다.
또한 추가된 'Accounts' 카테고리의 'Configuration' 메뉴에서 다음과 같이 Trac 접속 계정 정보 파일을 설정해 준다.
Accounts 카테고리의 'Users' 메뉴를 누르면 원래 계정 리스트를 볼 수 있고 추가, 수정, 삭제 가능하여야 하는데, 나의 경우, 다음과 같은 에러가 만났다.
이 에러는 trac.ini 파일에서 다음과 같이 [account-manager] 섹션을 직접 수정하여 해결 하였다.
위에서 볼드체로 쓰여져 있는 것이 추가된 것이다.
6-3. TimingAndEstimationPlugin 설치
http://trac-hacks.org/wiki/TimingAndEstimationPlugin에서 timingandestimationplugin_branches_trac0.11-r5729.zip 파일을 다운로드 한 뒤, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 TimingAndEstimation 플러그인을 설치한 후, 아파치를 재시작한다.
그런 다음 Trac 프로젝트 사이트의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'timingandestimationplugin 0.7.8' 플러그인의 모든 컴포넌트를 활성화한다. 이 때, 적용 버튼을 누르면 다음의 에러가 발생 할 수도 있는데,
이 때에 다음을 실행하여 데이터베이스 스키마를 업그레이드시켜 주면 해결된다.
아파치를 재시작하고, 에러 메시지가 출력된 페이지를 새로 고침 한다.
Trac 프로젝트 사이트에 'Management' 탭이 추가 되어 있으면 설치가 된 것이다.
* 참고
- http://blog.daum.net/kuh74/7583052
- http://trac.edgewall.org/wiki/TracInstall
- http://trac.edgewall.org/wiki/TracOnDebian
- http://goodbbai.tistory.com/29
- http://programmers-blog.com/2009/04/09/trac-password-store-problem
- http://trac-hacks.org/wiki/AccountManagerPlugin
- http://trac-hacks.org/wiki/AccountManagerPlugin
- http://trac-hacks.org/wiki/TimingAndEstimationPlugin
- 자바 프로젝트 필수 유틸리티, 박재성, 한빛미디어(주), 2009
** 추가 **
설치를 완료한 후, Trac 프로젝트 목록 페이지(여기서는 http://localhost:8080/trac)를 보면 추가한 프로젝트 외에 다음과 같은 이상한 것이 보일 수도 있다.
Trac is an enhanced wiki and issue tracking system for software development projects. Trac uses a minimalistic approach to web-based software project management. Our mission is to help developers write great software while staying out of the way. Trac should impose as little as possible on a team's established development process and policies.
이 포스트는 나의 설치 경험에 기반하므로, 환경이 다른 시스템에서는 제대로 되지 않을 수 있으며, 단지 Trac 설치 시 참고는 가능하리라 생각한다.
설치 환경은 다음과 같다.
- OS: 데비안 GNU/Linux 5.0 Lenny
- HTTP 서버: Apache 2.2.9-10+lenny2
- HTTP 서버 연동: mod_python 모듈
- Trac 버전: 0.11.1-2.1
1. 필요 패키지 설치
다음과 같이 필요 패키지를 설치해 준다.
# apt-get update; apt-get install libapache2-mod-python libapache2-mod-python-doc trac
내 시스템의 경우, 아파치는 이미 설치되어 있었기 때문에 제외하였으며, 그외에 Trac 설치에 필요한 패키지들은 의존성에 의해 전부 설치 된다.
2. 필요 디렉터리 생성
다음과 같이 필요 디렉터리를 생성하고 소유권을 아파치의 실행 UID인 www-data로 지정해 준다.
# mkdir /var/lib/svn
# chown -R www-data:www-data /var/lib/svn/
# mkdir /var/lib/trac
# chown -R www-data:www-data /var/lib/trac/
# mkdir /var/lib/htpasswd
# chown -R www-data:www-data /var/lib/trac/
# chown -R www-data:www-data /var/lib/svn/
# mkdir /var/lib/trac
# chown -R www-data:www-data /var/lib/trac/
# mkdir /var/lib/htpasswd
# chown -R www-data:www-data /var/lib/trac/
서브버전과의 연동을 염두에 두고 있다면, 위와 같이 서브버전 저장소의 루트로 사용할 디렉터리를 '/var/lib/svn'으로 미리 생성해 준다. 이는 Trac의 설치 과정 중 설정값으로 넣을 서브버전 저장소의 프로젝트 디렉터리의 상위 디렉터리가 될 것이다. Trac의 환경 디렉터리 또한 위와 같이 '/var/lib/trac'으로 생성해 준다. '/var/lib/htpasswd' 디렉터리는 Trac 접속 계정 정보 파일이 저장될 디렉터리이다. 이 디렉터리들은 임의의 위치에 생성될 수 있다.
3. Trac 프로젝트 생성
Trac의 프로젝트를 다음과 같이 생성해 준다. 여기서는 프로젝트의 디렉터리 명을 'test'로 하였다. 생성 과정 중 입력해야 할 것은 볼드체로 표기하였다.
# trac-admin /var/lib/trac/test initenv
Creating a new Trac environment at /var/lib/trac/test
Trac will first ask a few questions about your environment
in order to initialize 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]> Test
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]> /var/lib/svn/test
Creating and Initializing Project
Installing default wiki pages
CamelCase imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/CamelCase
InterMapTxt imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterMapTxt
InterTrac imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterTrac
InterWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterWiki
PageTemplates imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/PageTemplates
RecentChanges imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/RecentChanges
SandBox imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/SandBox
TitleIndex imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TitleIndex
TracAccessibility imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAccessibility
TracAdmin imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAdmin
TracBackup imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBackup
TracBrowser imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBrowser
TracCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracCgi
TracChangeset imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracChangeset
TracEnvironment imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracEnvironment
TracFastCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFastCgi
TracFineGrainedPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFineGrainedPermissions
TracGuide imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracGuide
TracImport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracImport
TracIni imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracIni
TracInstall imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInstall
TracInterfaceCustomization imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInterfaceCustomization
TracLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLinks
TracLogging imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLogging
TracModPython imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracModPython
TracNavigation imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNavigation
TracNotification imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNotification
TracPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPermissions
TracPlugins imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPlugins
TracQuery imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracQuery
TracReports imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracReports
TracRevisionLog imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRevisionLog
TracRoadmap imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRoadmap
TracRss imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRss
TracSearch imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSearch
TracStandalone imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracStandalone
TracSupport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSupport
TracSyntaxColoring imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSyntaxColoring
TracTickets imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTickets
TracTicketsCustomFields imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTicketsCustomFields
TracTimeline imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTimeline
TracUnicode imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUnicode
TracUpgrade imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUpgrade
TracWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWiki
TracWorkflow imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWorkflow
WikiDeletePage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiDeletePage
WikiFormatting imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiFormatting
WikiHtml imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiHtml
WikiMacros imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiMacros
WikiNewPage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiNewPage
WikiPageNames imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiPageNames
WikiProcessors imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiProcessors
WikiRestructuredText imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredText
WikiRestructuredTextLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredTextLinks
WikiStart imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiStart
---------------------------------------------------------------------
Warning: couldn't index the repository.
This can happen for a variety of reasons: wrong repository type,
no appropriate third party library for this repository type,
no actual repository at the specified repository path...
You can nevertheless start using your Trac environment, but
you'll need to check again your trac.ini file and the [trac]
repository_type and repository_path settings in order to enable
the Trac repository browser.
---------------------------------------------------------------------
Project environment for 'GIST Simulation Portal' created.
You may now configure the environment by editing the file:
/var/lib/trac/test/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 /var/lib/trac/test
Then point your browser to http://localhost:8000/test.
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:
http://trac.edgewall.org/
Congratulations!
Trac will first ask a few questions about your environment
in order to initialize 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]> Test
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]> /var/lib/svn/test
Creating and Initializing Project
Installing default wiki pages
CamelCase imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/CamelCase
InterMapTxt imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterMapTxt
InterTrac imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterTrac
InterWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/InterWiki
PageTemplates imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/PageTemplates
RecentChanges imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/RecentChanges
SandBox imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/SandBox
TitleIndex imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TitleIndex
TracAccessibility imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAccessibility
TracAdmin imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracAdmin
TracBackup imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBackup
TracBrowser imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracBrowser
TracCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracCgi
TracChangeset imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracChangeset
TracEnvironment imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracEnvironment
TracFastCgi imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFastCgi
TracFineGrainedPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracFineGrainedPermissions
TracGuide imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracGuide
TracImport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracImport
TracIni imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracIni
TracInstall imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInstall
TracInterfaceCustomization imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracInterfaceCustomization
TracLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLinks
TracLogging imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracLogging
TracModPython imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracModPython
TracNavigation imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNavigation
TracNotification imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracNotification
TracPermissions imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPermissions
TracPlugins imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracPlugins
TracQuery imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracQuery
TracReports imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracReports
TracRevisionLog imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRevisionLog
TracRoadmap imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRoadmap
TracRss imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracRss
TracSearch imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSearch
TracStandalone imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracStandalone
TracSupport imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSupport
TracSyntaxColoring imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracSyntaxColoring
TracTickets imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTickets
TracTicketsCustomFields imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTicketsCustomFields
TracTimeline imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracTimeline
TracUnicode imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUnicode
TracUpgrade imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracUpgrade
TracWiki imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWiki
TracWorkflow imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/TracWorkflow
WikiDeletePage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiDeletePage
WikiFormatting imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiFormatting
WikiHtml imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiHtml
WikiMacros imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiMacros
WikiNewPage imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiNewPage
WikiPageNames imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiPageNames
WikiProcessors imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiProcessors
WikiRestructuredText imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredText
WikiRestructuredTextLinks imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiRestructuredTextLinks
WikiStart imported from /usr/lib/python2.5/site-packages/trac/wiki/default-pages/WikiStart
---------------------------------------------------------------------
Warning: couldn't index the repository.
This can happen for a variety of reasons: wrong repository type,
no appropriate third party library for this repository type,
no actual repository at the specified repository path...
You can nevertheless start using your Trac environment, but
you'll need to check again your trac.ini file and the [trac]
repository_type and repository_path settings in order to enable
the Trac repository browser.
---------------------------------------------------------------------
Project environment for 'GIST Simulation Portal' created.
You may now configure the environment by editing the file:
/var/lib/trac/test/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 /var/lib/trac/test
Then point your browser to http://localhost:8000/test.
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:
http://trac.edgewall.org/
Congratulations!
이 과정을 마치고 나면 Trac의 환경 디렉터리(여기선 /var/lib/trac) 아래에 프로젝트 디렉터리 및 내부의 파일들이 새로 생성되므로 이 모든 디렉터리 및 파일들에 아파치가 접근할 수 있도록 다음과 같이 소유권을 변경한다.
# chown -R www-data:www-data /var/lib/trac
4. 웹 서버(아파치) 연동
아파치 연동을 위해 /etc/apache2/site-available 디렉터리에 'trac'이라는 파일을 만들고, 아래와 같이 가상 호스트 설정을 해준다. 아래는 8080 포트에서 Trac 프로젝트 사이트가 서비스 될 수 있도록 한 것이다.
# vi /etc/apache2/site-available/trac
NameVirtualHost *:8080
<VirtualHost *:8080>
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /trac
</Location>
<LocationMatch "/trac/[^/]+/login">
AuthType Basic
AuthName "Trac, Issue Tracking and Documenting"
AuthUserFile /var/lib/htpasswd/htpasswd
Require valid-user
</LocationMatch>
</VirtualHost>
<VirtualHost *:8080>
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /trac
</Location>
<LocationMatch "/trac/[^/]+/login">
AuthType Basic
AuthName "Trac, Issue Tracking and Documenting"
AuthUserFile /var/lib/htpasswd/htpasswd
Require valid-user
</LocationMatch>
</VirtualHost>
추가한 가상 호스트 설정을 다음의 명령어로 /etc/apache2/sites-enabled 디렉터리에 추가한다.
# a2ensite trac
아파치를 재시작하고, Trac에 접속하여 잘 설치되었는지 확인한다.
# /etc/init.d/apache2 restart
http://localhost:8080/trac
위 페이지에서 프로젝트 목록이 링크로 제대로 출력되는 것을 볼 수 있어야 한다.
5. 관리자 계정 추가
다음과 같이 관리자 계정을 생성하고, Trac 프로젝트에 등록한다.
# htpasswd -cm /var/lib/htpasswd/htpasswd admin
# chown -R www-data:www-data /var/lib/htpasswd
# trac-admin /var/lib/trac/test permission add admin TRAC_ADMIN
# chown -R www-data:www-data /var/lib/htpasswd
# trac-admin /var/lib/trac/test permission add admin TRAC_ADMIN
6. 필수 플러그인 설치
Trac 사용에 필수적인 다음의 플러그인들을 설치한다.
- IniAdminPlugin - Trac 프로젝트의 환경 설정 시 <프로젝트 디렉터리>/conf/trac.ini 파일을 직접 수정하는 대신에 웹 환경에서 할 수 있게 해주는 플러그인이다.
- AccountManagePlugin - 계정의 생성 및 수정, 삭제를 관리하는 플러그인이다.
- TimingAndEstimationPlugin - 태스크 관리 시 일정을 예측하고 작업한 시간을 관리하는 플러그인이다.
6-1. IniAdminPlugin 설치
http://trac-hacks.org/wiki/IniAdminPlugin에서 iniadminplugin_0.11-r5728.zip 파일을 다운로드 한 후, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 IniAdmin 플러그인을 설치한 후, 아파치를 재시작한다.
# python setup.py install
# /etc/init.d/apache2 restart
# /etc/init.d/apache2 restart
그런 다음 Trac 프로젝트 사이트(여기서는 http://pcandme.net:8080/trac/test)의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'IniAdmin 0.2' 플러그인을 활성화한다. IniAdmin 플러그인이 활성화 되면 Admin 메뉴 페이지에서 좌측 메뉴에 'trac.ini' 카테고리가 추가 된다.
6-2. AccountManagerPlugin 설치
http://trac-hacks.org/wiki/AccountManagerPlugin에서 accountmanagerplugin_0.11-r5728.zip 파일을 다운로드 한 뒤, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 AccountManager 플러그인을 설치한 후, 아파치를 재시작한다.
# python setup.py install
# /etc/init.d/apache2 restart
# /etc/init.d/apache2 restart
그런 다음 Trac 프로젝트 사이트의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'TracAccountManager 0.2.1dev' 플러그인의 컴포넌트 중 다음만을 활성화한다.
AccountManagerAdminPage, AccountManager, HtPasswdStore, AccountModule
또한 추가된 'Accounts' 카테고리의 'Configuration' 메뉴에서 다음과 같이 Trac 접속 계정 정보 파일을 설정해 준다.
/var/lib/htpasswd/htpasswd
Accounts 카테고리의 'Users' 메뉴를 누르면 원래 계정 리스트를 볼 수 있고 추가, 수정, 삭제 가능하여야 하는데, 나의 경우, 다음과 같은 에러가 만났다.
This password store does not support listing users
이 에러는 trac.ini 파일에서 다음과 같이 [account-manager] 섹션을 직접 수정하여 해결 하였다.
# vi /var/lib/trac/test/conf/trac.ini
(전략)
...
[account-manager]
force_passwd_change = true
password_file = /var/lib/htpasswd/htpasswd
password_store = HtPasswdStore
...
(후략)
...
[account-manager]
force_passwd_change = true
password_file = /var/lib/htpasswd/htpasswd
password_store = HtPasswdStore
...
(후략)
위에서 볼드체로 쓰여져 있는 것이 추가된 것이다.
6-3. TimingAndEstimationPlugin 설치
http://trac-hacks.org/wiki/TimingAndEstimationPlugin에서 timingandestimationplugin_branches_trac0.11-r5729.zip 파일을 다운로드 한 뒤, 압축을 해제한다. 압축이 해제된 디렉터리에서 다음을 실행하여 TimingAndEstimation 플러그인을 설치한 후, 아파치를 재시작한다.
# python setup.py install
# /etc/init.d/apache2 restart
# /etc/init.d/apache2 restart
그런 다음 Trac 프로젝트 사이트의 'Admin' 메뉴 페이지 내 'General' 카테고리의 하위 메뉴인 'Plugin' 메뉴에서 'timingandestimationplugin 0.7.8' 플러그인의 모든 컴포넌트를 활성화한다. 이 때, 적용 버튼을 누르면 다음의 에러가 발생 할 수도 있는데,
Trac Error
TracError: The Trac Environment needs to be upgraded.
Run "trac-admin /var/lib/trac/sim_portal upgrade"
TracError: The Trac Environment needs to be upgraded.
Run "trac-admin /var/lib/trac/sim_portal upgrade"
이 때에 다음을 실행하여 데이터베이스 스키마를 업그레이드시켜 주면 해결된다.
# trac-admin /var/lib/trac/sim_portal upgrade
Timing and Estimation needs an upgrade
Upgrading Database
Creating bill_date table
Creating report_version table
Upgrading report_version table to v4
Dropping report_version table
Upgrading reports
Upgrading fields
Upgrading usermanual
Done Upgrading
Upgrade done.
Upgrading Database
Creating bill_date table
Creating report_version table
Upgrading report_version table to v4
Dropping report_version table
Upgrading reports
Upgrading fields
Upgrading usermanual
Done Upgrading
Upgrade done.
아파치를 재시작하고, 에러 메시지가 출력된 페이지를 새로 고침 한다.
# /etc/init.d/apache2 restart
Trac 프로젝트 사이트에 'Management' 탭이 추가 되어 있으면 설치가 된 것이다.
* 참고
- http://blog.daum.net/kuh74/7583052
- http://trac.edgewall.org/wiki/TracInstall
- http://trac.edgewall.org/wiki/TracOnDebian
- http://goodbbai.tistory.com/29
- http://programmers-blog.com/2009/04/09/trac-password-store-problem
- http://trac-hacks.org/wiki/AccountManagerPlugin
- http://trac-hacks.org/wiki/AccountManagerPlugin
- http://trac-hacks.org/wiki/TimingAndEstimationPlugin
- 자바 프로젝트 필수 유틸리티, 박재성, 한빛미디어(주), 2009
** 추가 **
설치를 완료한 후, Trac 프로젝트 목록 페이지(여기서는 http://localhost:8080/trac)를 보면 추가한 프로젝트 외에 다음과 같은 이상한 것이 보일 수도 있다.
.egg-cache: Error
([Errno 2] No such file or directory: '/var/lib/trac/.egg-cache/VERSION')
([Errno 2] No such file or directory: '/var/lib/trac/.egg-cache/VERSION')
'.egg-cache' 디렉터리는 실제로 Trac 프로젝트 디렉터리 상에 존재하는 것으로, 캐쉬에 관한 데이터를 가지고 있을 것으로 추정된다. 이는 Trac 버전 0.11.1에서의 버그로, 0.11.2에서는 이 버그가 고쳐진다고 한다.
** 추가 2 **
'4. 웹 서버(아파치) 연동'에서 8080 포트로 Trac 프로젝트 사이트가 서비스 되도록 가상 호스트 설정을 해주었는데, 이럴 필요 없이 그냥 80 포트로 서비스 되도록 Trac 프로젝트 사이트의 위치만 설정해 주어도 된다.;
/etc/apache2/conf.d에 'trac.conf'라는 파일을 만들고 아래의 내용을 넣어 준다.
<Location /trac>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /trac
</Location>
<LocationMatch "/trac/[^/]+/login">
AuthType Basic
AuthName "Trac, Issue Tracking and Documenting"
AuthUserFile /var/lib/htpasswd/htpasswd
Require valid-user
</LocationMatch>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /var/lib/trac
PythonOption TracUriRoot /trac
</Location>
<LocationMatch "/trac/[^/]+/login">
AuthType Basic
AuthName "Trac, Issue Tracking and Documenting"
AuthUserFile /var/lib/htpasswd/htpasswd
Require valid-user
</LocationMatch>
아파치를 재시작하기 전에 /etc/apache2/sites-enabled 디렉터리에 추가되었던 가상 호스트 설정을 'a2dissite' 명령으로 해제 한다. 물론 이는 'unlink' 명령어 등으로 심볼릭 링크를 바로 제거해도 된다.
이제 다음처럼 아파치를 재시작하면 자동으로 conf.d 디렉터리 내의 설정 파일들이 로드되면서 Trac 프로젝트 사이트의 위치를 추가해준다.
# /etc/init.d/apache2 restart
이제, 포트 번호를 넣지 않고(80포트가 디폴트이므로), 다음과 같은 주소로 Trac 프로젝트 사이트 목록 페이지에 접근 가능해 진다.
http://localhost/trac
'Computing > Programming' 카테고리의 다른 글
| 서브버전(Subversion) 설치 및 이클립스와 연동하기 (0) | 2009/05/16 |
|---|---|
| 이클립스에서 Mylyn 플러그인으로 Trac과 연동하기. (0) | 2009/05/16 |
| Trac (이슈 관리 시스템) 설치하기 (0) | 2009/05/14 |
| Java coding conventions on One Page (0) | 2009/04/16 |
| CHKJ3000E: WAR Validation Failed: java.lang.NullPointerException (0) | 2009/04/11 |
| Servlet specification 2.4에서 JSP 속성 그룹에 유효한 URL 패턴 (0) | 2009/04/11 |
TAG developement environment,
issue tracker,
issue tracking system,
Programming,
TRAC,
개발 환경,
이슈 관리 시스템,
이슈 트래커,
프로그래밍,
대한민국>광주광역시>북구>첨단과기로 261(오룡동)>광주과학기술원>정보통신공학과
댓글을 달아 주세요