Creating a Trac Project Environment: Difference between revisions

From Littledamien Wiki
Jump to navigation Jump to search
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 4: Line 4:
==Prerequisites==
==Prerequisites==


* Python
See [[Trac Installation on Windows Server 2008]]
** The Windows installation of Python doesn't update the "path" environment variable. It's necessary to do that manually to include the path to the python executable.
** Same is true for Trac. By default the trac libraries are installed in <code>[PYTHON_INSTALL_DIR]\Lib\site-packages\</code>. The <code>trac-admin</code> executable is located in <code>c:\python27\scripts\</code> (where <code>c:\phython27\</code> is the installation directory for Python).
* Python [http://pypi.python.org/pypi/setuptools#files setuptools]
* [http://genshi.edgewall.org/wiki/Download Genshi]
* And of course, Trac. Which for now requires Python 2.7 (even though Python 3.x exists).<br />It looks like it's possible to run multiple python environments?


==Creating a project environment==
==Resources==
* [http://trac.edgewall.org/wiki/TracInstall#CreatingaProjectEnvironment TracInstall: Create a Project Environment]
* [http://littled.dbarchowsky.com/trac/wiki/TracGuide The Trac User and Administration Guide]


* See [http://trac.edgewall.org/wiki/TracInstall#CreatingaProjectEnvironment TracInstall: Create a Project Environment]
== Creating a project environment ==


==Database==
Using PowerShell as Administrator:


* Create a new SQLite database.
<syntaxhighlight lang="dos">
trac-admin /path/to/tracdir initenv
</syntaxhighlight>
 
Then trac will prompt for settings:
* Project name: littledamien
* Database connection string: sqlite:db/trac-littledamien.db
 
The configuration file for the new project environment is located at <code>[TRAC_PROJECT_DIR]\conf\trac.ini</code>.
 
==Trac web server==
 
Start the server with
<syntaxhighlight lang="dos">
tracd --port 8000 /path/to/tracdir
</syntaxhighlight>
 
Then you can connect to the trac project with <code><nowiki>http://localhost:8000/trac/</nowiki></code>.
 
See also [[Trac_Installation_on_Windows_Server_2008#Install_Trac_as_a_Windows_service|Installing Trac as a Windows Service]]
 
==Enabling the Admin tab in the Trac web interface==
 
<syntaxhighlight lang="dos">
trac-admin /path/to/my/project permission add <username> TRAC_ADMIN
</syntaxhighlight>
 
==Git support==
 
Git support is built into Trac 1.0. It has to be enabled in the trac.ini file:
<pre>
[components]
tracopt.versioncontrol.git.* = enabled
 
[git]
git_bin = c:\git\bin\git.exe
</pre>
Then Admin tab > Administration menu > Version Control > Repositories > Add Repository
 
* [http://trac.edgewall.org/wiki/0.12/TracRepositoryAdmin Trac Repository Administration]
* [http://trac.edgewall.org/wiki/TracGit Trac Git]
 
==<strike>Database</strike>==
 
* <strike>Create a new SQLite database.</strike>


<syntaxhighlight lang="dos">
<syntaxhighlight lang="dos">

Latest revision as of 17:44, 16 August 2013

Overview[edit]

How to set up a new Trac project environment on Windows using a SQLite database.

Prerequisites[edit]

See Trac Installation on Windows Server 2008

Resources[edit]

Creating a project environment[edit]

Using PowerShell as Administrator:

trac-admin /path/to/tracdir initenv

Then trac will prompt for settings:

  • Project name: littledamien
  • Database connection string: sqlite:db/trac-littledamien.db

The configuration file for the new project environment is located at [TRAC_PROJECT_DIR]\conf\trac.ini.

Trac web server[edit]

Start the server with

tracd --port 8000 /path/to/tracdir

Then you can connect to the trac project with http://localhost:8000/trac/.

See also Installing Trac as a Windows Service

Enabling the Admin tab in the Trac web interface[edit]

trac-admin /path/to/my/project permission add <username> TRAC_ADMIN

Git support[edit]

Git support is built into Trac 1.0. It has to be enabled in the trac.ini file:

[components]
tracopt.versioncontrol.git.* = enabled

[git]
git_bin = c:\git\bin\git.exe

Then Admin tab > Administration menu > Version Control > Repositories > Add Repository

Database[edit]

  • Create a new SQLite database.
sqlite3 /develop/trac-projectname.db