Here is the trac config handler on mod_python.conf I use for trac mybiz3web development project :
<Location /mybiz3web>
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/www/html/mybiz3web
PythonOption TracUriRoot /mybiz3web
</Location>
Add them to /etc/httpd/modules.d/16_mod_python.conf as a handler to apache web server.
And I use this config to authenticate user via htpasswd password file :
<LocationMatch /mybiz3web/login>
AuthType Basic
AuthName “Trac Development MyBiz3Web”
AuthUserFile /etc/trac/trac.htpasswd
Require valid-user
</LocationMatch>
Put them also at /etc/httpd/modules.d/16_mod_python.conf as a LocationMatch directive for apache when user want to login to trac. As you may see the password file at /etc/trac/trac.htpasswd. Create them or add user with htpasswd command.
To add a new project for trac, simply follow like this :
#trac-admin [project name] initenv
Creating a new Trac environment at /var/www/html/electra
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]> electra
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]>
Creating and Initializing Project
Installing default wiki pages
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracSupport imported from TracSupport
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TitleIndex imported from TitleIndex
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiDeletePage imported from WikiDeletePage
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracFineGrainedPermissions imported from TracFineGrainedPermissions
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiHtml imported from WikiHtml
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/PageTemplates imported from PageTemplates
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracUnicode imported from TracUnicode
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracQuery imported from TracQuery
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracSyntaxColoring imported from TracSyntaxColoring
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracGuide imported from TracGuide
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiRestructuredText imported from WikiRestructuredText
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiFormatting imported from WikiFormatting
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/InterTrac imported from InterTrac
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracTimeline imported from TracTimeline
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracIni imported from TracIni
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracPlugins imported from TracPlugins
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracRss imported from TracRss
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracModPython imported from TracModPython
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiStart imported from WikiStart
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracUpgrade imported from TracUpgrade
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracRoadmap imported from TracRoadmap
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracWorkflow imported from TracWorkflow
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracBrowser imported from TracBrowser
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracPermissions imported from TracPermissions
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracReports imported from TracReports
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiRestructuredTextLinks imported from WikiRestructuredTextLinks
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracNavigation imported from TracNavigation
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracAdmin imported from TracAdmin
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracNotification imported from TracNotification
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracStandalone imported from TracStandalone
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracLinks imported from TracLinks
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracInstall imported from TracInstall
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracWikiMacros imported from TracWikiMacros
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/InterMapTxt imported from InterMapTxt
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracRevisionLog imported from TracRevisionLog
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracTicketsCustomFields imported from TracTicketsCustomFields
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracWiki imported from TracWiki
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracAccessibility imported from TracAccessibility
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracCgi imported from TracCgi
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/CamelCase imported from CamelCase
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/InterWiki imported from InterWiki
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/RecentChanges imported from RecentChanges
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/SandBox imported from SandBox
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracLogging imported from TracLogging
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiProcessors imported from WikiProcessors
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracEnvironment imported from TracEnvironment
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiNewPage imported from WikiNewPage
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracTickets imported from TracTickets
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracFastCgi imported from TracFastCgi
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracChangeset imported from TracChangeset
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracBackup imported from TracBackup
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracSearch imported from TracSearch
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracImport imported from TracImport
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/TracInterfaceCustomization imported from TracInterfaceCustomization
/usr/lib/python2.4/site-packages/Trac-0.11b2-py2.4.egg/trac/wiki/default-pages/WikiPageNames imported from WikiPageNames———————————————————————
Project environment for ‘electra’ created.You may now configure the environment by editing the file:
/var/www/html/electra/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 /var/www/html/electra
Then point your browser to http://localhost:8000/electra.
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:Congratulations!
Use default setting for svn and database name
And add an admin user using this :
trac-admin /var/www/html/mybiz3web permission add jfdesign TRAC_ADMIN
Some extra setting you may configure like site logo, can be achieved by adding a corresponding png file on the root of the project web root and set the config of trac.ini under conf folder with this :
[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true[header_logo]
alt = MyBiz3Web Project
height = 75
link = http://repo.kreators.com/mybiz3web
src = http://10.10.13.7/mybiz3web.png
width = 298[inherit]
plugins_dir =
templates_dir =
Some precaution must be