Programmer Application Note

2015년 4월 9일 목요일

trac 서버 구축

오전 2:38 Posted by PAN.SPOT , No comments

ubuntu 14.04 기준

1.패키지 설치
$sudo apt-get install apache2
$sudo apt-get install apache2-utils
$sudo apt-get install trac libapache2-mod-python python-setuptools
$sudo apt-get install rcconf

2.apache authorization 파일 생성
최초 생성 시
$sudo htpasswd -c /etc/apache2/authorization.auth 사용자명
사용자 추가 시
$sudo htpasswd  /etc/apache2/authorization.auth 사용자명

3. apache2 trac 설정
$sudo vi /etc/apache2/mods-enable/svntrac.conf

<Location /trac>
SetHandler mod_python
SetEnv PYTHON_EGG_CACHE /home/trac/cache
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir trac경로
PythonOption TracUriRoot /trac
AuthType Basic
AuthName "This is your repository"
AuthUserFile /etc/apache2/authorization.auth
Require valid-user
</Location>

4.프로젝트 폴더 생성
$cd trac경로
$mkdir 프로젝트명
$chown -R www-data:www-data 프로젝트명
$trac-admin 프로젝트명 initenv
   - projectname : 프로젝트명
   - 디비 입력 : 그냥 엔터

5.시작 할때 마다 apache2 실행
$rcconf
apache2 선택

※ 기본 계정인 www-data를 변경 하고 싶다면?
$vi /etc/apache2/evnvars
export APACHE_RUN_USER=여기를 변경
export APACHE_RUN_GROUP=여기를 변경

0 개의 댓글:

댓글 쓰기