此文由正在戒网独家发布,其中很多地方耗了本人很多精力才得以解决,如有转载,请一定注明原址http://isfate.com/520.html谢谢
之前有发表一篇类似的文章,不过那是针对submin1.0版,现在submin已经升级到2.0,功能上有小些变化,现在我再重新整理,留为备份:
安装Subversin 及相关需要的模块:
1 2 | 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/
1 2 3 4 | 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.
1 2 3 4 5 6 7 8 | 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下一个目录里,这样备份时,打一个包就可以了.
1 2 3 4 | 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环境:
1 | 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? [/]> /
后面两项是网址及网址后缀,后缀直址/就可以了.最后提示
1 2 3 4 5 6 7 8 9 10 11 12 | 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的配置文件中加入/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相关的包.后来居然能用了.奇迹啊....
| feihu分享到: |

完全按照你的文章来的 最后在submin里建立svn库的时候出现Failed to import python ‘svn’ module, please install.
具体信息如下
Traceback (most recent call last):
File “/usr/lib/python2.5/site-packages/submin/dispatch/dispatcher.py”, line 59, in dispatcher
response = handler(request, path)
File “/usr/lib/python2.5/site-packages/submin/auth/decorators.py”, line 22, in _decorator
return fun(self, *args, **kwargs)
File “/usr/lib/python2.5/site-packages/submin/views/repositories.py”, line 37, in handler
return self.add(req, path[1:], templatevars)
File “/usr/lib/python2.5/site-packages/submin/auth/decorators.py”, line 22, in _decorator
return fun(self, *args, **kwargs)
File “/usr/lib/python2.5/site-packages/submin/auth/decorators.py”, line 31, in _decorator
return fun(self, *args, **kwargs)
File “/usr/lib/python2.5/site-packages/submin/views/repositories.py”, line 137, in add
a = Repository(repository, vcs_type)
File “/usr/lib/python2.5/site-packages/submin/models/repository.py”, line 74, in __init__
self.repository = vcs.Repository(repositoryname)
File “/usr/lib/python2.5/site-packages/submin/plugins/vcs/svn/repository.py”, line 67, in __init__
raise VCSImportError(“Failed to import python ‘svn’ module, please install”)
VCSImportError: Failed to import python ‘svn’ module, please install
请问 我应该怎么解决这个问题?
这个可以不用管他,是submin与trac版本不兼容引起的,建好后按照提示提示升级下,然后修改下文件的所有者为www-data就可以了
貌似建立不了svn库啊。。。需要升级什么?
可能你缺少svn库,+我QQ:8926785明天告诉你,今天在外地,手机上网伤不起
apt-get install python-svn libsvn-dev libsvn-doc libsvn-perl libsvn1 python-subversion python-subversion-dbg
就应该可以解决了
@hoho
也许是没有安装sendmail导至的.
你apt-get install sendmail试试看
@hoho
已解决,在/var/spool/mail里找到未发出的邮件了
装好后访问submin需要密码,initenv的时候设置的邮箱我收不到密码…
另外,请不要随意透露你的submin地址,以避免潜在的危险.
sbumin目前在安全上并不完善