| 1 | = Trac on Windows = |
| 2 | |
| 3 | == Python == |
| 4 | |
| 5 | Trac is written in [http://python.org Python], so you will first need to install it. |
| 6 | |
| 7 | The recommended version of Python at this time is 2.4.3. Many of Trac's dependencies are not available on Windows for Python 2.5, so that version is not recommended. |
| 8 | |
| 9 | Download an run the Python MSI installer: |
| 10 | [http://www.python.org/ftp/python/2.4.3/python-2.4.3.msi python-2.4.3.msi] |
| 11 | |
| 12 | == Setuptools == |
| 13 | |
| 14 | [http://peak.telecommunity.com/DevCenter/setuptools Setuptools] makes installation of Python software easier by automatically downloading and installing Python packages from the internet. It is also used to find and load [wiki:TracPlugins Trac's plugins]. |
| 15 | |
| 16 | Download the setuptools installer: [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] |
| 17 | |
| 18 | When the download completes double-click the "ez_setup.py" file from your download folder to install setuptools. |
| 19 | |
| 20 | == The command line == |
| 21 | |
| 22 | You'll need to open a command line to install some of the necessary software. |
| 23 | |
| 24 | 1. Click "Start" > "Run..." (or press Win+R) |
| 25 | 1. Type "cmd" and click "Ok" |
| 26 | 1. Type "cd \Python24\Scripts" |
| 27 | |
| 28 | You should now be in the folder "C:\Python24\Scripts" where you can run the "easy_install" command to install the required software. |
| 29 | |
| 30 | Install the [http://www.clearsilver.net/ ClearSilver] template language: |
| 31 | {{{ |
| 32 | easy_install -f http://clearsilver.net/downloads clearsilver==0.9.14 |
| 33 | }}} |
| 34 | |
| 35 | Install the [http://pysqlite.org PySqlite] database driver: |
| 36 | {{{ |
| 37 | easy_install pysqlite |
| 38 | }}} |
| 39 | |
| 40 | ''TODO: setting up for PostgreSQL or MySQL'' |
| 41 | |
| 42 | == Subversion == |
| 43 | |
| 44 | '''This is optional.''' |
| 45 | |
| 46 | Trac can integrate with the [http://subversion.tigris.org Subversion] version control software. Follow these steps if you'd like to user Trac with Subversion. You can learn more about how they can integrate on TracSubversion. |
| 47 | |
| 48 | This document covers using the Subversion command line tools, but you can also use the [http://tortoisesvn.net/ TortoiseSVN] Windows GUI. |
| 49 | |
| 50 | Download and run the installer for the Subversion command line tools: |
| 51 | [http://subversion.tigris.org/files/documents/15/34093/svn-1.4.0-setup.exe svn-1.4.0-setup.exe] |
| 52 | |
| 53 | Go back to your command line to install the Subversion Python library: |
| 54 | {{{ |
| 55 | easy_install -Z http://subversion.tigris.org/downloads/svn-python-1.4.0-py2.4.exe |
| 56 | }}} |
| 57 | |
| 58 | '''Note:''' the "-Z" option is necessary when installing Subversion so that it is "unzipped". Trac will not be able to access Subversion if it is zipped. |
| 59 | |
| 60 | == Download Trac == |
| 61 | |
| 62 | Download and run the Trac Windows installer: |
| 63 | [http://ftp.edgewall.com/pub/trac/trac-0.10b1.win32.exe trac-0.10b1.win32.exe] |
| 64 | |
| 65 | == Getting Started == |
| 66 | |
| 67 | Ok, now that Trac and all its requirements have been installed you can create your first project and try it out. |
| 68 | |
| 69 | This example will create the projects in "C:\Projects". This is a good default location, but you can put them in another drive or folder if you prefer. |
| 70 | |
| 71 | Back to the command line: |
| 72 | {{{ |
| 73 | cd \ |
| 74 | mkdir Projects |
| 75 | cd Projects |
| 76 | }}} |
| 77 | |
| 78 | '''Optional:''' if you're using Trac with Subversion you can create a new repository for your source code: |
| 79 | {{{ |
| 80 | mkdir svn |
| 81 | svnadmin create svn\my-project |
| 82 | }}} |
| 83 | |
| 84 | Initialize a new Trac project environment: |
| 85 | {{{ |
| 86 | mkdir trac |
| 87 | \Python24\python.exe \Python24\Scripts\trac-admin trac\my-project initenv |
| 88 | }}} |
| 89 | |
| 90 | Follow the interactive prompts to input information about your project. If you are unsure what to put you can simply press "Enter" to accept the default value. |
| 91 | |
| 92 | '''Subversion users:''' when asked for the "Path to repository" input the folder of the repository you just created: |
| 93 | {{{ |
| 94 | Path to repository [/path/to/repos]> c:/Projects/svn/my-project |
| 95 | }}} |
| 96 | |
| 97 | == Try it out == |
| 98 | |
| 99 | Trac includes a standalone webserver called [wiki:TracStandalone tracd]. You can also use Trac with other webservers, but you should first try tracd to make sure everything's set up and working correctly: |
| 100 | |
| 101 | You should still be in the "C:\Projects" folder on the command line: |
| 102 | {{{ |
| 103 | \Python24\python.exe \Python24\Scripts\tracd -p8000 trac\my-project |
| 104 | }}} |
| 105 | |
| 106 | Open your browser to http://localhost:8000 to test out your new Trac project. |
| 107 | |
| 108 | Press Ctrl+Break to stop tracd |
| 109 | |
| 110 | == Troubleshooting == |
| 111 | |
| 112 | === Unsupported version control system "svn" === |
| 113 | |
| 114 | The Subversion library is not installed properly. Be sure you used the "-Z" option with easy_install when installing Subversion. ''TODO: link back to that step'' |
| 115 | |
| 116 | == What's next? == |
| 117 | |
| 118 | ''TODO: intro to advanced setup options'' |