当前位置: 首页 > 工具软件 > Trac > 使用案例 >

linux安装trac+svn+apache+wike,搭建apache+svn+trac平台

胡鸿禧
2023-12-01

51Testing软件测试网:us%R?9M(Cy.s4lCX

一、trac 概念

[\ _9E;j0Trac 是用Python写的一个基于Web的事件跟踪系统,它使用WiKi作为文档的格式,Subversion作为版本控制系统。可帮助开发人员进行源码版

s2H$F:i/iVa]+E0本管理、Bug跟踪和讨论。Debian51Testing软件测试网eqb I#J q|ka2C

如果你的系统是Debian则用apt-get install trac命令安装即可,Trac依赖的所有软件包系统会自动安装。安装完成后,就可进行配置了。51Testing软件测试网(v|~,`iI['sKE

Trac可以设置成Standalone服务器,只供本机使用。也可以与Apache等Web服务器集成,如果与Apache集成,则可配置成CGI、FastCGI或

ISl9n4C+h0Mod_Python等方式 。51Testing软件测试网4b)E3Ij7p'h

本人文采用:

6@

rux8E&?%W6@a0redhat 9

&\!J"PFPaS'RUAj0apache 2 (mod_python)

%XCQ$I|x,z^n/f0mysql 5 (mysql_python)51Testing软件测试网HIHO F9z)a9lqS%d

Subversion 1.4

%L^'};E?buK5Q+a0trac 0.10.4

1\)Y5Be'k!_0

3co*ns}c0二、trac 官网安装方法51Testing软件测试网TFUv'l*l]

51Testing软件测试网3oo'P I%Y#pSr#I

http://trac.edgewall.org/wiki/TracInstall

vg4|,U?0    它所依赖的包:

9_8R;Le*HR7v0    *Python, version >= 2.3   //Please keep in mind, that for RPM-based systems you will also need python-devel and python-

A2p;k6r2x*i0xml packages.

Pb0L~;|,S5B0   *ClearSilver, version >= 0.9.3    //With python-bindings (./configure --with-python=/usr/bin/python)

hZeI"T*X&qe A0   *A web server capable of executing CGI/FastCGI scripts, or Apache HTTPD with mod_python.  51Testing软件测试网J\g+E,[ F+R C^

* Subversion, version >= 1.0. (>= 1.1.x recommended)51Testing软件测试网!W`-KF:Vn5oX}

* Subversion SWIG Python bindings (not PySVN).

pC3_x9H0   *必须的数据库支持(SQLite,PostgreSQL,MySQL(0.10.4以上版本的trac完全支持).

#o1z2Y_TW#wX0   在安装之前要先确认这些包是否满足trac 的要求。51Testing软件测试网"{r5_/^'w

我的就是RH9 版本太低了,结果依赖的包超多。51Testing软件测试网(|6ha7Oyy7y4?

所有包整理如下:

yc4O3JIp!`/q"O~,O0    python:51Testing软件测试网#y1]*F)OReI0fJ

http://download.chinaunix.net/down.php?id=24851&ResourceID=35&site=151Testing软件测试网H)sJ:q'eNp

clearsilver:51Testing软件测试网j2SKR!u1ho

http://www.clearsilver.net/downloads/

&V+^| P-kS`/{x0    subversion:

Bb3EKq!f!L5g,d]0http://liuyu.blog.51cto.com/183345/4832651Testing软件测试网v,lxS+XCSzr

I

mysql_python:51Testing软件测试网'J'ox%SE-G,C2V

http://osdn.dl.sourceforge.net/sourceforge/MySQL-python/MySQL-python-1.2.2.tar.gz51Testing软件测试网/D N/Z;K+f@K0e+~S

^

mod_python:51Testing软件测试网u

Xn%HWQ

http://apache.mirror.phpchina.com/httpd/modpython/mod_python-3.3.1.tgz51Testing软件测试网{I+A3OaH

三、各个包的安装方法:51Testing软件测试网t+~#B,Ux

Og q

1、python:

~+F#mn%E!WL0       # tar xjvf Python-2.5.tar.gx

b;c}in&rI4K0       # cd Python-2.551Testing软件测试网;ug.iv`'pR&i+d0w

# ./configure --with-apxs=/usr/local/apache/sbin/apxs51Testing软件测试网NR)b/~DKS

# make;make install

:v0Kc\C/xi0    2、clearsilver:

y*n4{n&lm2Dq0       如果报此错就说明clearsilver没有安装好 TracError: ClearSilver not installed (No module named neo_cgi)51Testing软件测试网n7t$g)JG.y

# tar xfz clearsilver-0.10.5.tar.gz

w c0_8g]:Gr-p0      # cd clearsilver-0.10.551Testing软件测试网m4D$U(Wi

# ./configure --disable-apache --disable-csharp --disable-ruby --prefix=/usr --with-python=/usr/local/bin/python51Testing软件测试网#J1M9vJ7`Q0j6r1o

#sed -i "s@/usr/local/bin/python@/usr/bin/env

?

IjP%d![~%q0[email=python@g]python@g[/email]51Testing软件测试网3x7UmYP

|B

" scripts/document.py

'|a koxx,o#V0      #make || return 1

~*D5i B

BLvk-A0      #make install51Testing软件测试网9e&fV"J%tK%H;q)F

#cd python51Testing软件测试网I3z}I4?X$I

#PYTHON_SITE=`/usr/local/bin/python -c \51Testing软件测试网Ss}X-S&P

"import sys; print [path for path in sys.path if path.find('site-packages') != -1][0]"`

+RK:z}&p6E"\x$m"p0     # python setup.py install51Testing软件测试网t[1w.E`Ur#B'XYf

51Testing软件测试网7C%LE.cTgfW

3、mysql_python:

Uh-dxU0        # tar xfz MySQL-python-1.2.1.tar.gz

*XA},su8Gl4Y0x.g0       # cd MySQL-python-1.2.1

wx-@4o-P)CHEG0       # python setup.py build51Testing软件测试网v,s@@g]

# python setup.py install51Testing软件测试网F#D2t ` RBRV

在安装mysql_python之前一定要装好mysql_client

l#F2hy$uP-f0     如果提示无法找到mysql_config

yv3CZ3S8`3ak0     vi site.cfg51Testing软件测试网daKm7l*g`

#mysql_config = /usr/local/bin/mysql_config51Testing软件测试网.R,Lf%c4f;~e

去掉注释,改为你mysql_config 所在的路径51Testing软件测试网%W6Q,jOK&w.rx

4、mod_python:

M/c1x;I!^;eAAwx0         # tar zxvf mod_python-3.3.1.tar.gz

t

N

Pk+CE4|?oO0         # cd mod_python-3.3.1

1[ zg7[3d,u0         # ./configure --with-apxs=/usr/local/apache/sbin/apxs51Testing软件测试网tAj7UzLcx

# make

[U'V#tmB]o0         # make install      51Testing软件测试网Y!e"O"PeefA

在apache配置文件里加入模块51Testing软件测试网2eu)m.fQ8h6i,y

vi /usr/local/apache2/conf/httpd.conf51Testing软件测试网YQ.}~Mv9u

LoadModule python_module modules/mod_python.so

_%S;~i&y

Bf$eCsd0  51Testing软件测试网[+tI/i!~5Q.SU

四、创建数据库:

)o"z6H.yW0    # cd /usr/local/mysql

[-{"Q1g7k-i0h0    # mysqladmin create dbname

:S3XJ%g;S7P3l0    # mysql -uroot -p

0tr7MT4G!JrX*rm0    > passwd

ku\/\d0    > grant all privileges on dbname.* to51Testing软件测试网0^.]@2cl4g^(?2I

[email=dbuser@dbhost]dbuser@dbhost[/email]

EL0Z:P:C:i5L4^;S0identified by 'dbpass';51Testing软件测试网 EI?J5Y.X.eQ

> use dbname;51Testing软件测试网nQo}aP7M

> ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;51Testing软件测试网W6z

gBqR

> quit51Testing软件测试网&V/^9kF%eVGz

以本机为例:

L&x)\*U%i#pT0    # mysqladmin create trac

AF2E$Z5{K4iE0    # mysql -uroot -p51Testing软件测试网,\;m'M#W

dR&J

> root(mysql-root 密码)51Testing软件测试网-Kl(DY2wu;W)I

> grant all privileges on trac.* to51Testing软件测试网,|l#MD7_;m

[email=trac@localhost]trac@localhost[/email]51Testing软件测试网+~!Mdpv;V p.m

identified by 'trac';51Testing软件测试网InT2I4HxzueYH"r

> use trac;51Testing软件测试网|8Yy7g:hP2W

> ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;51Testing软件测试网2|ndna.K#EY

> quit51Testing软件测试网&QFC3p

u/uG8S

注:一定要记住这里创建的数据库名(trac),用户名(trac),密码(trac),主机名(localhost)51Testing软件测试网V { ZX6~:a;?

因为之后创建trac表的时候需要用到51Testing软件测试网2Luf7e.H7@

五、trac的安装及初始化

'hJ;[$B6U&H0     # tar zxvf trac-0.10.4.tar.gz

&Pu%@V9Bgk0     # cd trac-0.10.4

8Q"}Qt&`%g'V/i0     # python ./setup.py install

 类似资料: