<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Google Stop Blog - The future is fusion &#187; Python</title>
	<atom:link href="http://googlestop.com/blog/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://googlestop.com/blog</link>
	<description>Just another weblog of Charry</description>
	<lastBuildDate>Sat, 10 Jul 2010 13:02:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Install Trac On Your Windows</title>
		<link>http://googlestop.com/blog/2007/09/install-trac-on-your-windows/</link>
		<comments>http://googlestop.com/blog/2007/09/install-trac-on-your-windows/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 05:12:20 +0000</pubDate>
		<dc:creator>Charry</dc:creator>
				<category><![CDATA[Software Configuration]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://googlestop.com/blog/2007/09/17/install-trac-on-your-windows/</guid>
		<description><![CDATA[阅读本文前，请参考前面两篇文章： SVN服务器的搭建 和 ViewVC的安装 注：由于WordPress的限制，下面有些路径的反斜杠使用正斜杠代替 1. Download &#38; Install trac-0.10.4.win32.exe 2. Download &#38; Install pysqlite-2.3.4.win32-py2.3.exe 3. Download &#38; Install mod_python-3.3.1.win32-py2.3-Apache2.0.exe 4. Download &#38; Install clearsilver-0.9.14.win32-py2.3.exe 5. Download &#38; Install setuptools-0.6c7.win32-py2.3.exe 6. 在httpd.conf中增加配置如下：  LoadModule python_module modules/mod_python.so  &#60;Location /trac&#62;   SetHandler mod_python    PythonHandler trac.web.modpython_frontend     PythonOption TracEnvParentDir c:/trac     PythonOption TracUriRoot /trac   &#60;/Location&#62; 7. C:/&#62;mkdir trac 8. C:/Trac&#62;python [...]]]></description>
			<content:encoded><![CDATA[<p>阅读本文前，请参考前面两篇文章：<br />
<a title="Permanent Link to SVN服务器的搭建" rel="bookmark" href="http://googlestop.com/blog/2007/09/04/set-up-svn-server-in-windows/">SVN服务器的搭建</a> 和 <a title="Permanent Link to ViewVC的安装" rel="bookmark" href="http://googlestop.com/blog/2007/09/09/viewvc%e7%9a%84%e5%ae%89%e8%a3%85/"><span style="color: #0000ff;">ViewVC的安装</span></a><br />
注：由于WordPress的限制，下面有些路径的反斜杠使用正斜杠代替</p>
<p>1. Download &amp; Install trac-0.10.4.win32.exe<br />
2. Download &amp; Install pysqlite-2.3.4.win32-py2.3.exe<br />
3. Download &amp; Install mod_python-3.3.1.win32-py2.3-Apache2.0.exe<br />
4. Download &amp; Install clearsilver-0.9.14.win32-py2.3.exe<br />
5. Download &amp; Install setuptools-0.6c7.win32-py2.3.exe</p>
<p>6. 在httpd.conf中增加配置如下：<br />
 LoadModule python_module modules/mod_python.so </p>
<p>&lt;Location /trac&gt;<br />
  SetHandler mod_python <br />
  PythonHandler trac.web.modpython_frontend  <br />
  PythonOption TracEnvParentDir c:/trac  <br />
  PythonOption TracUriRoot /trac  <br />
&lt;/Location&gt;</p>
<p>7. C:/&gt;mkdir trac<br />
8. C:/Trac&gt;python c:/Python23/Scripts/trac-admin oa initenv<br />
系统提示如下：<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<strong><br />
</strong>Creating a new Trac environment at C:/Trac/oa<br />
Trac will first ask a few questions about your environment in order to initalize and prepare the project database.Please enter the name of your project.This name will be used in page titles and descriptions.</p>
<p><strong>Project Name [My Project]&gt; OA</strong></p>
<p>Please specify the connection string for the database to use. By default, a local SQLite database is created in the environment directory. It is also possible to use an already existing PostgreSQL database (check the Trac documentation for the exact connection string syntax).</p>
<p><strong>Database connection string [sqlite:db/trac.db]&gt;</strong></p>
<p>Please specify the type of version control system, By default, it will be svn. If you don&#8217;t want to use Trac with version control integration, choose the default here and don&#8217;t specify a repository directory. in the next question.</p>
<p><strong>Repository type [svn]&gt;</strong></p>
<p>Please specify the absolute path to the version control repository, or leave it blank to use Trac without a repository. You can also set the repository location later.</p>
<p><strong>Path to repository [/path/to/repos]&gt; c:/Repo/oa</strong></p>
<p>Please enter location of Trac page templates. Default is the location of the site-wide templates installed with Trac.</p>
<p><strong>Templates directory [C:/Python23/share/trac/templates]&gt;<br />
</strong>Creating and Initializing Project Installing default wiki pages<br />
<strong>&#8230; &#8230;<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
9. 权限设置<br />
&lt;LocationMatch &#8220;/trac/[^/]+/login&#8221;&gt; <br />
  AuthType Basic <br />
  AuthName &#8220;Trac&#8221;<br />
  AuthUserFile c:/Repo/passwd.txt<br />
  Require valid-user<br />
&lt;/LocationMatch&gt;</p>
<p><span class="mw-headline">10. 管理</span></p>
<ul>
<li>下载WebAdmin</li>
</ul>
<p>WebAdmin是一个对Trac进行权限控制的插件，安装完成后可以在Trac页面中直接对权限进行控制，其下载地址为<a href="http://trac.edgewall.org/wiki/WebAdmin">http://trac.edgewall.org/wiki/WebAdmin</a>，页面中有许多版本，根据自己需要下载即可(Trac 0.11以后的版本会自动集成WebAdmin，只有0.11之前的版本需要手动下载安装)。</p>
<ul>
<li>下载后得到一个压缩包，解压得到一个*.egg的文件夹</li>
<li>拷贝刚才解压得到的*.egg文件夹，粘贴到你所要配置的Trac目录下的plugins目录，例如</li>
</ul>
<pre>C:/Trac/oa/plugins</pre>
<ul>
<li>在控制台执行easy_install</li>
</ul>
<pre>C:/Python23/Scripts/easy_install.exe C:/Trac/oa/plugins/TracWebAdmin-0.1.2dev_r4240-py2.3.egg</pre>
<ul>
<li>在Trac.ini文件中加上以下代码：</li>
</ul>
<pre>[components]
webadmin.* = enabled</pre>
<ul>
<li>执行Trac-Admin的Upgrade命令</li>
</ul>
<pre>C:/Trac&gt;python c:/Python23/Scripts/trac-admin update</pre>
<ul>
<li>重启Apache</li>
</ul>
<ul>
<li>完成，在控制台中输入</li>
</ul>
<p>C:/Trac&gt;python c:/Python23/Scripts/trac-admin c:/Trac/oa<br />
Welcome to trac-admin 0.10.4 Interactive Trac administration console.<br />
Copyright (c) 2003-2006 Edgewall Software<br />
Type: &#8216;?&#8217; or &#8216;help&#8217; for help on commands.<br />
Trac [c:/Trac/oa]&gt;</p>
<p>即可进行管理，但这里的管理是基于命令行的</p>
<p>也可以：</p>
<pre>C:/&gt;python c:/Python23/Scripts/trac-admin c:/Trac/oa permission add charry TRAC_ADMIN</pre>
<p>这样的话，就可以用charry这个账户登陆到web页面进行管理了，只是没有命令行的管理界面强大。<!-- end content --></p>
]]></content:encoded>
			<wfw:commentRss>http://googlestop.com/blog/2007/09/install-trac-on-your-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ViewVC的安装</title>
		<link>http://googlestop.com/blog/2007/09/viewvc%e7%9a%84%e5%ae%89%e8%a3%85/</link>
		<comments>http://googlestop.com/blog/2007/09/viewvc%e7%9a%84%e5%ae%89%e8%a3%85/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 04:31:18 +0000</pubDate>
		<dc:creator>Charry</dc:creator>
				<category><![CDATA[Software Configuration]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://googlestop.com/blog/2007/09/09/viewvc%e7%9a%84%e5%ae%89%e8%a3%85/</guid>
		<description><![CDATA[步骤如下：  下载ViewVC，并解压到：C:\viewvc-1.0.4 下载 Python-2.3.5.exe 并安装 下载 pywin32-210.win32-py2.3.exe 并安装 下载 svn-python-1.4.4.win32-py2.3.exe 并安装 在ViewVC的目录下执行 python viewvc-install，会提示： C:viewvc-1.0.4&#62;python viewvc-install This is the ViewVC 1.0.4 installer. It will allow you to choose the install path for ViewVC. You will now be asked some installation questions. Defaults are given in square bra Just hit [Enter] if a default is okay. [...]]]></description>
			<content:encoded><![CDATA[<p>步骤如下： </p>
<ul>
<li>下载ViewVC，并解压到：C:\viewvc-1.0.4</li>
<li>下载 Python-2.3.5.exe 并安装</li>
<li>下载 pywin32-210.win32-py2.3.exe 并安装</li>
<li>下载 svn-python-1.4.4.win32-py2.3.exe 并安装</li>
<li>在ViewVC的目录下执行 python viewvc-install，会提示：</li>
</ul>
<p>C:viewvc-1.0.4&gt;python viewvc-install This is the ViewVC 1.0.4 installer. It will allow you to choose the install path for ViewVC. You will now be asked some installation questions. Defaults are given in square bra Just hit [Enter] if a default is okay. Installation path [C:Program Filesviewvc-1.0.4]: C:viewvc-1.0.4 DESTDIR path (generally only used by package maintainers) []:</p>
<ul>
<li>打开viewvc.conf，修改如下：<br />
将cvs_roots = cvs: /home/cvsroot注释掉，改为：svn_roots = svn: c:\Repo\oa(这里的oa是我先前建立的Repository)，再将 default_root = cvs注释掉.</li>
<li>注意：svn_path最好也要填写，比如：svn_path = C:/Subversion/bin，否则annotate的时候会出错</li>
</ul>
<p>在apache的httpd.conf加入：</p>
<p>ScriptAlias /codeview/ &#8220;C:/viewvc-1.0.4/bin/cgi/&#8221; &lt;Directory &#8220;C:/viewvc-1.0.4/bin/cgi/&#8221;&gt; AllowOverride None Options None Order allow,deny Allow from all &lt;/Directory&gt;</p>
<hr /><a title="diff.E6.94.AF.E6.8C.81" name="diff.E6.94.AF.E6.8C.81"></a></p>
<h2>加入<span class="mw-headline">diff支持</span></h2>
<ul>
<li>到 <a class="external free" title="http://gnuwin32.sourceforge.net" rel="nofollow" href="http://gnuwin32.sourceforge.net/">http://gnuwin32.sourceforge.net</a> 逐一下载以下工具：</li>
</ul>
<p>DiffUtils, enscript, libintl, libiconv, sed将他们分别解压，然后保存在 C:/ViewVCUtil下，并将 C:/ViewVCUtil 加入到 %PATH% 中</p>
<ul>
<li>打开viewvc.conf，将use_enscript = 0改成1，重新启动standalone.py（如果是以apache+DAV的方式运行，则不需要执行standalone.py）</li>
</ul>
<ul>
<li>如果遇到</li>
</ul>
<p>error: (2, &#8216;CreateProcess&#8217;, &#8216;The system cannot find the file specified.&#8217;)</p>
<p>的错误，请检查，C:/ViewVCUtil是否在%PATH%中，如果还是不行，请把C:/ViewVCUtil下的文件copy到C:/Windows/System32下，也可以。</p>
<p><!-- Saved in parser cache with key wikidb-wiki_:pcache:idhash:7-0!1!0!!en!2 and timestamp 20070910042848 --><!-- end content --></p>
]]></content:encoded>
			<wfw:commentRss>http://googlestop.com/blog/2007/09/viewvc%e7%9a%84%e5%ae%89%e8%a3%85/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
