http://trac-hacks.org/ trac 플러스인 사이트
수동으로 설치하고자 하는 플러그인을 다운로드 받거나
easy_install을 이용해서 설치 하면 Trac에서 사용 가능 하다.
수동으로 Trac의 플러그인 설치 방법과 trac.ini 파일을 수정하여
Trac 사이트의 로고 변경 방법에 대한 글.
수동으로 Trac 플러그인 설치
설치하고자 하는 플러그인 다운로드 후 압축을 해제 후
setup.py가 있는 폴더로 이동
python setup.py bdist_egg
dist폴더에 egg파일이 생성
그 egg파일을 자신의 trac 홈페이지에 Admin 탭의 Plugins에서
Install Plugiin 해주면 된다.
그런후
trac-admin upgrade
trac-admin resync
httpd -k stop
httpd -k start 로 아파치 재시작
trac.ini 파일의 [components] 부분에 수동으로
추가를 해주는 분들도 있었지만..
그렇게 안해도 알아서들 upgrade, resync 해주고 나면
큰 문제 없이 [components]부분에 enable 라인이 추가되는듯.
Trac의 로고 이미지 변경
사용할 로고 이미지를 /Trac_PROJECT/htdocs 폴더에 복사한 후,
trac.ini 파일을 다음과 같이 수정해준다.
[header_logo]
alt = /그림이 없을경우 나오는 텍스트 문장/
height = -1
link = /your_url/
src = site/YOUR_LOGO_IMG_FILENAME
width = -1
alt = /그림이 없을경우 나오는 텍스트 문장/
height = -1
link = /your_url/
src = site/YOUR_LOGO_IMG_FILENAME
width = -1
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 206, in dispatch
req.hdf = HDFWrapper(loadpaths=chrome.get_all_templates_dirs())
File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 263, in get_all_templates_dirs
dirs += provider.get_templates_dirs()
File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 264, in get_templates_dirs
return [resource_filename(__name__, 'templates')]
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename
self, resource_name
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename
return self._extract_resource(manager, zip_path)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1318, in _extract_resource
manager, os.path.join(zip_path, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1332, in _extract_resource
self.egg_name, self._parts(zip_path)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 921, in get_cache_path
self.extraction_error()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 887, in extraction_error
raise err
ExtractionError: Can't extract file(s) to egg cache
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 406, in dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 206, in dispatch
req.hdf = HDFWrapper(loadpaths=chrome.get_all_templates_dirs())
File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 263, in get_all_templates_dirs
dirs += provider.get_templates_dirs()
File "build/bdist.linux-x86_64/egg/acct_mgr/web_ui.py", line 264, in get_templates_dirs
return [resource_filename(__name__, 'templates')]
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 841, in resource_filename
self, resource_name
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1311, in get_resource_filename
return self._extract_resource(manager, zip_path)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1318, in _extract_resource
manager, os.path.join(zip_path, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1332, in _extract_resource
self.egg_name, self._parts(zip_path)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 921, in get_cache_path
self.extraction_error()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 887, in extraction_error
raise err
ExtractionError: Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
cache:
[Errno 13] 허가 거부: '/usr/lib/python2.5/site-packages/TracAccountManager-0.1.3dev_r5273-py2.5.egg-tmp'
The Python egg cache directory is currently set to:
/usr/lib/python2.5/site-packages/
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
/etc/httpd/{conf|conf.d}/trac.conf 파일의 설정 중
<Location /trac>
SetHandler mod_python
SetEnv PYTHON_EGG_CACHE /usr/lib/python2.5/site-packages/
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /YOUR_TRAC_DIRECTORY
PythonOption TracUriRoot /trac
</Location>
SetHandler mod_python
SetEnv PYTHON_EGG_CACHE /usr/lib/python2.5/site-packages/
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /YOUR_TRAC_DIRECTORY
PythonOption TracUriRoot /trac
</Location>
Bold 효과로 된 문자열을 알맞게 변경 해주거나.
EGG_CACHE 환경 설정을 /etc/profile에 추가해주어야 한다고 한다.
Trac를 yum이 아닌 easy_install로 설치하였을 경우 이런 문제는 없었음. ^^
Posted by gwlee