= Trac Standalone Server On Windows = ''This Windows specific guide is heavily based on the generic TracInstall guide with bits and pieces borrowed from TracOnWindows'' The goal of this guide is to get Windows users up and running as quickly as possible with the minimal amount of fuss. So if you just want to set up Trac on a Windows machine to play around with the features in Trac use this setup. This setup uses the ''tracd'' stand alone server and does not require installation and configuration of a separate webserver like Apache. To read about the pro's and con's of a ''tracd'' based install compared to other options see the generic TracStandalone page. That page also contains some additional tips for a Windows setup. For a more verbose guide including more options and possible hints if you run into problems see TracOnWindows This short guide takes you through these steps: 1. Downloading other required binary packages and Trac itself 1. Installing everything 2. Creating a Project Environment 3. Running ''tracd'' the Standalone Server 4. Using Trac (and Subversion) == Downloading Requirements == '''Warning: those instructions were written for Trac 0.9b1''' To install Trac, the following software packages must be installed: * [http://www.python.org/download/releases/2.6.3/ Python], version 2.6. * [http://www.open.collab.net/downloads/subversion.html Subversion and its Python bindings] (see also TracSubversion#Windowsx86) * [http://projects.edgewall.com/trac/wiki/TracDownload Trac], version 0.11.5 == Installing Everything == 1. Install Subversion Check that C:\your_install_path\Subversion\bin is in your PATH environment variable because this directory contains library files needed by the python subversion bindings. 2. Install Python Add C:\Python23 to the PATH environment variable ''(or you will have to supply the path on every call to python in the sections below)'' 3. Install everything else by following the steps in the TracOnWindows#InstallTracPrerequisites section. == Creating a Project Environment == A [wiki:TracEnvironment Trac environment] is the backend storage where Trac stores information like wiki pages, tickets, reports, settings, etc. An environment is basically a directory that contains a human-readable configuration file and various other files and directories. A new environment is created using [wiki:TracAdmin trac-admin]: {{{ C:\> svnadmin create C:\path\to\svn_project C:\Python23\Scripts> python trac-admin C:\path\to\trac_env initenv }}} [wiki:TracAdmin trac-admin] will prompt you for the information it needs to create the environment, such as the name of the project, the database connection string, and so on. == Running the Standalone Server == After having created a Trac environment, you can easily try the web interface by running the standalone server [wiki:TracStandalone tracd]: {{{ C:\Python23\Scripts> python tracd --port 8000 C:\path\to\trac_env }}} Then, fire up a browser and visit `http://localhost:8000/`. You should get a simple listing of all environments that tracd knows about. Follow the link to the environment you just created, and you should see Trac in action. == Running Tracd as service == ''Instructions also valid for 0.11 (see #7496)'' * download the Windows Server 2003 Resource Kit at [http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en Microsoft] * run "!InstSrv c:\path\to\resourcekit\!SrvAny.exe", where you insert your own service name (without angle brackets, e.g. tracd) and the full path to the !SrvAny.exe. * open HKEY_LOCAL_MACHINE\SYSTEM\!CurrentControlSet\Services\ in !RegEdit * create subkey *Parameters*, below which you will create 2 string values: * create string value *Application* with the full path to '''python.exe''' * create string value *!AppParameters* with the set of desired tracd parameters, e.g. "c:\Python25\Scripts\'''tracd-script.py''' --port 8080 c:\path\to\trac" (without the quotes) * open the Services tool (somewhere in the administrative tools in the Windows control panel) and start your service (tested with trac 0.11.2 on Windows XP) You can also use [http://forums.firedaemon.com/showthread.php?t=12 FireDaemon lite]. No need to open the registry, FireDaemon GUI allows you to add parameters to your service command line. (tested with trac 0.11.2 on Windows Vista) ''Instructions for Windows 7'' * Download `instsrv.exe` and `srvany.exe` from Microsoft * drive:\path\to\!InstSrv.exe tracd drive:\path\to\!SrvAny.exe * open HKEY_LOCAL_MACHINE\SYSTEM\!CurrentControlSet\Services\tracd in !RegEdit * create subkey *Parameters*, below which you will create 2 string values: * create string value *Application* - drive:\path\to\tracd.exe * create string value *!AppParameters* with the set of desired tracd parameters, e.g. "--port 8080 --auth=proj_name,drive:\path\to\proj\digest.txt,trac drive:\path\to\proj\" (without the quotes) * Run net start tracd ''Instructions for Windows 2008, using nssm (should work with other Windows versions)'' * download and extract nssm from http://iain.cx/src/nssm/ * run 'nssm install tracd' * enter complete path to python.exe in Application field (e.g. 'c:\Python26\python.exe') * enter parameters in Options field (e.g. 'c:\Python26\Scripts\tracd-script.py --port 8000 --basic-auth "*,c:\trac\.htpasswd,test " c:\trac\test') * run 'net start tracd' == Using Trac (and Subversion) == Once you have your Trac site up and running, you should be able to browse your subversion repository, create tickets, view the timeline, etc. Keep in mind that anonymous (not logged in) users can by default access most but not all of the features. You will need to configure authentication and grant additional [wiki:TracPermissions permissions] to authenticated users to see the full set of features. ''Enjoy!'' ---- See also: TracGuide, TracStandalone, TracUpgrade, TracPermissions, TracOnWindows, [http://how-to-solutions.com/how-to-install-trac-on-windows.html Installing Trac on Windows]