在ubuntu 12.04 (LTS)上装trac

trac介绍就不说了,直接去主页看,直接贴安装命令

1. 装trac包

sudo apt-get install trac trac-accountmanager trac-graphviz trac-icalviewplugin trac-mastertickets trac-wysiwyg trac-wikitablemacro trac-tags trac-customfieldadmin trac-datefieldplugin

2. 装数据库,我使用sqlite

sudo apt-get install sqlite3 python-sqlite

3. 添加trac用户

sudo adduser --system --shell /bin/sh --gecos 'trac project managment' --group --disabled-password --home /var/trac trac

4. 关联apache 用户

sudo adduser www-data trac

5. 创建项目

sudo su trac

cd

mkdir projects

cd projects

trac-admin YOURPROJECT initenv

trac-admin YOURPROJECT deploy YOURPROJECT/deploy

chmod 0775 . -R

6. 装modwsgi

sudo apt-get install apache2 libapache2-mod-wsgi

7. 配置apache2

  ServerName trac.domain.my

  DocumentRoot /var/trac/projects



  WSGIScriptAliasMatch ^/([^/]+) /var/trac/projects/$1/deploy/cgi-bin/trac.wsgi

  <Directory /var/trac/projects>

    WSGIApplicationGroup %{GLOBAL}

    Options Indexes +ExecCGI +SymLinksIfOwnerMatch

    AllowOverride None

    Order allow,deny

    allow from all

  </Directory>



  <LocationMatch /[^/]+/login>

   AuthType Basic

   AuthName "trac"

   AuthUserFile /var/trac/.passwd

   Require valid-user

  </LocationMatch>

8. 配置trac用户密码

sudo htpasswd -c /var/trac/.passwd trac

9. 开始玩吧

你可能感兴趣的:(ubuntu 12.04)