Home | Mirror | Search

第 7 章 項目管理工具

project management tool

目錄

1. TRAC
1.1. 安裝
1.1.1. source code
1.1.2. easy_install
1.1.3. MySQL
1.2. trac.ini
1.2.1. repository
1.2.2. attachment 附件配置
1.3. trac-admin
1.3.1. adduser script
2. TUTOS
3. Open Source Requirements Management Tool

建模工具

常用的項目管理工具

1. TRAC

http://trac.edgewall.org

1.1. 安裝

1.1.1. source code

過程 7.1. TRAC - source

  1. setup.py

    wget http://ftp.edgewall.com/pub/trac/Trac-0.11b1.tar.gz
    tar zxvf Trac-0.11b1.tar.gz
    sudo python ./setup.py install
    					
  2. clearsilver

    sudo apt-get install python2.5-dev
    wget http://www.clearsilver.net/downloads/clearsilver-0.10.5.tar.gz
    tar zxvf clearsilver-0.10.5.tar.gz
    cd clearsilver-0.10.5/
    ./configure --with-python=/usr/bin/python
    make
    sudo make install
    					

1.1.2. easy_install

過程 7.2. TRAC - easy_install

  1. easy_install

    $ sudo apt-get install python-setuptools
    					
  2. Installing Trac

    sudo easy_install Pygments
    sudo easy_install Genshi
    sudo easy_install Trac
    					

    ClearSilver

    sudo apt-get install python-clearsilver
    					

    python svn

     sudo apt-get install python-svn python-svn-dbg
    					

    create svn repos

    $ svnadmin create /home/netkiller/repos
    					
  3. Creating a Project Environment

    					
    $ trac-admin /home/netkiller/projectenv initenv
    
    Creating a new Trac environment at /home/netkiller/projectenv
    
    Trac will first ask a few questions about your environment
    in order to initalize and prepare the project database.
    
     Please enter the name of your project.
     This name will be used in page titles and descriptions.
    
    Project Name [My Project]>
    
     Please specify the connection string for the database to use.
     By default, a local SQLite database is created in the environment
     directory. It is also possible to use an already existing
     PostgreSQL database (check the Trac documentation for the exact
     connection string syntax).
    
    Database connection string [sqlite:db/trac.db]>
    
     Please specify the type of version control system,
     By default, it will be svn.
    
     If you don't want to use Trac with version control integration,
     choose the default here and don't specify a repository directory.
     in the next question.
    
    Repository type [svn]>
    
     Please specify the absolute path to the version control
     repository, or leave it blank to use Trac without a repository.
     You can also set the repository location later.
    
    Path to repository [/path/to/repos]> /home/netkiller/repos
    
     Please enter location of Trac page templates.
     Default is the location of the site-wide templates installed with Trac.
    
    Templates directory [/usr/share/trac/templates]>
    
    Creating and Initializing Project
     Installing default wiki pages
     /usr/share/trac/wiki-default/TracIni => TracIni
     /usr/share/trac/wiki-default/TracSupport => TracSupport
     /usr/share/trac/wiki-default/WikiStart => WikiStart
     /usr/share/trac/wiki-default/TitleIndex => TitleIndex
     /usr/share/trac/wiki-default/TracModPython => TracModPython
     /usr/share/trac/wiki-default/TracInterfaceCustomization => TracInterfaceCustomization
     /usr/share/trac/wiki-default/WikiDeletePage => WikiDeletePage
     /usr/share/trac/wiki-default/TracTicketsCustomFields => TracTicketsCustomFields
     /usr/share/trac/wiki-default/TracChangeset => TracChangeset
     /usr/share/trac/wiki-default/TracLogging => TracLogging
     /usr/share/trac/wiki-default/TracSyntaxColoring => TracSyntaxColoring
     /usr/share/trac/wiki-default/TracImport => TracImport
     /usr/share/trac/wiki-default/TracTimeline => TracTimeline
     /usr/share/trac/wiki-default/TracAdmin => TracAdmin
     /usr/share/trac/wiki-default/InterWiki => InterWiki
     /usr/share/trac/wiki-default/WikiPageNames => WikiPageNames
     /usr/share/trac/wiki-default/TracNotification => TracNotification
     /usr/share/trac/wiki-default/TracFastCgi => TracFastCgi
     /usr/share/trac/wiki-default/InterTrac => InterTrac
     /usr/share/trac/wiki-default/TracUnicode => TracUnicode
     /usr/share/trac/wiki-default/TracGuide => TracGuide
     /usr/share/trac/wiki-default/TracRevisionLog => TracRevisionLog
     /usr/share/trac/wiki-default/TracBrowser => TracBrowser
     /usr/share/trac/wiki-default/WikiRestructuredText => WikiRestructuredText
     /usr/share/trac/wiki-default/TracLinks => TracLinks
     /usr/share/trac/wiki-default/TracInstall => TracInstall
     /usr/share/trac/wiki-default/TracPermissions => TracPermissions
     /usr/share/trac/wiki-default/WikiMacros => WikiMacros
     /usr/share/trac/wiki-default/TracQuery => TracQuery
     /usr/share/trac/wiki-default/TracBackup => TracBackup
     /usr/share/trac/wiki-default/TracWiki => TracWiki
     /usr/share/trac/wiki-default/SandBox => SandBox
     /usr/share/trac/wiki-default/TracRoadmap => TracRoadmap
     /usr/share/trac/wiki-default/TracAccessibility => TracAccessibility
     /usr/share/trac/wiki-default/TracSearch => TracSearch
     /usr/share/trac/wiki-default/TracPlugins => TracPlugins
     /usr/share/trac/wiki-default/RecentChanges => RecentChanges
     /usr/share/trac/wiki-default/WikiNewPage => WikiNewPage
     /usr/share/trac/wiki-default/TracCgi => TracCgi
     /usr/share/trac/wiki-default/TracRss => TracRss
     /usr/share/trac/wiki-default/CamelCase => CamelCase
     /usr/share/trac/wiki-default/WikiFormatting => WikiFormatting
     /usr/share/trac/wiki-default/TracTickets => TracTickets
     /usr/share/trac/wiki-default/TracStandalone => TracStandalone
     /usr/share/trac/wiki-default/InterMapTxt => InterMapTxt
     /usr/share/trac/wiki-default/TracReports => TracReports
     /usr/share/trac/wiki-default/WikiHtml => WikiHtml
     /usr/share/trac/wiki-default/WikiProcessors => WikiProcessors
     /usr/share/trac/wiki-default/TracUpgrade => TracUpgrade
     /usr/share/trac/wiki-default/TracEnvironment => TracEnvironment
     /usr/share/trac/wiki-default/WikiRestructuredTextLinks => WikiRestructuredTextLinks
    
    Warning:
    
    You should install the SVN bindings
    
    ---------------------------------------------------------------------
    Project environment for 'My Project' created.
    
    You may now configure the environment by editing the file:
    
      /home/netkiller/projectenv/conf/trac.ini
    
    If you'd like to take this new project environment for a test drive,
    try running the Trac standalone web server `tracd`:
    
      tracd --port 8000 /home/netkiller/projectenv
    
    Then point your browser to http://localhost:8000/projectenv.
    There you can also browse the documentation for your installed
    version of Trac, including information on further setup (such as
    deploying Trac to a real web server).
    
    The latest documentation can also always be found on the project
    website:
    
      http://trac.edgewall.org/
    
    Congratulations!
    					
    					
  4. Running the Standalone Server

    tracd --port 8000 /home/netkiller/projectenv
    					
  5. testing

    http://192.168.1.7:8000/projectenv/

  6. auth

    sudo apt-get install apache2-utils
    
    $ htdigest -c /home/neo/trac/conf/passwd.digest localhost neo
    Adding password for neo in realm localhost.
    New password:
    Re-type new password:
    
    $ htdigest /home/neo/trac/conf/passwd.digest localhost nchen
    Adding user nchen in realm localhost
    New password:
    Re-type new password:
    
    $ trac-admin /home/neo/trac permission add admin TRAC_ADMIN
    $ trac-admin /home/neo/trac permission add netkiller admin
    
    $ trac-admin /home/neo/trac permission add developer TICKET_ADMIN
    $ trac-admin /home/neo/trac permission add nchen developer
    $ trac-admin /home/neo/trac permission add neo developer
    
    $ trac-admin /home/neo/trac permission list
    User           Action
    ------------------------------
    admin          TRAC_ADMIN
    anonymous      BROWSER_VIEW
    anonymous      CHANGESET_VIEW
    anonymous      FILE_VIEW
    anonymous      LOG_VIEW
    anonymous      MILESTONE_VIEW
    anonymous      REPORT_SQL_VIEW
    anonymous      REPORT_VIEW
    anonymous      ROADMAP_VIEW
    anonymous      SEARCH_VIEW
    anonymous      TICKET_VIEW
    anonymous      TIMELINE_VIEW
    anonymous      WIKI_VIEW
    authenticated  TICKET_CREATE
    authenticated  TICKET_MODIFY
    authenticated  WIKI_CREATE
    authenticated  WIKI_MODIFY
    developer      TICKET_ADMIN
    nchen          developer
    neo            developer
    netkiller      admin
    					
  7. daemon

    $ tracd -d -s --port 8000 /home/netkiller/projectenv
    $ tracd -d -s --port 8000 --auth trac,/home/neo/trac/conf/passwd.digest,localhost /home/neo/trac
    					

1.1.3. MySQL

mysql>GRANT ALL PRIVILEGES ON *.* TO trac@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
mysql>CREATE DATABASE IF NOT EXISTS trac default charset utf8 COLLATE utf8_general_ci;
			
Database connection string [sqlite:db/trac.db]> mysql://trac:password@localhost:3306/trac
			

1.2. trac.ini

1.2.1. repository

[trac]
repository_dir = /opt/svnroot/neo
repository_sync_per_request = (default)
repository_type = svn
			

svn 倉庫地址 repository_dir

1.2.2. attachment 附件配置

上傳附件尺寸控制

[attachment]
max_size=262144
			

1.3. trac-admin

權限組定製

trac-admin /opt/trac permission add admin TRAC_ADMIN
trac-admin /opt/trac permission add Development TICKET_ADMIN
trac-admin /opt/trac permission add Operations TICKET_ADMIN
		

權限初始化

trac-admin /opt/trac permission add mgmt admin
trac-admin /opt/trac permission add neo Development
trac-admin /opt/trac permission add ken Operations

trac-admin /opt/trac permission list
		

		

1.3.1. adduser script

			
#!/bin/bash

user=$1
trac-admin /opt/trac permission add $user Operations
htdigest -c /opt/trac/conf/passwd.digest localhost $user
			
			
comments powered by Disqus