In Python 2.6 install Trac 0.12.1 Project Management System

sponsored links
An article on the version of Python Subversion binding support issues, and Python interpreter using the Python 2.5 is not Python 2.6.

In this article we build a Python interpreter uses Python 2.6.6, project management using Trac 0.12.1, a database using MySQL, code management with Subversion 1.6.13 of the Trac project management system.

Packages needed for the following:

Trac 0.12.1, Trac program < http://trac.edgewall.org/wiki/TracDownload >
Apache 2.2.16, Web server < http://httpd.apache.org/download.cgi >
Subversion 1.6.13, code version management tools < http://sourceforge.net/projects/win32svn/ >
Python 2.6.6, Python interpreter < http://www.python.org/ >

mod_python-3.3.2-dev-20080819.win32-py2.6.exe Python's Apache module unofficial < http://vagabonds.info/python/mod_python-3.3.2-dev-20080819.win32-py2.6. exe >
svn-win32-1.6.13_py.zip, Python 2.6 of Subversion binding < http://sourceforge.net/projects/win32svn/ >

setuptools (ez_setup.py), Python's package building and publishing tools < http://peak.telecommunity.com/DevCenter/setuptools >
Genshi-0.6 (Genshi-0.6.win32.exe), Python-based template engine < http://genshi.edgewall.org/wiki/Download >
Babel-0.9.5, Python-based language that supports plug-ins < http://babel.edgewall.org/wiki/Download >

MySQL 5.1.51, the database server < http://www.mysql.com/ >
MySQL-python-1.2.2.win32-py2.6.exe, Python module to access MySQL database < http://sourceforge.net/projects/mysql-python/ > Private < http://www.codegood.com / archives / 4 >

Installation error how to do?
If you find some parts of the installation process is not normal, and remember to correct the following way:

1. View the error message, see if you can find tips
2. Forgot to check for installed software
3. Check the httpd.conf is wrong
4. Remember to restart Apache after changes

First, install Apache and subversion

Download the official website of the Apache 2.2.16 version of the msi installation package, the Executive can be. After installing the browser to access http://localhost/ , such as Apache can see the start page that is installed successfully.
Apache2.2 installed by default in C: \ Program Files \ Apache Software Foundation \ Apache2.2 directory.

Downloaded from the Subversion Setup-Subversion-1.6.13.msi, implementation can be.
Subversion is installed by default in C: \ Program Files \ Subversion directory.

Then integrated with Subversion and Apache (which can also refer to this article.)
Will be C: \ Program Files \ Subversion \ bin under the following files to C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ modules directory:

mod_authz_svn.so
mod_dav_svn.so

And then create the code repository directory C: \ SVNROOT.

Then modify C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf, find the following line, remove the # in front.

LoadModule dav_module modules / mod_dav.so

Then add the following in the vicinity of this line:

LoadModule dav_svn_module modules / mod_dav_svn.so

After the end of httpd.conf add the following:

<Location /repos>
DAV svn
SVNParentPath "C: / SVNROOT"
</ Location>

Then restart Apache.

At the end of httpd.conf add the following:

LoadModule proxy_module modules / mod_proxy.so
LoadModule proxy_balancer_module modules / mod_proxy_balancer.so

<Location /balancer>
SetHandler balancer-manager
Order Deny, Allow
Deny from all
Allow from 127.0.0.1
</ Location>

Then restart Apache.

Then try to access the http://localhost/balancer , you will see below as follows:

Server Version: Apache/2.2.16 (Win32) DAV / 2 SVN/1.6.13

If this shows SVN/1.6.13, it indicates a successful installation.

Second, install Python, mod_wsgi and SVN binding

1, the official website from the Python 2.6 Python's msi installation package to install, assuming installed to C: \ Python26 directory.

2, from Web site to download the unofficial mod_python mod_python 3.3.2 for Win32 version ( http://vagabonds.info/python/mod_python-3.3.2-dev-20080819.win32-py2.6.exe ).

When it will ask you to install Apache is installed, enter C: \ Program Files \ Apache Software Foundation \ Apache2.2 to.

Finally open the C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf, find the LoadModule, add the following line:

LoadModule python_module modules / mod_python.so

Then restart Apache.

Then try to access the http://localhost/balancer , you will see below as follows:

Server Version: Apache/2.2.16 (Win32) DAV / 2 SVN/1.6.13 mod_python/3.3.2-dev-20080819 Python/2.6.6

If this shows mod_python/3.3.1 Python/2.6.6 the instructions to install successfully.

3, the installation of Subversion binding to Python support for Subversion. Where to download just download the Subversion svn-win32-1.6.13_py.zip file and install it. Before installation see README.txt.

Python 2.5 or more users please note:
From Python 2.5 + will not be used. Dll be loaded extension module, you must manually add the directory of all *. dll files libsvn (libsvn / *. dll) renamed. Pyd extension. Please do not change the file libsvn_swig_py-1.dll file name.
Svn directories libsvn and should be extracted to C: \ Python26 \ Lib \ site-packages directory directory.

4, please http://peak.telecommunity.com/DevCenter/setuptools ez_setup.py download and install the setuptools:

Installation command: ez_setup.py setuptools == dev

5, please go to http://genshi.edgewall.org/wiki/Download Genshi-0.6.win32.exe download and install Genshi-0.6:

6, in order to allow Trac to display Chinese, the installation of Trac prior to go http://babel.edgewall.org/ Babel-0.9.5.win32.exe download and install Babel.

Third, install MySQL and MySQLdb

To the official home page to download the latest version of MySQL 5.1.51 (mysql-5.1.51-win32.msi) and install it. Please read carefully before you install MySQL http://trac.edgewall.org/wiki/MySqlDb .

1, create the database, and then authorize the user name and password.
mysql> CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected (0.02 sec)

MySQL> GRANT ALL ON TRAC .* TO tracuser @ localhost IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

MySQL database connection string is as follows:

mysql: / / tracuser: password @ localhost / trac

2, Trac database must be configured to utf8 character set and utf8_bin collation type.

After installing Trac to check as follows:
mysql> USE trac;
Database changed
mysql> SHOW VARIABLES WHERE variable_name IN ('character_set_database', 'collation_database');
+------------------------+----------+
| Variable_name | Value |
+------------------------+----------+
| Character_set_database | utf8 |
| Collation_database | utf8_bin |
+------------------------+----------+
2 rows in set (0.01 sec)

mysql> SHOW FULL COLUMNS FROM 'node_change';
+-------------+-------------+-----------+-
| Field | Type | Collation |
+-------------+-------------+-----------+-
| Rev | varchar (64) | utf8_bin |
| Path | text | utf8_bin |
| Node_type | varchar (32) | utf8_bin |
| Change_type | varchar (32) | utf8_bin |
| Base_path | text | utf8_bin |
| Base_rev | varchar (64) | utf8_bin |
+-------------+-------------+-----------+-
6 rows in set (0.00 sec)

In addition to all the tables must be InnoDB or NDB type because Trac does not support the transaction mechanism used MyISAM table type.

3, in order for Python support for MySQL, we also need to install MySQL-python-1.2.2.win32-py2.6 module. To http://sourceforge.net/projects/mysql-python/ or http://www.codegood.com/archives/4 download and install version 1.2.2.

After installation is complete, determine the C: \ Python26 \ Lib \ site-packages \ MySQLdb directory exists.

Fourth, the installation Trac

Trac finally played the main character's turn. Trac download page to download the installation program Trac (Trac-0.12.win32.exe) and install it.

And then create the project directory C: \ Projects.

Then open the C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf, in the most at the end add the following:

<Location /projects>
SetHandler mod_python
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir C: / Projects
PythonOption TracUriRoot / projects
</ Location>

Then restart Apache, visit http://localhost/projects/ , you will see Available Projects words, then the installation was successful. At this point all the completed installation.

, To create projects

Now we want to create a real development in the use of the project. We named this project hello.

First, to establish a code repository. Open a command line, enter the following command:

C:
cd C: \ SVNROOT
md hello
cd hello
svnadmin create.

Note that the last space after a symbol "."

Then open the browser, access http://localhost/repos/hello/ . If you have the above settings are correct, you will see the following:

hello - Revision 0: /
----------------------------------------------
Note that the code repository to build a successful, but http://localhost/repos/hello/ is the code repository URL.

And then create the database. From the Start menu to start MySQL, MySQL Command Line Client tool, create a new database trac, attention to the character encoding set to UTF8.

And then create Trac project. Open a command line, enter the following command:

C:
cd C: \ Projects
C: \ Python26 \ Scripts \ trac-admin hello initenv

trac-admin management tool for the Trac, hello to the project name, initenv command instructs Trac to create a new project. Then follow the contents of the input:

Project Name [My Project]> Hello World
Database connection string [sqlite: db / trac.db]> mysql: / / <username>: <password> @ localhost / trac

Database connection line, <username> and <password> were set when installing MySQL user name and password. If the creation fails, you need to delete the C: \ Projects \ hello then try again.
mysql: / / tracuser: password @ localhost / trac

Last tips
Congratulations!
That you installed successfully.

Open a browser, access http://localhost/projects/hello to see Trac's interface.

VI, set the HTTP authentication in the top right of Trac have a Login menu interface, then log in through the menu, create a bug or do other modifications do not need to enter your user name each time. But this menu need to be individually configured to work properly.

First, we want to generate the password file. Open a command line, enter the following command:

C:
cd C: \ Projects
"C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ bin \ htpasswd"-c trac.htpasswd admin
Automatically using MD5 format.
New password: *****
Re-type new password: *****
Adding password for user admin
To generate the password file trac.htpasswd.

After an additional user to the password file so only you can.
"C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ bin \ htpasswd" trac.htpasswd user

Then edit the httpd.conf, in the most at the end add the following:

<LocationMatch "/projects/[^/]+/login">
AuthType Basic
AuthName "Trac"
AuthUserFile C: / Projects / trac.htpasswd
Require valid-user
</ LocationMatch>

Then restart Apache.

To access the "management" (Admin) tag, you must give the user admin permissions TRAC_ADMIN. Open a command line, enter the following command:
C:
cd C: \ Projects
C: \ Python26 \ Scripts \ trac-admin hello permission add admin TRAC_ADMIN

So far we have Trac project management system based on the installation is complete.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of In Python 2.6 install Trac 0.12.1 Project Management System

  • Hibernate primary key strategy-sequence

    Today, the use of hibernate in the company encountered a troublesome problem, the use of hibernate when the primary key generation strategy set sequence, but always reported in the implementation could not get next sequence value of the error, then o ...

  • hibernate call stored procedure

    hibernate call stored procedure

  • hibernate using c3p0 connection pooling

    Private http://www.lifevv.com/tenyo/doc/20070605102040991.html c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuration in c3p0. c3p0 connection pool configuration is v ...

  • Hibernate configuration parameters hibernate.hbm2ddl.auto

    Hibernate in the configuration file: <properties> <property name="hibernate.hbm2ddl.auto" value="create" /> </ properties> Parameter Description: validate load hibernate, the authentication to create a database t ...

  • Build flex + spring + blazeds + hibernate application

    Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the orientation of selection create project from exis ...

  • Hibernate connection pool configuration

    Hibernate connection pool configuration <! - Jdbc -> <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver </ property> <property name="connection.url"> jdbc: oracle: thin: @ 10.203.14.132:15

  • hibernate generic generic DAO

    package org.lzpeng.dao; import java.io.Serializable; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.criterion.Criterion; import org.springside.modules.orm.hibernate.Page; /** * * @version 2009-1-10 *

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • Hibernate secondary cache

    Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...

  • Hibernate's lazy strategy

    hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries