[소프트웨어형상관리] 트랙+서브버젼 설치 (trac+svn)

트랙+서브버젼 설치 (trac+svn) [소프트웨어형상관리,트랙,서브버젼,trac,svn,SCM]

이미지출처 : www.wiggy.net

Trac+SVN 설치 방법








——————————————————-

# 파이썬으로 인스톨 하기

——————————————————-

setup.py 파일이 들어있는 배포판의 인스톨 방법



python ./setup.py install



——————————————————-

# [swig] 설치(Simplified Wrapper and Interface Generator)

——————————————————-

./configure –with-python=/usr/bin/python

make

sudo make install



——————————————————-

# [Subversion] 설치(SCM)

——————————————————-

./configure -prefix=/usr/local –without-berkeley-db –enable-swig-bindings=python \

–with-swig=/usr/local/bin/swig PYTHON2=/System/Library/Frameworks/Python.framework/Versions/2.3/ \

–mandir=/usr/local/share/man –with-ssl –with-apxs=/usr/local/apache2/bin/apxs –with-zlib \

–with-apr=/usr/local/apache2 –with-apr-util=/usr/local/apache2

make

sudo make install



——————————————————-

# swig svn python bindings

——————————————————-

swig를 이용하여 svn을 연동

cd <subversion-distribution-top-dir>

make swig-py

sudo make install-swig-py

echo /usr/local/lib/svn-python > /Library/Python/2.3/site-packages/svn-python.pth



——————————————————-

# [Clearsilver]

——————————————————-

소스코드를 색으로 강조해준다.(highlight 기능)

cd <clearsilver-distribution-top-dir>

./configure –prefix=/usr/local –with-python=/usr/bin/python –disable-ruby

make

# >>> here modify first line of scripts/document.py to use same python (#!/usr/bin/ python)

sudo make install



——————————————————-

# [Docutils]

——————————————————-

문서를 원하는 형식으로 변환

cd < docutils-distribution-top-dir>

sudo python setup.py install



——————————————————-

# [postgres db] 설치

——————————————————-

./configure

gmake

su

gmake install

adduser postgres

mkdir /usr/local/pgsql/data

chown postgres /usr/local/pgsql/data

su - postgres

/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &

/usr/local/pgsql/bin/createdb -E=utf8 test

/usr/local/pgsql/bin/psql test



——————————————————-

# postgres 기본적인 명령어들

——————————————————-

c dbname : dbname 에 연결

\d : show databases

show server_encoding :

show client_encoding

set client_encoding = ‘uhc’;



——————————————————-

# trac 새로운 환경 만들기

——————————————————-

trac-admin /path/to/projectenv initenv



# 환경설정중에 DB에 postgres 사용하기

Database Connection Strings

postgres://user:pass@server/database?schema=yourschemaname



——————————————————-

# [pyPgSQL] 설치

——————————————————-

python에서 pgsql 이용하기 위해서 필요



——————————————————-

# [egenix-mx-base] 설치

——————————————————-

postgres의 DateTime을 사용하기 위해서 설치



——————————————————-

# trac 기본 익명 사용자 권한

——————————————————-

trac-admin PATH permission list - 권한 리스트 보기

trac-admin PATH permission add ID PERMISSION - 권한 추가(’*’ 사용가능)

trac-admin PATH permission remove ID PERMISSION - 권한 제거(’*’ 사용가능)



User Action

————————–

anonymous BROWSER_VIEW

anonymous CHANGESET_VIEW

anonymous FILE_VIEW

anonymous LOG_VIEW

anonymous MILESTONE_VIEW

anonymous REPORT_SQL_VIEW

anonymous REPORT_VIEW

anonymous ROADMAP_VIEW

anonymous SEARCH_VIEW

anonymous TICKET_CREATE

anonymous TICKET_MODIFY

anonymous TICKET_VIEW

anonymous TIMELINE_VIEW

anonymous WIKI_CREATE

anonymous WIKI_MODIFY

anonymous WIKI_VIEW



Available actions:

BROWSER_VIEW, CHANGESET_VIEW, CONFIG_VIEW, FILE_VIEW, LOG_VIEW,

MILESTONE_ADMIN, MILESTONE_CREATE, MILESTONE_DELETE, MILESTONE_MODIFY,

MILESTONE_VIEW, REPORT_ADMIN, REPORT_CREATE, REPORT_DELETE, REPORT_MODIFY,

REPORT_SQL_VIEW, REPORT_VIEW, ROADMAP_ADMIN, ROADMAP_VIEW, SEARCH_VIEW,

TICKET_ADMIN, TICKET_APPEND, TICKET_CHGPROP, TICKET_CREATE, TICKET_MODIFY,

TICKET_VIEW, TIMELINE_VIEW, TRAC_ADMIN, WIKI_ADMIN, WIKI_CREATE,

WIKI_DELETE, WIKI_MODIFY, WIKI_VIEW



——————————————————-

# svn PATH 설정

——————————————————-

cd ~

echo ‘export PATH="$PATH:/usr/local/bin"‘ >> .profile



——————————————————-

# trac + svn 권한 설정

——————————————————-

htpasswd -c .htpasswd ID 로 생성



create the .htpasswd in /var/trac/your_project/, for exampe:



[users]

YourName:8d2yxeC7vAkiQ

HisName:7$4k2Ci4QoVFc



# SVN authz

Edit the file authz in /var/svn/your_project/conf/, for example:



[groups]

admin = YourName



[/]

@admin = rw

HisName = r

* =



——————————————————-

trac-digest.py 패스워드 생성기

——————————————————-

from optparse import OptionParser

import md5



# build the options

usage = “usage: %prog [options]”

parser = OptionParser(usage=usage)

parser.add_option("-u", “–username",action="store", dest="username", type = “string",

help="the username for whom to generate a password")

parser.add_option("-p", “–password",action="store", dest="password", type = “string",

help="the password to use")

(options, args) = parser.parse_args()



# check options

if (options.username is None) or (options.password is None):

parser.error("You must supply both the username and password")



# Generate the string to enter into the htdigest file

realm = ‘trac’

kd = lambda x: md5.md5(’:’.join(x)).hexdigest()

print ‘:’.join((options.username, realm, kd([options.username, realm, options.password])))



——————————————————-

SVN & trac 구동(digest파일 사용)

——————————————————-


svnserve -d -r /data/repository/svn


python trac-digest.py -u username -p password >> c:\digest.txt

python tracd -d –port 8000 –auth proj_name,c:\digest.txt,trac c:\path\to\proj_name



——————————————————-

참조자료

——————————————————-

[TracInstall]

[TracOnOsxServerNoFink]

[TracEnvironment]

[TracPermissions]

[TracIni]



by


Tags : , , , , , , , , , ,

  • 재미있게 읽으셨나요?
    광고를 클릭해주시면,
    블로그 운영에 큰 도움이 됩니다!