Maven+Appfuse+Apache+Subversion+ViewVC+Jira+Confluence安装手记
首先准备以下安装程序:[*]Maven 2.0.7http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]Collabnet Subversion-server-1.4.5-1.win32http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]TortoiseSVN-1.4.4.9706-win32-svn-1.4.4http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]svn-python-1.4.5.win32-py2.5http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]atlassian-jira-enterprise-3.6-standalonehttp://192.168.1.106:8080/confluence/images/icons/linkext7.gif
[*]confluence-2.2.9-stdhttp://192.168.1.106:8080/confluence/images/icons/linkext7.gif
[*]atlassian-jira-subversion-plugin-0.9.4(支持jira 3.6)http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]ActivePython 2.5.1.1http://192.168.1.106:8080/confluence/images/icons/linkext7.gif
[*]Highlight 2.6.5http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
[*]cvsgraph 1.6.1http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif
第一步:安装Maven
[*]解压缩Maven 2.0.7。
[*]添加环境变量M2_HOME=%maven安装目录%,并在PATH中添加%maven安装目录%\bin。
[*]测试Maven安装,在命令行输入maven --version,得到版本信息则安装成功。
第二步:安装Collabnet Subversion
[*]双击直接安装。在安装过程中选择将Apache以及SVN都作为系统服务安装,并且指定的Repository目录要一致。
[*]生成passwd文件,在命令行调用%Collabnet安装目录%\httpd\bin\htpasswd。
[*]编写授权文件authz。
[*]配置Collabnet里面的Apache,修改%Collabnet安装目录%\httpd\conf\httpd.conf文件,将
<Location /repos>
DAV svn
SVNParentPath G:/svn_repository
</Location>
修改为:
<Location /repos>
DAV svn
SVNParentPath G:/svn_repository
AuthType Basic
AuthName "Subversion repository"
AuthUserFile passwd
AuthzSVNAccessFile authz
Satisfy Any
Require valid-user
</Location>
注意:上面的配置里面,passwd和authz等文件的默认路径是从apache的根目录开始的,在这里是%Collabnet安装目录%\httpd,确保启用dav_svn需要的几个模块:dav_module.so, dav_svn_module.so, mod_authz_svn.so,否则启动Apache时会出错。
第三步:安装TortoiseSVN
第四步:安装MSSql Server 2000
第四步:创建svn repository
[*]进入G:/svn_repository,单击右键选择"TortoiseSVN"->"Create repository here"即可。
第五步:安装Jira和Confluence
[*]解压缩Jira-standalone的zip包。
[*]解压缩Confluence的zip包,将其中的confluence目录拷贝到Jira的安装目录下。
[*]破解Jira,执行jira-keygen.class。
[*]破解Confluence,拷贝atlassian-extras-0.7.20.jarhttp://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif到conflucen目录下WEB-INF\lib下,执行keygen.classhttp://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif。
[*]在MSSql Server 2000创建两个数据库,jiradb和confluencedb。
[*]创建用户jirauser,并将它作为jiradb和confluencedb的db_owner角色。
[*]修改%Jira安装目录%\conf\server.xml,修改以下内容:
将以下内容:
<Context path="" docBase="atlassian-jira" reloadable="false">
username="sa"
password=""
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:database/jiradb"
minEvictableIdleTimeMillis="4000"
timeBetweenEvictionRunsMillis="5000"/>
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
</Context>
修改为:
<Context path="" docBase="atlassian-jira" reloadable="false">
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
username="jirauser"
password="jira"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost:1433/jiradb"
minEvictableIdleTimeMillis="4000"
timeBetweenEvictionRunsMillis="5000"/>
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
</Context>
配置Confluence,添加以下内容:
<Context path="/confluence" docBase="confluence" reloadable="false">
<Resource name="jdbc/ConfluenceDS" auth="Container" type="javax.sql.DataSource"
username="jirauser"
password="jira"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost:1433/confluencedb"
minEvictableIdleTimeMillis="4000"
timeBetweenEvictionRunsMillis="5000"/>
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="atlassian-confluence." suffix=".log" timestamp="true"/>
</Context>
第六步:安装ViewVC
ViewVC除了支持CVS代码仓库浏览以外,还支持:
[*]SVN代码仓库浏览
[*]代码语法加亮、颜色标注
[*]CVS代码修订历史图形显示
[*]CVS代码提交动作的记录、查询
为了实现上述功能,要求以下依赖项:
[*]Python运行时
[*]Subversion及Subversion Python绑定
[*]Highlighthttp://192.168.1.106:8080/confluence/images/icons/linkext7.gif
[*]CVSGraphhttp://192.168.1.106:8080/confluence/images/icons/linkext7.gif
安装步骤如下:
[*]直接下载ActivePython 2.5.1.1的Windows版本,双击运行即可。 在Windows平台上,由于viewvc使用了Python的Win32扩展模块,所以第一项依赖软件包除了安装官方发布的Python外,还需要Python Win32扩展模块(可以从http://starship.python.net/crew/mhammond/win32/http://192.168.1.106:8080/confluence/images/icons/linkext7.gif下载)。为了省去另行安装的麻烦,可以使用ActiveState提供的Windows版的ActivePython,它包含了Python Win32扩展模块,使得安装更为便捷。
[*]下载ViewVC: svn co http://viewvc.tigris.org/svn/viewvc/trunkhttp://192.168.1.106:8080/confluence/images/icons/linkext7.gif ViewVC --username guest --password "" --no-auth-cache
[*]安装ViewVC: python viewcvs-install
[*]安装Subversion Python绑定。
[*]安装Highlight。 Enscript和highlight都可以对代码进行语法加亮、颜色标注,但由于Enscript相对比较旧,支持的语言相对较少,而且本身又有依赖,所以第三项依赖软件包采用功能更丰富、开发相对比较活跃的highlight。
[*]安装cvsgraph。
[*]配置ViewVC。配置的主要信息有cvs或svn的代码仓库的位置,cvsnt或rcs命令的位置。这些信息都配置在%ViewVC安装目录%\viewcvs.conf文件中。
cvs_roots指定cvs代码仓库的位置;svn_roots指定svn代码库的位置,它们俩使用相同的语法:每个仓库指定一个名称,然后指定仓库的绝对路径,两者冒号隔开。如果每个代码仓库指定多个代码库,用逗号分隔。
示例代码如下: cvs_roots = new technology: C:\cvs_repos\new_tech,
legacy code: C:\cvs_repos\legacy_code,
project1: C:\cvs_repos\project1,
porject2: C:\cvs_repos\project2
svn_roots = new technology: C:\svn_repos\new_tech,
legacy code: C:\svn_repos\legacy_code,
project1: C:\svn_repos\project1,
project2: C:\svn_repos\project2
如果有多个代码仓库需要让ViewVC来通过Web展示,使用roots_parents参数,如:roots_parents = C:\cvs_repos : cvs, C:\svn_repos : svn。
ViewVC需要使用cvs或svn的可执行程序访问代码仓库,相关参数为:cvsnt_exe_path和svn_path。
启用CVS代码修订历史图形显示功能需要设置参数use_cvsgraph = 1,并设置cvsgraph_path为cvsgraph.exe的绝对路径(如果不在环境变量PATH中)。
启用Highlight与上面相似。
[*]整合ViewVC和Apache。在%apache安装目录%\conf\httpd.conf中添加以下内容:ScriptAlias /viewvc/ "%ViewVC安装目录%/bin/cgi/"
[*]安装Jira的SVN Plugin。
拷贝jira-svn-plugin到相关目录,并把subversion-jira-plugin.properties拷到%Jira文件目录%\WEB-INF\classes\下。
[*]整合Jira、SVN和ViewVC。在%Jira文件目录%\WEB-INF\classes\subversion-jira-plugin.properties中,配置svn.root和#ViewVC段的内容。见示例配置文件http://192.168.1.106:8080/confluence/images/icons/link_attachment_7.gif。
页:
[1]