TracOnWindows - Prelude Hybrid IDS - Trac

来源:百度文库 编辑:神马文学网 时间:2024/04/25 08:50:59
Windows Installation instructions for SVN w/TRAC ?/A>Versions used in this example (Available 2004-05-13): Apache 2.0.49 Python 2.3.3 SVN 1.0.2 SQLite 2.8.13 PySQLite 0.5.0-py2.3 Trac 0.6.1 Email Daragh Fitzpatrick for more info, or if you changed this page (since this Wiki does not support watch/subscription) Note: This example installs to D: Arm Yourself ?/A>1. Get & Read book http://svnbook.red-bean.com Install SubVersioN Pre-Requisites ?/A>2. Install Python http://www.python.org Add D:\Python to path 3. Install Apache http://httpd.apache.org 4. Install Subversion http://subversion.tigris.org Create Repository ?/A>5. Create Repository Directory D:\> md d:\svn6. Create Repository D:\> svnadmin create d:\svn\repo17. Create skeleton repository structure in d:\temp\project Example: /project /vendor /tags /trunk files /projectname /branches /tags /trunk files8. Build Repository Tree D:\> svn import d:\temp\project file:///d:/svn/repo1 -m "Initial Load"9. Create local sandbox D:\> svn checkout file:///d:/svn/repo1 d:\projectConfigure Apache ?/A>10. Copy files D:\> copy d:\progra~1\subver~1\httpd\*.* d:\progra~1\apache~1\apache2\modules11. Create password file (w/user ‘admin‘) D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -cm d:\svn\.htaccess admin12. Configure Apache (edit httpd.conf) 12.1. Restrict access/lockdown as appropriate 12.2. Add Modules to httpd.conf 12.1.1. Uncomment: LoadModule dav_module modules/mod_dav.so12.1.2. Add (after): # SubversionLoadModule dav_svn_module modules/mod_dav_svn.so12.3. Add location root for multiple repositories # Subversion DAV svn # any /svn/foo URL will map to a repository D:/svn/foo SVNParentPath D:/svn AuthType Basic AuthName "Subversion repository" AuthUserFile d:/svn/.htaccess Require valid-user13. Restart your MACHINE 14. Test your install of Subversion http://[hostname]:80/svn/repo1 Phew! Subversion is installed and working - Grab a beverage for yourself. Setup Users ?/A>15. Add users to password file D:\> d:\progra~1\apache~1\apache2\bin\htpasswd -m d:\svn\.htaccess userInstall TRAC Prerequisites ?/A>16. Install Subversion Python Bindings (Get from same download page as Subversion) Copy libsvn and svn directories to D:\Python23\Lib 17. Install SQLite http://www.sqlite.org Copy sqlite.exe to D:\Program Files\SQLite 18. Install PySQLite http://pysqlite.sourceforge.net 19. Install TRAC http://www.edgewall.com/products/trac/ Fix a few things ?/A>20. (BUG) Edit first line of D:\Python23\Scripts\trac-admin to have: #!D:\Python23\python.exe21. (BUG) Edit first line of D:\Python23\share\trac\cgi-bin\trac.cgi to have: #!D:\Python23\python.exe22. Copy CGI D:\> copy d:\python23\share\trac\cgi-bin\trac.cgi d:\progra~1\apache~1\apache2\cgi-bin23. (BUG) not able to run trac-admin initenv... Not available in 0.6.1 Configure TRAC DB ?/A>24. Run trac-admin D:\Python23\Scripts> python trac-admin d:/svn/trac.db25. Initialize DB Trac [d:/svn/trac.db]> initdb Enter project name Project Enter path to repository d:\svn\repo1 Enter path to templates d:\Python23\share\trac\templates (BUG) Note error message regarding wiki-pages26. (BUG) Load Wiki Trac [d:/svn/trac.db]> wiki load d:/python23/share/trac/wiki-default27. Add administrative permissions Trac [d:/svn/trac.db]> permission add admin TICKET_ADMINTrac [d:/svn/trac.db]> permission add admin REPORT_CREATETrac [d:/svn/trac.db]> permission add admin REPORT_MODIFYTrac [d:/svn/trac.db]> permission add admin REPORT_DELETETrac [d:/svn/trac.db]> permission add admin REPORT_ADMINTrac [d:/svn/trac.db]> permission add admin WIKI_DELETETrac [d:/svn/trac.db]> permission add admin WIKI_ADMINTrac [d:/svn/trac.db]> permission add admin CONFIG_VIEWTrac [d:/svn/trac.db]> permission add admin TRAC_ADMINAdd TRAC to Apache ?/A>28. Edit httpd.conf: Add: (copy this - there‘s a typo in Edgewall‘s version) # TRACAlias /trac "D:/Python23/share/trac/htdocs" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all SetEnv TRAC_DB "d:/svn/trac.db" AuthType Basic AuthName "Project" AuthUserFile D:/svn/.htaccess Require valid-user29. Restart Apache 30. Hold your breath, test TRAC install http://[hostname]:80/cgi-bin/trac.cgi Finally?A class=anchor title="Link to this section" href="https://trac.prelude-ids.org/wiki/TracOnWindows#Finallyhellip"> ?/A>31. Install SVN Clients as necessary (try Rapid SVN & Tortoise SVN) 32. Don‘t forget to lock down the security on the box! 33. Now go get a *real* drink