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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章