= Advanced options for Installing Trac on Windows = [[PageOutline(2-4,Overview,inline)]] == Optional Packages == In addition to the base packages listed in TracOnWindows, here are a few additional packages (Python or external tools) that can be used to improve the functionality offered on your Trac installation: `easy_install`able packages: - docutils - pygments - pytz == Using Other Databases == === PostgreSQL for Windows === Trac can work with the PostgreSQL (8.x or 9.x) database: - Install [http://stickpeople.com/projects/python/win-psycopg/ psycopg2] - Create your database with UTF8 Encoding or you could get errors; see TracEnvironment for more. === mySQLDb for Windows === The recommended package for the MySqlDb Python bindings for the MySQL database is: || [http://mysql-python.sourceforge.net/ MySQL for Python] || [http://servut.us/akx/2010/09/mysqldb-windows-binaries-python-26-27/ non]-[http://www.codegood.com/archives/129 official] downloads || Please note that working with MySQL is ''not'' recommended in general, as there are still a lot of rough edges. However, on Windows the main issues we have with MySQL tend to be less apparent: the default setup for recent installations is UTF8, Windows users are unlikely to have case-sensitivity pathname issues in their repositories (as Subversion won't let them create such paths in the first place), etc. So MySQL on Windows might well be a more viable solution than on Unix, for the time being (and seems to work fine for me). See the MySqlDb page for more details. TODO: try out the [http://packages.python.org/oursql/ OurSQL] bindings. == Using Other Web front-end == TracStandalone is not the only option on Windows. === Apache Note that generic instructions for configuring authentication within Apache are available in the [[TracModWSGI#ConfiguringAuthentication]] page. ==== Apache and `mod_wsgi` ==== First, you need to integrate [http://code.google.com/p/modwsgi mod_wsgi] in your Apache installation. There are [http://code.google.com/p/modwsgi/wiki/DownloadTheSoftware#Windows_Binary_Downloads pre-compiled binaries] available for download. Choose the right one depending on the version of Apache and Python you're running. Then follow the [http://code.google.com/p/modwsgi/wiki/InstallationOnWindows installation instructions] for this module, and the [[TracModWSGI]] installations instructions. The resulting configuration (from the words of the `mod_wsgi` author) is supposed to be more efficient than one using `mod_python`. Adjustments to the paths included in the `.wsgi` script must also be made. The Trac Environment must point to the same path as was specified with `Trac-admin path/to/env initenv`. The Python Egg cache directory on Windows: - If run under the user's session, the Python Egg cache can be found in `%AppData%\Roaming`, for example: {{{#!python os.environ['TRAC_ENV'] = r'C:\TracEnvironment' os.environ['PYTHON_EGG_CACHE'] = r'C:\Users\Administrator\AppData\Roaming\Python-Eggs' }}} - If run under a Window service, you should create a directory for Python Egg cache. {{{#!python os.environ['TRAC_ENV'] = r'C:\TracEnvironment' os.environ['PYTHON_EGG_CACHE'] = r'C:\Trac-Python-Eggs' }}} ==== Apache and `mod_python` ==== **Note: ** `mod_python` is no longer developed. You may try to use its last version, 3.3.1: - [http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.4-Apache2.0.exe mod_python-3.3.1.win32-py2.4-Apache2.0.exe] - [http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.4-Apache2.2.exe mod_python-3.3.1.win32-py2.4-Apache2.2.exe] - [http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.5-Apache2.0.exe mod_python-3.3.1.win32-py2.5-Apache2.0.exe] - [http://www.apache.org/dist/httpd/modpython/win/3.3.1/mod_python-3.3.1.win32-py2.5-Apache2.2.exe mod_python-3.3.1.win32-py2.5-Apache2.2.exe] ''TODO: check the compatibility between Apache 2.0/2.2 and the Subversion bindings. The latter are using libapr and libaprutil 0.9.12.'' Then, check the regular TracModPython instructions to see how you have to modify your http.conf. ==== Authenticating Trac users against MS Windows domain controller ==== Running Trac in Apache, you can let your users login with their existing Windows username/password by using `mod_sspi`. (If you use Subversion as a repository and access it through Apache, you can also do the same with Subversion). Download this module [http://sourceforge.net/projects/mod-auth-sspi here], place it in the Apache modules directory, and add the following line to your `httpd.conf`, with all the `LoadModule` instructions: {{{ LoadModule sspi_auth_module modules/mod_auth_sspi.so }}} Then add the following to the end of `http.conf`, modified according to your settings: {{{ AuthType SSPI AuthName "Trac project management website @ MyLocalMachine" SSPIAuth On SSPIAuthoritative On SSPIDomain MyLocalDomain SSPIOfferBasic On Require valid-user }}} Then, if you change permissions in Trac using `trac-admin.exe`, remember to declare the user `bob` as `MyLocalDomain\bob` (The same remark applies for your Subversion repository accessfile). Alternatively add the parameter `SSPIOmitDomain On` and declare the user as `bob`. === Internet Information Services (IIS) === It is also possible to install [wiki:"TracOnWindowsIis6" Trac with IIS 6], though your mileage may vary. By following the above, Trac will be installed as a CGI, so that will be quite slow. You might be better off following TracOnWindowsIisAjp, which looks more promising. There is also TracOnWindowsIisIsapi. With IIS 8+ it should be possible to use [http://www.hanselman.com/blog/AnnouncingRunningRubyOnRailsOnIIS8OrAnythingElseReallyWithTheNewHttpPlatformHandler.aspx HttpPlatformHandler] as a proxy to Tracd. '''Note:''' If you are having problems with IE not being able to submit data to Trac (i.e. when you edit a wiki page or submit a ticket Trac doesn't modify the page or add the bug). wiki:Trac0.9/TracOnWindows has more information on this issue.