Subversion + TRAC installation Configuration

Source: Internet
Author: User
Tags gz file subversion client tortoisesvn
Recently, I want to study the management of software development, and I want to configure a version management system on my computer. I have read some documents and found that the combination of subversion and TRAC is more appropriate. The Subversion is used for version management, TRAC also includes a wiki for Error Tracking. After hitting the wall for half a day, the system was barely running. Let's talk about the configuration process.

(1) Operating System
Windows Server 2003 R2 Enterprise
(2) software preparation
Apache 2.2.11
Http://labs.xiaonei.com/apache-mirror/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi
Python 5.3
Http://windows.php.net/downloads/releases/php-5.3.0-Win32-VC6-x86.zip
Subversion 1.6.3
Http://subversion.tigris.org/files/documents/15/46163/Setup-Subversion-1.6.3.msi
Tortoisesvn 1.6.3
Http://downloads.sourceforge.net/tortoisesvn/TortoiseSVN-1.6.3.16613-win32-svn-1.6.3.msi? Download
Python 2.6.2
Http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi
Svn-python-win32-1.6.3-py26
Http://subversion.tigris.org/files/documents/15/46152/svn-python-1.6.3.win32-py2.6.exe
TRAC 0.11.5
Http://ftp.edgewall.com/pub/trac/Trac-0.11.5.win32.exe
SQLite 3.6.16
Http://www.sqlite.org/sqlite-3_6_16.zip
Setuptools 0.6c9
Http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e
Genshi 0.5.1
Http://ftp.edgewall.com/pub/genshi/Genshi-0.5.1.win32-py2.6.exe
Pysqlite-2.5.5-py2.6
Http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.5/pysqlite-2.5.5.win32-py2.6.exe
Mod_wsgi-3.0c4
Http://modwsgi.googlecode.com/files/mod_wsgi-win32-ap22py26-3.0c4.so
It mainly requires a lot of things to configure TRAC. It looks annoying and the version must be correct. clearsilver is also required on its official website, but it does not support Python 2.6, so I will not install it, however, no problems have been found. Let's just mention Python 3. There aren't many things above that support it. Even TRAC itself says it needs to be less than 3.0.
Mod_wsgi is an Apache module used to run Python Program . The TRAC official website provides several options to use CGI, but the speed is slow. FastCGI does not support Python 2.6, while mod_python does not support 2.6. The beta version of mod_wsgi also supports Python 3, which is faster than CGI and mod_python.
(3) Software Configuration
1. install Apache first. Needless to say.
2. install PHP 5.3. The only difference from the previous version is that you do not need to copy libmysql. DLL to the system folder when using MySQL. You cannot find this DLL.
3. Install the subversion, just click Next. Copy the mod_authz_svn.so and mod_dav_svn.so files in the bin folder of subversion to the modules folder of Apache, and copy the libdb44.dll, libeay32.dll, and ssleay32.dll files to the bin folder of Apache. There are two lines in HTTP. conf.
# Loadmodule dav_module modules/mod_dav.so
# Loadmodule dav_fs_module modules/mod_dav_fs.so
Remove the # above.
Now, create a subversion file library, which is placed under E: \ project \ SVN and configured in a centralized manner. The HTTP. conf file is as follows. 1 <Location/SVN>
2 Dav SVN
3 Svnparentpath E:/project/SVN
4 Authtype basic
5 Authname " Subversion Repository "
6 Authuserfile " E:/project/Project. passwd "
7 Require valid-user
8 Svnpathauthz off
9 </Location>

The user name and password are required for access control. I have disabled the control of the specific path. In the Subversion manual, this is resource-consuming. We recommend that you disable it.
The Subversion client software is installed as needed.
4. after python is installed, the installation of TRAC, SQLite and other things is basically all the way to next, it is a little troublesome to setuptools, it does not support python2.6exeprogram, just download the setuptools-0.6c9.tar.gz file, unzip and run Python setup. PY install.
Copy the mod_wsgi-win32-ap22py26-3.0c4.so to the modules directory of Apache, rename it mod_wsgi.so, and add 1 Loadmodule wsgi_module modules/mod_wsgi.so

Create a new TRAC folder under E: \ Project for future use of the project's TRAC, and then create a TRAC. wsgi file under the project. The TRAC. Web. Main. dispatch_request () function provided by the TRAC program runs TRAC under wsgi and configures TRAC. wsgi as follows: 1 Import OS
2 OS. Environ [ 'Trac _ env_parent_dir' ]   = 'E:/project/trac'
3 OS. Environ [ 'Python _ egg_cache' ]   = 'E:/project/TRAC/eggs'
4  
5 Import TRAC. Web. Main
6 Application = Trac. Web. Main. dispatch_request

The folder E:/project/TRAC/eggs contains the cached file. If you want to put all the projects together, you can change trac_env_patent_dir to trac_env.
Then configure Apache: 1 Wsgiscriptalias/TRAC " E:/project/TRAC. wsgi "
2 <Directory " E:/project/TRAC " >
3 Wsgiapplicationgroup % {Global}
4 Order deny , Allow
5 Allow from all
6 </Directory>
7
8 <Locationmatch " /Project/[^/] +/login " >
9 Authtype basic
10 Authname " TRAC Environment "
11 Authuserfile " E:/project/Project. passwd "
12 Require valid-user
13 </Locationmatch>

Verify the logon.
5. Configure WebDAV, create the E: \ project \ Files folder, and configure Apache: 1 Alias/Files " E:/project/Files "
2 <Location/Files>
3 Dav on
4 Authtype basic
5 Authname " Files "
6 Authuserfile " E:/project/Project. passwd
7 Require valid-user
8 </Location>
9
10 <Locationmatch ^/files/[^/] +/(images | public)/>
11 <Limitaskt get Options>
12 Require valid-user
13 </Limit10000t>
14 </Locationmatch>

6. Create a user using htpasswd in the Apache bin Folder: Htpasswd-C/Projects/Projects.Password Username

you will be prompted to enter the password,
(4) test and install
here, I create a test project to test the preceding configuration, you can configure environment variables on your own.
first, create the svn database, navigate to E: \ project from cmd, and enter

code highlighting produced by actipro codehighlighter (freeware)
http://www.CodeHighlighter.com/

--> svnadmin create SVN \ test

Create a TRAC library and run

code highlighting produced by actipro codehighlighter (freeware)
http://www.CodeHighlighter.com/

--> Python C: \ python26 \ scripts \ trac-Admin . exe trac \ test initenv

At this time, the interactive shell of TRAC will ask the project name, enter test, ask the database connection string and repository type, and press enter to use the default, and enter path to repository type E: \ project \ SVN \ test. TRAC is configured at this time. Enter Tracd -- Port8000-- Http11 E:\Project\TRAC\Test

Start TRAC. Enter http: // localhost: 8000/test in the browser to view the web interface provided by TRAC.


So far, subversion and TRAC have been configured, and the rest is to really manage your own projects.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.