博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
1.3. Project Environment
阅读量:6916 次
发布时间:2019-06-27

本文共 15136 字,大约阅读时间需要 50 分钟。

1.3.1. Sqlite

  1. Creating a Project Environment

    $ trac-admin /home/netkiller/projectenv initenvCreating a new Trac environment at /home/netkiller/projectenvTrac will first ask a few questions about your environmentin 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 => WikiRestructuredTextLinksWarning: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.iniIf 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/projectenvThen point your browser to http://localhost:8000/projectenv.There you can also browse the documentation for your installedversion of Trac, including information on further setup (such asdeploying Trac to a real web server).The latest documentation can also always be found on the projectwebsite:  http://trac.edgewall.org/Congratulations!
  2. Running the Standalone Server

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

    http://192.168.1.7:8000/projectenv/

  4. auth

    sudo apt-get install apache2-utils$ htdigest -c /home/neo/trac/conf/passwd.digest localhost neoAdding password for neo in realm localhost.New password:Re-type new password:$ htdigest /home/neo/trac/conf/passwd.digest localhost nchenAdding user nchen in realm localhostNew 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 listUser           Action------------------------------admin          TRAC_ADMINanonymous      BROWSER_VIEWanonymous      CHANGESET_VIEWanonymous      FILE_VIEWanonymous      LOG_VIEWanonymous      MILESTONE_VIEWanonymous      REPORT_SQL_VIEWanonymous      REPORT_VIEWanonymous      ROADMAP_VIEWanonymous      SEARCH_VIEWanonymous      TICKET_VIEWanonymous      TIMELINE_VIEWanonymous      WIKI_VIEWauthenticated  TICKET_CREATEauthenticated  TICKET_MODIFYauthenticated  WIKI_CREATEauthenticated  WIKI_MODIFYdeveloper      TICKET_ADMINnchen          developerneo            developernetkiller      admin
  5. 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.3.2. MySQL

GRANT ALL PRIVILEGES ON trac.* TO trac@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;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

下面开始创建项目

# trac-admin /home/git/trac initenvCreating a new Trac environment at /home/git/tracTrac will first ask a few questions about your environmentin order to initialize 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]> mysql://trac:trac@localhost:3306/tracCreating and Initializing Project Installing default wiki pages  TracRepositoryAdmin imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracRepositoryAdmin  TracNavigation imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracNavigation  TracUpgrade imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracUpgrade  TracRevisionLog imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracRevisionLog  TracTickets imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracTickets  TracIni imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracIni  PageTemplates imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/PageTemplates  TracTimeline imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracTimeline  TracAccessibility imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracAccessibility  WikiHtml imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiHtml  SandBox imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/SandBox  TracImport imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracImport  TracPlugins imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracPlugins  TracRoadmap imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracRoadmap  TracAdmin imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracAdmin  TracBatchModify imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracBatchModify  TracBrowser imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracBrowser  InterWiki imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/InterWiki  WikiRestructuredText imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiRestructuredText  WikiProcessors imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiProcessors  WikiNewPage imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiNewPage  TracEnvironment imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracEnvironment  TracLogging imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracLogging  TracSupport imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracSupport  TracNotification imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracNotification  TracGuide imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracGuide  WikiStart imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiStart  TracWorkflow imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracWorkflow  TracRss imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracRss  TracLinks imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracLinks  InterMapTxt imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/InterMapTxt  WikiPageNames imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiPageNames  WikiFormatting imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiFormatting  WikiRestructuredTextLinks imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiRestructuredTextLinks  TracUnicode imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracUnicode  TracChangeset imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracChangeset  TitleIndex imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TitleIndex  WikiDeletePage imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiDeletePage  TracReports imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracReports  TracWiki imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracWiki  RecentChanges imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/RecentChanges  TracBackup imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracBackup  TracModPython imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracModPython  TracSearch imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracSearch  TracModWSGI imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracModWSGI  TracTicketsCustomFields imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracTicketsCustomFields  TracQuery imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracQuery  TracStandalone imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracStandalone  InterTrac imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/InterTrac  TracFineGrainedPermissions imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracFineGrainedPermissions  TracInterfaceCustomization imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracInterfaceCustomization  TracCgi imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracCgi  TracFastCgi imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracFastCgi  TracPermissions imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracPermissions  TracInstall imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracInstall  TracSyntaxColoring imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/TracSyntaxColoring  CamelCase imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/CamelCase  WikiMacros imported from /root/.python-eggs/Trac-1.1.1-py2.6.egg-tmp/trac/wiki/default-pages/WikiMacros---------------------------------------------------------------------Project environment for 'My Project' created.You may now configure the environment by editing the file:  /home/git/trac/conf/trac.iniIf 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/git/tracThen point your browser to http://localhost:8000/trac.There you can also browse the documentation for your installedversion of Trac, including information on further setup (such asdeploying Trac to a real web server).The latest documentation can also always be found on the projectwebsite:  http://trac.edgewall.org/Congratulations!

1.3.3. Plugin

1.3.3.1. AccountManagerPlugin

http://trac-hacks.org/wiki/AccountManagerPlugin

cd accountmanagerplugin/python setup.py installpython setup.py bdist_eggcp dist/TracAccountManager-0.4.4-py2.6.egg /home/git/trac/plugins/
1.3.3.2. Subtickets

http://trac-hacks.org/wiki/SubticketsPlugin

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章
数据结构之树、森林和二叉树的转换
查看>>
svn服务器配置以及自动同步到web服务器
查看>>
【VS2013】设定Nuget代理
查看>>
1211Bug with integer literals in PLSQL
查看>>
Linux 权限管理之目录权限限制
查看>>
再谈矩阵分解在推荐系统中的应用
查看>>
ABAP 面试问题及答案(一):数据库更新及更改 SAP Standard (转)
查看>>
Top 10 JavaScript编辑器,你在用哪个?
查看>>
数据访问层的优化思路
查看>>
饭后最该知道N件事
查看>>
MaxCompute Studio 2.8.1 新版本发布啦!
查看>>
《区块链原理、设计与应用》一2.5 认识上的误区
查看>>
当所有编程语言都在靠齐的时候
查看>>
苹果拥抱IBM背后:大数据推动手机行业洗牌
查看>>
无线广播可以毁灭物联网安全:信号干扰器及犯罪
查看>>
《并行计算的编程模型》一3.7.1 选择集合参与者
查看>>
百分点:利用大数据做智慧商业
查看>>
让你的软件永生的7个规则
查看>>
浅析自动化设备安装运维的发展方向
查看>>
2015年Facebook广告变现规模达10亿美金
查看>>