In Python 2.6 install Trac 0.12.1 Project Management System

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.

分类:Python 时间:2010-11-03 人气:184
分享到:
blog comments powered by Disqus

相关文章

  • FlexiGrid the use of plug-ins (ASP Project) 2008-11-06

    Application of several items this evening saw the blog a deep impression on how both could not sleep at night. Ever since, the following blog was born ^ - ^. I am not saying that I think it was familiar with Spring.NET Framework and other frameworks

  • Mysql database server configuration file / etc / my.cnf configuration details 2010-10-24

    The following is a Mysql database server configuration file / etc / my.cnf configuration details. Applications is the InnoDB engine, 4-core CPU, 32 Bit SUSE. [Client] port = 3306 socket = / tmp / mysql.sock # The MySQL server [Mysqld] bind-address =

  • Download eclipse plug-ins 2009-07-11

    velocity plug: You can download, http://sourceforge.net/projects/veloedit/ There are a: http://www.cnblogs.com/hw/articles/251148.html A powerful package jar download address, click on the registration can be downloaded quickly, address the www.jarba

  • MyEclipse shortcut keys and plug-ins Guinness 2009-08-12

    Related Articles: Eclipse summary of commonly used classification of shortcut keys Let us work together more efficient use of Eclipse Is that we usually use eclipse shortcut bar Recommended circle: IntelliJ IDEA More Recommended <script type="text

  • Wordpress Mu built plug-ins and Notes 2010-03-03

    1, Wordpress Mu is the Duo user version of Wordpress, although the kernel is the same, but also have some plugins template Bing Bunengtongyong, Part by simple modifications that Shi Ying Mu, and are things that must be Xieru physical document while B

  • Based on jQuery framework to collect some of the development control / jquery plug-ins 2010-06-13

    Horizontal accordion: jQuery Development based on jQuery, a very simple horizontally folding control. Home: http://letmehaveblog.blogspot.com/2007/10/haccordion-simple-horizontal-accordion.html (not found) Download: http://letmehaveblog.blogspot.com/

  • Based on jQuery framework for the development to collect some of the controls / jquery plug-ins 2010-11-01

    Horizontal accordion: jQuery Development based on jQuery, a very simple horizontal fold control. Home: http://letmehaveblog.blogspot.com/2007/10/haccordion-simple-horizontal-accordion.html (not found) Download: http://letmehaveblog.blogspot.com/2007/

  • myEclipse7.1 FatJar install and use plug-ins 2011-05-10

    MyEclipse their tools can be packaged with an export of your project => export => Java => jar file => and then one by one, select the package you need => to write target jar file name => write the destination directory => to generate

  • vim + python plug-ins to achieve the workspace 2010-05-15

    Minibuffer manage files with vim's easy, but the paper if the switch up more trouble, and looks chaotic, Bingju minibuffer inside the file is not classified, and is a disorder Zile, then wrote this workspace plug-ins themselves, can changed to comple

  • Using Web Server Plug-Ins with WebLogic Server as revese proxy 2010-11-15

    I was assigned to lead a team to develop single sign-on project for a telecommunication company. Oracle and my company would implement the whole project together. Firstly, I was asked to install weblogic v10.3.1 + ADF v11.1.x + oracle http server (Fu

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.925 (s). 12 q(s)