日期:2014-05-17  浏览次数:21102 次

windows 下安装 trac
windows 下安装 trac

------
参考:

http://how-to-solutions.com/how-to-install-trac-on-windows.html
http://luchar.iteye.com/blog/151051

------
基本 安装 步骤:

* 安装 python2.6.6
* 安装 Genshi-0.6.win32.exe
* 安装 svn1.6.2
* 安装 py26-pysvn-svn1612-1.7.4-1321.exe
* 安装 pysqlite-2.6.0.win32-py2.6.exe
* 安装 Trac-0.12.1.win32.exe
* 下载 ez_setup.py
      http://peak.telecommunity.com/dist/ez_setup.py
* 将 ez_setup.py 放到 python_home/Scripts/ 目录下,
* 安装 Account Manager Plugin
      在 python_home/Scripts/ 目录下,
      输入:
            easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
      回车,
      则安装 该插件,
* 执行 ez_setup.py
      cmd 进入 python_home/Scripts/ 目录,
      输入 ez_setup.py ,回车,

------
创建 trac 项目

步骤:
* 创建 trac 项目
      cmd 进入 python_home/Scripts/ 目录,
      输入 trac-admin E:\workplace\trac_workplace\hello initenv , 回车,则在该目录创建trac项目,
      提示输入项目名称,则输入1个名称,然后回车,
      提示输入数据库连接,直接回车即可,
* 配置 trac
      进入 前面创建的 trac 项目根目录,如:E:\workplace\trac_workplace,记为 trac_proj_home,
      进入 trac_proj_home/conf,打开 trac.ini,在 [header_logo] 上面,加入如下内容:
            [components]
            acct_mgr.admin.accountmanageradminpage = enabled
            acct_mgr.api.accountmanager = enabled
            acct_mgr.db.sessionstore = enabled
            acct_mgr.htfile.htdigeststore = enabled
            acct_mgr.pwhash.htdigesthashmethod = enabled
            acct_mgr.web_ui.accountmodule = enabled
            acct_mgr.web_ui.loginmodule = enabled
            acct_mgr.web_ui.registrationmodule = enabled
            trac.web.auth.loginmodule = disabled
     
      进入 trac_proj_home/conf/ 目录,新建 passwd 文件,内容为空,
     
* 开启匿名用户 的 权限
      进入 python_home/Scripts/ 目录下,
      输入:
            trac-admin trac_proj_home permission add anonymous TRAC_ADMIN
      回车,
* 启动 trac
      进入 python_home/Scripts/ 目录下,
      输入:
            tracd –p 80 trac_proj_home,
      然后通过 http://localhost/ 访问,其中有项目列表
*

------
trac & apache 集成

步骤:
* 安装 mod_python-3.3.1.win32-py2.6-apache2.2.exe
      在网上找到这个文件,
      安装过程中要选择 apache 的安装目录,
      完成,
* 编辑 apache_home/conf/httpd.conf
      加入:
            #p