首页 » 折腾 » 正文

ubuntu/debian下安装SVN,TRAC,Submin实代码托管,Bug追踪等

此文由正在戒网独家发布,其中很多地方耗了本人很多精力才得以解决,如有转载,请一定注明原址https://justchen.com/520.html谢谢

之前有发表一篇类似的文章,不过那是针对submin1.0版,现在submin已经升级到2.0,功能上有小些变化,现在我再重新整理,留为备份:
安装Subversin 及相关需要的模块:

apt-get install subversion libapache2-svn -y
apt-get install libapache2-mod-python libapache2-mod-python-doc -y

这里subversion及apache的版本并不要求很高,所以直接用的源里的安装.

接下来安装submin,由于submin现在功能并不完善,所以到网站上去下载最新版来安装,
这里查找最新版本,在官网上也有详细的安装说明http://supermind.nl/submin/nightly/

wget http://supermind.nl/submin/nightly/submin-2.0-dev-r1339.tar.gz
tar zxvf submin*
cd submin*
python setup.py install

这样submin已经安装好了,我们等把Trac安装好后再对它进行配置.

安装Trac
建义安装最新的稳定版,Trac的官网地址:http://trac.edgewall.org/wiki/TracDownload
现在最新稳定版是12.2.

wget http://peak.telecommunity.com/dist/ez_setup.py
python ez_setup.py
easy_install Babel Genshi
wget http://ftp.edgewall.com/pub/trac/Trac-0.12.2.tar.gz
tar zxvf Trac*
cd Trac
python ./setup.py compile_catalog -f
python ./setup.py install

Trac安装完成,我们使用submin对它自动配置,就不用再配置了.

配置Submin
在配置前要规划一下,配置文件放哪.出于备份的方便,我喜欢将网站目录等全部放在 /home下一个目录里,这样备份时,打一个包就可以了.

mkdir -p /home/www/svn
mkdir -p /home/www/trac
chown -R www-data /home/www/svn
chown -R www-data /home/www/trac

我的规划是 /home/www/svn 放subversion文件.trac放trac env放submin的配置文件
开始建立Submin环境:

submin2-admin /home/www/env initenv chendfy@gmail.com   //把配置文件放到/home/www/env下

然后会提示 Path to the repository? [svn]>/home/www/svn
subversion的目录,我们用/home/www/svn
Path to the git repositories? [git]>
git路径,我们没装,直接回车
Path to trac environment? [trac]> /home/www/trac
trac的路径
Hostname? [dzsj]> svn.isfate.com
HTTP base? [/]> /
后面两项是网址及网址后缀,后缀直址/就可以了.最后提示

Apache file created: /home/www/env/conf/apache.cgi.conf
Please include this in your apache config. Also make sure that you have
the appropriate modules installed and enabled. Depending on your choices,
these may include: mod_dav_svn, mod_authz_svn, mod_wsgi, mod_dbd,
mod_authn_dbd and mod_python

Apache file created: /home/www/env/conf/apache.wsgi.conf

Please include this in your apache config. Also make sure that you have
the appropriate modules installed and enabled. Depending on your choices,
these may include: mod_dav_svn, mod_authz_svn, mod_wsgi, mod_dbd,
mod_authn_dbd and mod_python

Apache file created: /home/www/env/conf/apache.cgi.conf

需要我们在APACHE的配置文件中加入/home/www/env/conf/apache.cgi.conf
找到Apache的配置文件,在最后加入:Include /home/www/env/conf/apache.cgi.conf 保存
apache需要开启两个模块:rewrite 还有 authn_dbd

a2enmod rewrite
a2enmod authn_dbd

重启apache,你就会现一切已经工作
在你的地址后加上 /trac是Trac的地址 /svn 是subversion地址 /submin是submin地址

附记:由于在梦游的VPS上安装后会出现类似于缺少 python svn模块之类的错误,然后用apt-cache search svn 试了试,装了一大把有关python与svn相关的包.后来居然能用了.
主要模块python-subversion

apt-get install python-svn libsvn-dev libsvn-doc libsvn-perl libsvn1 python-subversion python-subversion-dbg

发表评论