Trac由Edgewall公司开发维护,使用Python开发,开源,用于软件开发项目管理,提供SVN等版本控制工具的Web接口,与Wiki、bug跟踪集成。
Trac官网提供了完备文档,并有丰富的插件库。
这篇文章详细讲述了Ubuntu 12.04下Trac 0.12的安装过程,本文讲述布署基于MySQL的Trac,并完成与SVN的集成。
svn 安装见 ,我已亲自试过
1. 安装Trac
#如果已装,去掉已装好的,注trac自己会把需要依赖包装好
sudo easy_install babel
$ sudo apt-get install libapache2-mod-wsgi libapache2-mod-auth-mysql trac
2. 配置数据库
$ mysql -u root -p
mysql> CREATE DATABASE trac DEFAULT CHARSET utf8 COLLATE utf8_bin;
mysql> exit
3. 配置Trac项目
$ sudo mkdir /var/www/trac
$ sudo chown -R www-data:www-data /var/www/trac
$ sudo trac-admin /var/www/trac initenv
项目名称 [My Project]> <project_name> project
数据库连接字符串 [sqlite:db/trac.db]> mysql://root:root@localhost/trac
如果您想试用一下(我们后面配apache)这个新的项目环境,请尝试运行Trac独立Web服务器 `tracd`:
tracd --port 8000 /var/www/trac
恭喜您!
$ sudo trac-admin /var/www/trac permission add admin TRAC_ADMIN
4. 修改数据库表引擎
$ mysql -u root -p
mysql> USE trac;
mysql> ALTER TABLE `attachment` ENGINE = InnoDB;
ALTER TABLE `auth_cookie` ENGINE = InnoDB;
ALTER TABLE `cache` ENGINE = InnoDB;
ALTER TABLE `component` ENGINE = InnoDB;
ALTER TABLE `enum` ENGINE = InnoDB;
ALTER TABLE `milestone` ENGINE = InnoDB;
ALTER TABLE `node_change` ENGINE = InnoDB;
ALTER TABLE `permission` ENGINE = InnoDB;
ALTER TABLE `report` ENGINE = InnoDB;
ALTER TABLE `repository` ENGINE = InnoDB;
ALTER TABLE `revision` ENGINE = InnoDB;
ALTER TABLE `session` ENGINE = InnoDB;
ALTER TABLE `session_attribute` ENGINE = InnoDB;
ALTER TABLE `system` ENGINE = InnoDB;
ALTER TABLE `ticket` ENGINE = InnoDB;
ALTER TABLE `ticket_change` ENGINE = InnoDB;
ALTER TABLE `ticket_custom` ENGINE = InnoDB;
ALTER TABLE `version` ENGINE = InnoDB;
ALTER TABLE `wiki` ENGINE = InnoDB;
mysql> exit