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
在CentOS 5.5上安装Trac-0.12
最新推荐文章于 2024-07-31 15:55:27 发布