Skip to content

Trac:HowToInstall

TRAC 설치 방법에 대하여 정리한다.

WARNING

httpd연동시 mod_python 대신 mod_wsgi를 사용해야 한다. 1

CentOS7 install

Python 개발자 버전과 setuptools를 설치한다.

$ yum install python-devel
$ yum list search python-setuptools

Pip를 설치한 후 html 렌더링을 위한 Genshi와 Trac을 설치한다.

$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install -U setuptools
$ sudo pip install Genshi
$ sudo pip install trac

shell을 다시 접속한 후 TRAC 프로젝트를 생성한다.

$ mkdir /repo/trac/
$ cd /repo/trac/
$ trac-admin [PROJECT_NAME] initenv

관리자 로그인을 위해 권한을 추가한다.

$ sudo trac-admin </path/to/projenv> permission add <ID> TRAC_ADMIN

httpd연동을 위해 mod_wsgi를 설치한 후 TRAC을 연동한다. 그 방법은 이곳 참조.

SELinux 보안 수정을 위해 chcon을 사용한다.

$ chcon -R -t httpd_sys_content_t /repo/trac
$ chcon -R -t httpd_sys_rw_content_t /repo/trac
$ chcon -R -t httpd_sys_content_t /repo/trac.egg
$ chcon -R -t httpd_sys_rw_content_t /repo/trac.egg

물론, Apache 사용자와 권한을 변경해야 한다.

$ chown -R apache:apache /repo/trac

See also

Favorite site

References