TRAC note (1): Install TRAC in Windows

Source: Internet
Author: User
Tags tortoisesvn

TRAC note (1): Install TRAC in Windows

To develop better software, I believe that its (issue tracking system) and VCs (version control system) are essential. For the current situation in China, I believe most local companies have implemented SCM, but there is no trace of its.
Therefore, it is necessary to learn and use TRAC.

Through the search engine, you can find the following its:
Bugzilla: Perl-based.
GEMINI: non-open-source, Based on. NET. The free version is available to five people, And sharpdevelop is used.
JIRA: Based on Java, heavyweight.
Mantis: PHP-based, lightweight.
TRAC: Based on python.

For consistency and other reasons, I chose TRAC.
This article describes how to install and configure TRAC and integrate it with Apache and subversion.

1) preparation software
SVN-1.46:
http://subversion.tigris.org/files/documents/15/41077/svn-win32-1.4.6.zip
SVN-1.46-Py2.5:
http://subversion.tigris.org/files/documents/15/41078/svn-win32-1.4.6_py25.zip
TortoiseSVN-1.4.6 (optional ):
http://jaist.dl.sourceforge.net/sourceforge/tortoisesvn/TortoiseSVN-1.4.6.11647-win32-svn-1.4.6.msi
TortoiseSVN-1.4.6-LangPack (optional):
http://jaist.dl.sourceforge.net/sourceforge/tortoisesvn/LanguagePack-1.4.6.11647-win32-zh_CN.exe

Apache-2.2.6:
Http://apache.mirror.phpchina.com/httpd/binaries/win32/apache_2.2.6-win32-x86-no_ssl.msi
Python-2.5:
Http://www.python.org/ftp/python/2.5/python-2.5.msi
Mod_Python-3.3.1-py2.5-Apache2.2:
Http://apache.mirror.phpchina.com/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.5-Apache2.2.exe
SetupTools-0.6c7
Http://peak.telecommunity.com/dist/ez_setup.py

PySqlite-2.4.0-py2.5:
Http://initd.org/pub/software/pysqlite/releases/2.4/2.4.0/pysqlite-2.4.0.win32-py2.5.exe
Http://files.cnblogs.com/zealic/pysqlite-2.4.0.win32-py2.5.rar

Trac-0.11b:
Http://ftp.edgewall.com/pub/trac/Trac-0.11b1.zip
Genshi-0.4.4-py2.5:
Http://ftp.edgewall.com/pub/genshi/Genshi-0.4.4-py2.5.egg

Most of the above software has a clear dependency and should not use the latest version. For example, mod_python depends on Python-2.5, which is not supported even Python-2.5.1.
Download all the above softwareD: \ setup


2) configure the environment
2.1) install the Basic Environment
First install Python-2.5.D: \ Python
Install Apache-2.5.6.D: \ apache
Install mod_python.

2.2) configure the environment
InHttpd. confAdd the following at the endCode:

Loadmodule python_module modules/mod_python.so
Alias/Hi/"D:/Apache/htdocs/py_scripts /"
< Directory "D:/Apache/htdocs/py_scripts /" >
Addhandler mod_python. phtm
Pythonhandler Test
Pythondebug on
</ Directory >


Create a fileTest. pyTo Apache. \ Htdocs \ py_scriptsDirectory
[Test. py]

From Mod_python Import Apache
Def Handler (req ):
Req. content_type =   ' Text/plain '
Req. Write ( " Hello world! " )
Return Apache. OK

2.3) test
Start the apache service.
Access http: // 127.0.0.1: 8080/Hi/Hello. phtm to test. "Hello World!" is displayed! "Indicates success.

2.4) install pysqlite
RunPysqlite-2.4.0.win32-py2.5.exeTo automatically install pysqlite.

 

3) install Subversion
Here we assume that the Subversion is installedD: \ Subversion
3.1) install the Subversion Service
To install the Subversion service, see register the Subversion service with BAT to simplify the installation process.

3.2) install Python binding for subversion
ExtractSvn-win32-1.4.6_py25.zipTo copy the svn directory and libsvn directoryD: \ Python \ Lib
ModifyLibsvn"_ *. Dll"File is"_ *. PYD"


3.3) integration with Apache
A) Load Module
CopyD: \ subversion \ binCopy the following files to the directoryD: \ apache \ DLLs
-Intl3_svn.dll
-Libdb44.dll
-Ssleay32.dll
-Libeay32.dll
-Mod_authz_svn.so
-Mod_dav_svn.so

B) Configure Apache
InHttpd. confAdd the following code at the end:

Loadmodule dav_module modules/mod_dav.so
Loadmodule dav_fs_module modules/mod_dav_fs.so
Loadmodule dav_svn_module DLLs/mod_dav_svn.so
Loadmodule authz_svn_module DLLs/mod_authz_svn.so
< Location /SVN >
Dav SVN
Svnparentpath "G: \ ALM \ versionrepository"
</ Location >
# Libsvn depends on the following two DLL. If it is not imported, the TRAC cannot perform browser Source
LoadFile "./DLLs/ssleay32.dll"
LoadFile "./DLLs/libeay32.dll"

3.4) test
Shut down the apache service and restart it.
Make sure that your SVN repository contains myrepos.
Access http: // 127.0.0.1: 8080/SVN/myrepos.
If you see subversion, the directory structure of your myrepos repository is successful.

 

4) install TRAC
4.1) install TRAC
A)Direct executionEz_setup.pyTo install Python setuptools.

B)Decompress TracD: \ Setup \ Trac-0.11b1
Install the TRAC dependency packageGenshi-0.4.4-py2.5.egg

D: \ Python \ scripts \ easy_install D: \ Setup \ genshi - 0.4 . 4 - Py2. 5 . Egg

C)Install TRAC

D: \ Setup \ Trac-0.11b1 \ setup. py install

D)Initialize the TRAC Repository

D: \ Python \ scripts \ TRAC - Admin D: \ ALM \ TRAC \ test initenv

Configure test according to the command prompt.

4.2) integration with Apache
Add the following code to Apache:

< Location /TRAC >
Sethandler mod_python
Pythonhandler TRAC. Web. modpython_frontend
Pythonoption tracenv D: \ ALM \ TRAC \ test
Setenv python_egg_cache/tmp
Pythonoption tracuriroot/TRAC
Authtype none
</ Location >

4.3) test
Open http: // 127.0.0.1: 8080/TRAC/browser and check whether the svn directory tree is displayed.
If it appears, the operation is successful.

5) install tortoisesvn (optional)
Install tsvn and its Language Pack.

6) Dependency Graph


Icon meaning:
Stars: independent components.
Light bulb: Components dependent on other independent components.
Magic wand: Apache module.
The blue line depends on subversion.
The orange line depends on python.
The purple line depends on Apache.

7) Conclusion
TRAC configuration is complicated. simple configuration is used here, and no permission management is performed.
Let's talk about these content next time.

Warning: This document uses TRAC 0.11b1.ArticleContent applies to other versions.
We also do not recommend that you deploy this beta version in the actual environment. If you encounter any problems, it will be irrelevant to you.
If you have any questions, please mail me: rszealic {at} gmail.com

All rights reserved.

8) References
The TRAC official site:
Http://trac.edgewall.org/

Install and configure Apache + SVN + TRAC in Windows (2 ):
Http://luchar.javaeye.com/blog/151051

Apache + mod_python:
Http://bbs.chinaunix.net/thread-806879-1-1.html

How to install TRAC in Windows:
Http://bbs.phpxe.com/thread-44-1-1.html

Subversion Chinese online manual:
Http://www.subversion.org.cn/svnbook
Http://www.subversion.org.cn/svnbook/1.1/svn-ch-9-sect-6.1.html

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.