windos中Trac+apache+svn的安装与配置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了windos中Trac+apache+svn的安装与配置相关的知识,希望对你有一定的参考价值。
http://trac.edgewall.org/wiki/TracInstall官网安装步骤简介
第一步:安装python2.7.8(傻瓜安装)
第二步:安装setuptools(傻瓜安装)
创建两个文件
在C:\Python27\Lib\site-packages下altinstall.pth
import os, site; site.addsitedir(os.path.expanduser(‘~/lib/python2.7‘))
在C:\Python27\Lib\distutils下pydistutils.cfg
[install]
install_lib = ~/lib/python2.7
# This next line is optional but often quite useful; it directs EasyInstall
# and the distutils to install scripts in the user‘s "bin" directory. For
# Mac OS X framework Python builds, you should use /usr/local/bin instead,
# because neither ~/bin nor the default script installation location are on
# the system PATH.
#
install_scripts = ~/bin
第三部:安装Genshi 在DOS里c:/python27/Script执行easy_install Genshi安装
第四步:安装postgresql-9.2.9-1-windows
第五步:安装psycopg2-2.5.4
Svn
第六步:安装trac1.0 在DOS里c:/python27/Script执行 easy_install Trac==1.0
第七步:安装apache
第七步:Creating a Project Environment
1、 手动创建path/to路径执行trac-admin /path/to/myproject initenv
第八步:更改权限chown -R apache.apache /path/to/myproject
第八步:tracd --port 8080 /path/to/myproject
第九步:增加用户 trac-admin /path/to/myproject permission add admin TRAC_ADMIN
第十步:密码验证
from optparse import OptionParser
# The md5 module is deprecated in Python 2.5
try:
from hashlib import md5
except ImportError:
from md5 import md5
realm = ‘trac‘
# build the options
usage = "usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-u", "--username",action="store", dest="username", type = "string",
help="the username for whom to generate a password")
parser.add_option("-p", "--password",action="store", dest="password", type = "string",
help="the password to use")
parser.add_option("-r", "--realm",action="store", dest="realm", type = "string",
help="the realm in which to create the digest")
(options, args) = parser.parse_args()
# check options
if (options.username is None) or (options.password is None):
parser.error("You must supply both the username and password")
if (options.realm is not None):
realm = options.realm
# Generate the string to enter into the htdigest file
kd = lambda x: md5(‘:‘.join(x)).hexdigest()
print ‘:‘.join((options.username, realm, kd([options.username, realm, options.password])))
将上面的代码保存到一个新文本文件中,放到c盘下 trac-digest.py, C:\Python24>python c:\trac-digest.py -u admin -p admin >>c:\ digest.txt会在c:\目录下生成一个digest.txt的密码文件,该文件的格式是“用户名:范围名(readlm名称,默认是trac):密码的密文”。
第十一步:C:\Python27\Scripts>tracd -p 8080 --auth="myproject,c:/digest.txt,trac" c:/path/to
/myproject
第十二步:安装:VisualSVN-4.0.9.msi VisualSVN-Server-2.7.2 端口8443
第十三步:创建svn库及用户
第十四步:svn和trac结合(待定,还未亲自配置成功过,)
注:centos6.5亲自配置过,是可以使用,一键安装包即可
详情请询问QQ:1183810577
本文出自 “许你七十年” 博客,请务必保留此出处http://chavaz.blog.51cto.com/6876806/1850795
以上是关于windos中Trac+apache+svn的安装与配置的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu安装Apache + mod_wsgi + Trac + Python 2.7