在CentOS 5.5上安装Trac-0.12

1. untar Trac source code
2. install Babel  http://babel.edgewall.org/
    easy_install Babel==0.9.5
3. install pysqlite http://code.google.com/p/pysqlite/downloads/list
    $ tar xvfz <version>.tar.gz
    $ cd <version>
    $ python setup.py build_static install

4. Trac
    sudo python setup.py install

5. install git plugin
    easy_install http://github.com/hvr/trac-git-plugin/tarball/master

    ln -s /usr/local/bin/git /usr/bin/git
   
    GitError: GIT control files not found, maybe wrong directory?
       the git repo wasn't owned by the user that Apache/mod_python runs as.
     
6. WEB setting
    yum install libtool httpd-devel apr-devel
    download mod_fastcgi and install
  
$ mkdir -p /var/www/html/trac
$ trac-admin /var/www/html/trac initenv
$ trac-admin /var/www/html/trac/ deploy /tmp/trac
$ mv /tmp/trac/*  /var/www/html/trac/.

$ vim /var/www/html/trac/cgi-bin/trac.fcgi

 below import os add:
os.environ['TRAC_ENV_PARENT_DIR'] = "/var/www/trac/"

$ cd /etc/httpd/conf.d
$ vi trac.conf


<IfModule mod_fastcgi.c>
    AddHandler fastcgi-script .fcgi
    FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/home/sysdata/trac/project/
</IfModule>
LoadModule fastcgi_module modules/mod_fastcgi.so
ScriptAlias /trac /var/www/html/trac/cgi-bin/trac.fcgi


# /etc/init.d/httpd restart

7. Git hook
    trac-post-receive-hook-0.12-only-master.py
   
8. Install other Trac plugins

    easy_install http://trac-hacks.org/svn/accountmanagerplugin/trunk
    easy_install -U -Z http://trac-hacks.org/svn/customfieldadminplugin/0.11
    http://trac-hacks.org/wiki/DateFieldPlugin
    http://trac-hacks.org/wiki/NavAddPlugin
    http://trac-hacks.org/wiki/AutocompleteUsersPlugin
    http://trac-hacks.org/wiki/UserManagerPlugin
   

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值