= Trac On Windows = ''Last modified: 2009-11-09 17:05:28 GMT'' The following instructions use 32-bit software packages. The 64-bit software packages do not yet integrate seamlessly with each other, so are not recommended. [[PageOutline(2-3)]] == 1. Install Python == 1. Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python-2.6.4.msi] to your computer, and run it (double-click on ''python-2.6.4.msi'' in your download folder). 1. Click the '''__R__un''' button in the ''Open File - Security Warning'' dialogue box, if it appears. 1. Click the '''Next >''' button to ''Install for all users'' 1. Click the '''Next >''' button to use ''C:\Python26'' as the destination directory 1. Click the '''Next >''' button to install all of the Python components 1. Wait for the installation to complete, and then click the '''Finish''' button 1. Add the install directory (default is '''C:\Python26'''), and '''C:\Python26\Scripts''' directory to the windows '''%PATH%''' environment variable (dont worry if it doesn't exist now): a. Click the Windows '''Start''' button a. Right-click the '''My Computer''' icon a. Click the '''P__r__operties''' option at the bottom of the pop-up menu a. Click the '''Advanced''' tab a. Click the '''Enviro__n__ment Variables''' button a. Scroll down the ''__S__ystem variables'' listbox to the '''Path''' ''Variable'' a. Select the '''Path''' ''Variable'' and click the ''Ed__i__t'' button below it - DO NOT click on the edit button above a. Scroll to the right-hand end of the ''Variable __v__alue'' field, and type ''';C:\Python26;C:\Python26\Scripts''' a. Click the '''OK''' button in the ''Edit System Variable'' window a. Click the '''OK''' button in the ''Environment Variables'' window a. Click the '''OK''' button in the ''System Properties'' window == 2. Setuptools == 1. Download [http://peak.telecommunity.com/dist/ez_setup.py ez_setup.py] from [http://peak.telecommunity.com/DevCenter/setuptools PEAK] (Python Enterprise Application Kit) to your Python (default is '''C:\Python26''') directory. 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''cd C:\Python26''' and press the ''Return'' key 1. Type '''ez_setup.py''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared == 3. Subversion (optional) == Trac can integrate with [http://subversion.tigris.org Subversion] version control software. Read more about the integration between Trac and Subversion from the wiki: TracSubversion. === Subversion Server & Client === 1. Download [http://subversion.tigris.org/files/documents/15/46906/Setup-Subversion-1.6.6.msi Setup-Subversion-1.6.6.msi] (<- Broken URL) [http://www.collab.net/downloads/subversion/ CollabNet Subversion Edge 1.1 (for Windows 32 bit)] to your computer, and run it (double-click on ''CollabNetSubversionEdge-1.1.0_setup.exe'' in your download folder). 1. Click the '''__R__un''' button in the ''Open File - Security Warning'' dialogue box, if it appears. 1. Click the '''__N__ext''' button on the ''Welcome to the Subversion Setup Wizard'' screen 1. Click the '''__N__ext''' button on the ''Information'' screen 1. Click the '''__N__ext''' button to select ''Binding for Apache 2.0.x'' 1. Type '''C:\Subversion\''' in to the ''Install subversion to:'' field, and click the '''__N__ext''' button 1. Click the '''Finish''' button 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''cd C:\Subversion\bin''' and press the ''Return'' key 1. Type '''mkdir C:\svnrepositories''' and press the ''Return'' key 1. Type '''svnadmin create C:\svnrepositories\myproject''' and press the ''Return'' key 1. Type '''sc create svnserver binpath= "C:\Subversion\bin\svnserve.exe --service -r c:\svnrepositories" displayname= "Subversion Server (svnserver)" depend= Tcpip start= auto''' and press the ''Return'' key 1. Type '''net start svnserver''' and press the ''Return'' key === Subversion Bindings === 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''cd C:\Python26\Scripts''' and press the ''Return'' key 1. Type '''easy_install -Z !http://subversion.tigris.org/files/documents/15/46888/svn-python-1.6.6.win32-py2.6.exe''' (<- Broken URL) and press the ''Return'' key[[BR]]Verify no messages containing errors appeared == 4. mod_python (optional, and only available for Python v2.5 right now) == mod_python is needed if you want to use Apache HTTP server. 1. Download [http://apache.deathculture.net/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] to your computer from [http://httpd.apache.org/modules/python-download.cgi Apache], and run it (double-click on ''mod_python-3.3.1.win32-py2.5-Apache2.0.exe'' in your download folder). 1. Click the '''__R__un''' button in the ''Open File - Security Warning'' dialogue box, if it appears. 1. Click the '''__N__ext >''' button 1. Click the '''__N__ext >''' button to confirm the Python directory 1. Click the '''__N__ext >''' button to install 1. Select the directory where ''Apache'' is installed 1. Click the '''OK''' button 1. Click the '''Finish''' button == 5. Plug-ins (optional) == See TracPlugins for details about plugin installation. For example: to install the SpamFilter plugin 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''mkdir C:\src''' and press the ''Return'' key 1. Type '''cd C:\src''' and press the ''Return'' key 1. Type '''svn checkout !http://svn.edgewall.org/repos/trac/plugins/0.11/spam-filter''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared 1. Type '''cd spam-filter''' and press the ''Return'' key 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared == 6. Genshi == 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''mkdir C:\src''' and press the ''Return'' key 1. Type '''cd C:\src''' and press the ''Return'' key 1. Type '''svn checkout !http://svn.edgewall.org/repos/genshi/trunk genshi''' and press the ''Return'' key 1. Type '''cd genshi''' and press the ''Return'' key 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared == 7. Trac == 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Choose '''__ONE__''' of the following options: === Option 1 === 1. Type '''cd C:\Python26\Scripts''' and press the ''Return'' key 1. Type '''easy_install Trac''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared === Option 2 === 1. Type '''mkdir C:\src''' and press the ''Return'' key 1. Type '''cd C:\src''' and press the ''Return'' key 1. Type '''svn checkout !http://svn.edgewall.org/repos/trac/trunk trac''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared 1. Type '''cd trac''' and press the ''Return'' key 1. Type '''python setup.py install''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared === Configure Trac environment === 1. Type '''mkdir C:\trac''' and press the ''Return'' key 1. Type '''cd C:\Python26\Scripts''' and press the ''Return'' key 1. Type '''trac-admin \trac initenv''' and press the ''Return'' key 1. Type in your project name (keep it succinct) and press the ''Return'' key 1. Press the '''Return''' key to select the default ''Database connection string'' 1. Press the '''Return''' key to select ''svn'' as the default ''Repository type'' 1. Type in the full path of your repository; e.g. ''/svnrepositories/myproject'', and press the '''Return''' key 1. Verify the installation of Trac works: a. Type in '''tracd --port 8000 C:\trac''' to start the Trac daemon a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''!http://localhost:8000''' [[BR]]A browser window should open to a page with ''Available Projects'' a. Click on your project's name, and you should be taken to your project's Trac home page. == 8. Account Manager Plug-in == 1. Open a command window a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''cmd''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button[[BR]]A black window should appear 1. Type '''cd C:\Python26\Scripts''' and press the ''Return'' key 1. Type '''easy_install !http://trac-hacks.org/svn/accountmanagerplugin/trunk''' and press the ''Return'' key[[BR]]Verify no messages containing errors appeared 1. Type '''trac-admin C:\trac permission add anonymous TRAC_ADMIN''' and press the ''Return'' key 1. Click the Windows '''Start''' button 1. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear 1. Type '''notepad C:\trac\conf\trac.ini''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button 1. Copy the block of text below {{{ [components] acct_mgr.admin.accountmanageradminpage = enabled acct_mgr.api.accountmanager = enabled acct_mgr.db.sessionstore = enabled acct_mgr.htfile.htdigeststore = enabled acct_mgr.pwhash.htdigesthashmethod = enabled acct_mgr.web_ui.accountmodule = enabled acct_mgr.web_ui.loginmodule = enabled acct_mgr.web_ui.registrationmodule = enabled trac.web.auth.loginmodule = disabled }}} 1. Scroll down to the ''[header_logo]'' section, and place the cursor on the blank line above it 1. Paste the text you copied above in to the document 1. Save the file, and close notepad 1. Create an empty '''C:\trac\conf\passwords.txt''' a. Click the Windows '''Start''' button a. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear a. Type '''notepad C:\trac\conf\passwords.txt''' in to the ''__O__pen'' drop-down field, and click the '''OK''' button a. Save the file, and close notepad 1. Click the Windows '''Start''' button 1. Click '''__R__un'''[[BR]]A dialogue box titled ''Run'' should appear 1. Type '''!http://localhost:8000/trac/admin''' [[BR]]A browser window should open to an ''Administration'' page 1. Click the '''Configuration''' hyperlink under ''Accounts'' in the menu on the left-hand side of the page 1. Select '''1''' from the drop-down list-box next to the ''!HtDigestStore'' heading 1. Select '''1''' from the drop-down list-box next to the ''!SessionStore'' heading 1. Type '''C:\trac\conf\passwords.txt''' in to the ''filename:'' field in the ''!HtDigestStore'' section 1. Type '''trac''' in to the ''realm:'' field under the ''!HtDigestStore'' section 1. Click the '''Save''' button 1. Click the '''Users''' hyperlink under the ''Accounts'' section in the menu on the left-hand side of the page 1. Type a username in to the ''Username:'' field on the right-hand side of the page in the ''Add Account:'' section 1. Type a password in to the ''Password:'' field on the right-hand side of the page in the ''Add Account:'' section 1. Type the password in to the ''Confirm password:'' field on the right-hand side of the page in the ''Add Account:'' section 1. Type a name in to the ''Name:'' field on the right-hand side of the page in the ''Add Account:'' section 1. Type an e-mail address in to the ''Email:'' field on the right-hand side of the page in the ''Add Account:'' section 1. Click the '''Add''' button 1. Click the '''Permissions''' hyperlink under the ''General'' section in the menu on the left-hand side of the page 1. Type the username in to the ''Subject:'' field on the right-hand side of the page in the ''Grant Permissions:'' section (this will become your admin user) 1. Select '''TRAC_ADMIN''' from the ''Action:'' drop-down list-box 1. Click the '''Add''' button 1. Check '''TRAC_ADMIN''' in the ''Action'' section in the center of the page, for the '''anonymous''' ''Subject'' 1. Click the '''Remove selected items''' button (You will need to log in as your admin user to access the admin panels from this point forward) More information about the TracEnvironment setup, and the TracStandalone web front-end is available. ---- See also: TracOnWindows