Wiki take 2…trac

Let’s go back to SPM (Synaptic Package Manager) and search wiki.  Scrolling through the various listed packages we come across trac, which is described as an enhanced wiki and tracking system for software developers.  For my purposes this is perfect, so I select all of the trac packages to install and hit the apply button.  Now we have to learn how to configure and access trac.

tmike@tmike-HP-ENVY-m7-Notebook:~$ dpkg-query –list | grep trac
ii trac 1.0.9+dfsg-1 all Enhanced wiki and issue tracking system for software development projects
ii trac-announcer 0.12.1+r14934-2 all enhanced e-mail notification system for Trac
ii trac-codecomments 1.1.1+dfsg-1 all code comments and review plugin for Trac
ii trac-diavisview 0.1+r11124-2 all Renders dia and vdx files in Trac
ii trac-graphviz 0.7.5-1.1 all Graphs printing plugin for Trac
ii trac-includemacro 3.0.0~r12030-1 all Include external resources in a Trac wiki page
ii trac-ja-resource 1.0.ja1-0.1 all Japanese resources for trac
ii trac-jsgantt 0.9+r11145-1 all displays Trac tickets as a Gantt chart in a wiki page
ii trac-mastertickets 3.0.2+20111224-2 all adds inter-ticket dependencies to Trac
ii trac-odtexport 0.6.0+svn10787-2 all Export Trac wiki pages as OpenDocument (ODT) files
ii trac-privatewiki 1.0.0+r13400-1 all add private wiki ability to Trac
ii trac-subtickets 0.1.1+253f019-1 all sub-ticket feature for Trac tickets
ii trac-tags 0.7+svn12392-1 all Tagging plugin for Trac wiki and issue tracking system
ii trac-translatedpages 1.0~svn11919-2 all Show translated versions of wiki page in the Trac web application
ii trac-wikiprint 1.9.2-2 all Make Trac wiki pages printable, exporting to PDF or printable HTML
ii trac-wikitablemacro 0.7785-1.1 all Table from an arbitrary SQL for Trac
ii trac-wysiwyg 0.12.0.3+r10725-1 all WYSIWYG style editor for the Trac issue tracking system
ii trac-xmlrpc 1.1.2+r10706-1 all XML-RPC interface to the Trac wiki and issue tracking system

tmike@tmike-HP-ENVY-m7-Notebook:~$

Falling back on Dr. Google we get this nice hit:  https://trac.edgewall.org/wiki/TracInstall

Looking at the install page we have our work cut out for ourselves and we start by looking at the mandatory dependencies.  Python, setuptools and Genshi are all python packages and appear to be installed on my box correctly:

tmike@tmike-HP-ENVY-m7-Notebook:~$ python –version
Python 2.7.11+

tmike@tmike-HP-ENVY-m7-Notebook:~$ dpkg-query –list | grep setuptools
ii python-setuptools 20.7.0-1 all Python Distutils Enhancements

tmike@tmike-HP-ENVY-m7-Notebook:~$ dpkg-query –list | grep genshi
ii python-genshi 0.7-5 amd64 Python XML-based template engine – Python 2.x

The other mandatory dependency is a SQL database.  Perusing the documentation suggests that using SQLite is the path of least resistance.  In general when trying to come up to speed with new technology, follow the path of least resistance, at least until you have some mileage under your belt.  We will start with the basics and see how far we get.  We can skip the optional dependencies and plan on using the built-in web-server.

Using pip this command is suggested:

pip install trac mysql-python

And finally, after creating a configuration directory to use, this is the suggested command to create the trac environment:

tmike@tmike-HP-ENVY-m7-Notebook:/opt$ sudo trac-admin /opt/trac initenv

Creating a new Trac environment at /opt/trac

Trac will first ask a few questions about your environment
in 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]> Wiki-Tutorial

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 existing MySQL or
PostgreSQL database (check the Trac documentation for the exact
connection string syntax).

Database connection string [sqlite:db/trac.db]>

Creating and Initializing Project
Installing default wiki pages
TracInterfaceCustomization imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracInterfaceCustomization
InterWiki imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/InterWiki
TitleIndex imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TitleIndex
TicketQuery imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TicketQuery
WikiDeletePage imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiDeletePage
WikiNewPage imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiNewPage
TracBatchModify imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracBatchModify
InterTrac imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/InterTrac
TracInstall imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracInstall
TracBrowser imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracBrowser
WikiRestructuredTextLinks imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiRestructuredTextLinks
WikiPageNames imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiPageNames
TracIni imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracIni
TracLogging imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracLogging
TracFastCgi imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracFastCgi
TracUnicode imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracUnicode
TracImport imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracImport
TracStandalone imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracStandalone
TracBackup imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracBackup
InterMapTxt imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/InterMapTxt
TracTickets imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracTickets
TracModPython imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracModPython
TracPermissions imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracPermissions
TracAccessibility imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracAccessibility
TracSearch imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracSearch
WikiProcessors imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiProcessors
TracNavigation imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracNavigation
TracChangeset imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracChangeset
TracTimeline imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracTimeline
PageTemplates imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/PageTemplates
TracEnvironment imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracEnvironment
TracRoadmap imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracRoadmap
TracSyntaxColoring imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracSyntaxColoring
TracReports imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracReports
RecentChanges imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/RecentChanges
CamelCase imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/CamelCase
TracLinks imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracLinks
TracSupport imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracSupport
TracRepositoryAdmin imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracRepositoryAdmin
TracWiki imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracWiki
TracAdmin imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracAdmin
TracPlugins imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracPlugins
SandBox imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/SandBox
TracFineGrainedPermissions imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracFineGrainedPermissions
TracQuery imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracQuery
WikiHtml imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiHtml
WikiMacros imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiMacros
TracRevisionLog imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracRevisionLog
WikiFormatting imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiFormatting
TracTicketsCustomFields imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracTicketsCustomFields
WikiStart imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiStart
TracCgi imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracCgi
TracChangeLog imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracChangeLog
TracWorkflow imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracWorkflow
WikiRestructuredText imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/WikiRestructuredText
TracGuide imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracGuide
TracModWSGI imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracModWSGI
TracRss imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracRss
TracUpgrade imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracUpgrade
TracNotification imported from /usr/local/lib/python2.7/dist-packages/trac/wiki/default-pages/TracNotification

———————————————————————
Project environment for ‘Wiki-Tutorial’ created.

You may now configure the environment by editing the file:

/opt/trac/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 /opt/trac

Then point your browser to http://localhost:8000/trac.
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!

tmike@tmike-HP-ENVY-m7-Notebook:/opt$

 

The actual command to use for the standalone trac server, on Ubuntu 16.04 is:  sudo tracd –port=8000 /opt/trac

Within your browser hit this address:  http://localhost:8000/trac