如何在CentOS 7中安装WebSVN进行Subversion
时间:2020-03-05 15:28:17 来源:igfitidea点击:
WebSVN为Subversion存储库提供了一个视图,该存储库旨在反映颠覆方法。
我们可以查看任何文件或者目录的日志,并查看在任何给定版本中添加或者删除的所有文件的列表。
我们还可以查看文件的两个版本之间的差异,以便准确查看特定修订版中的更改。
安装Apache SVN(Subversion)后,我们需要遵循以下简单步骤。
1.下载Websvn.
我们可以从官方http://www.websvn.info/download/下载Websvn。
我们将首先进入目录/var/www/html /然后下载包内的包。
$sudo -s
如需切换到root权限,请在shell或者终端中执行以上命令,以便我们可以完全访问系统的受限区域。
# cd /var/www/html # wget http://websvn.tigris.org/files/documents/1380/49057/websvn-2.3.3.zip
其中我下载了WebSVN的最新版本2.3.3.
我们可以从获取链接。
我们可以简单地将上述链接替换为我们想要安装的包的链接。
2.提取下载的zip
# unzip websvn-2.3.3.zip
# mv websvn-2.3.3 websvn
3.安装PHP.
# yum install php
4.编辑WebSVN配置
现在,我们需要复制位于/var/www/html/websvn/include目录的distconfig.php to config.php,然后编辑配置文件。
# cd /var/www/html/websvn/include
# cp distconfig.php config.php
# nano config.php
现在,我们需要更改文件,如下所示。
完成后,请保存文件并退出。
//Configure these lines if your commands aren't on your path. // $config->setSVNCommandPath('/usr/bin'); //e.g. c:\program files\subversion\bin $config->setDiffPath('/usr/bin');
//For syntax colouring, if option enabled... $config->setEnscriptPath('/usr/bin'); $config->setSedPath('/bin');
//For delivered tar包s, if option enabled... $config->setTarPath('/bin');
//For delivered GZIP'd files and tar包s, if option enabled... $config->setGZipPath('/bin');
// $config->parentPath('/svn/');
$extEnscript[".pl"] = "perl"; $extEnscript[".py"] = "python"; $extEnscript[".sql"] = "sql"; $extEnscript[".java"] = "java"; $extEnscript[".html"] = "html"; $extEnscript[".xml"] = "html"; $extEnscript[".thtml"] = "html"; $extEnscript[".tpl"] = "html"; $extEnscript[".sh"] = "bash";
5.启动Websvn.
现在,我们几乎已经完成了。
我们现在需要重新启动Apache服务器。
我们可以通过下面的命令来执行此操作。
# systemctl restart httpd.service
然后,我们将在我们喜欢的浏览器内打开WebSVN,并使用地址作为http://ip-address/websvn或者我们在本地计算机上,我们可以转到http://localhost/websvn。
注意:如果我们遇到错误,如"无法在位置查找"Enscript"工具"/usr/bin/setscript",则需要使用命令"yum安装ensictiont"来安装Ensemit,这将解决问题。