簡介
WebSVN是一個(gè)基于Web的Subversion Repository瀏覽器。它將Subverion的各種功能操作通過Web界面提供出來。通過它,可以看到任何給定版本的任何文件或者目錄的日志,并且可看到所有文件改動、添加、刪除的列表。同樣可以查看兩個(gè)版本間的差異來知道特定版本改動了什么。
編譯安裝方法
1.配置編譯環(huán)境
1)安裝wget工具。
yum install wget -y
2)安裝WebSVN依賴包。
yum install apr apr-util pcre httpd php svn enscript zip -y
----結(jié)束
2.獲取源碼
獲取“websvn-2.3.3”源碼包。
cd /var/www/html/
wget https://github.com/websvnphp/websvn/archive/2.3.3.zip -O websvn-2.3.3.zip
3.編譯和安裝
1)解壓軟件包,安裝WebSVN。
cd /var/www/html/
unzip websvn-2.3.3.zip
mv websvn-2.3.3 websvn
2)配置WebSVN。
a)進(jìn)入“include”目錄。
cd /var/www/html/websvn/include
b)配置“config.php”。
cp distconfig.php config.php
vi config.php
在“Configuration parameters”中將參數(shù)改為如下:
$config->setSVNCommandPath('/usr/bin');
$config->setDiffPath('/usr/bin');
$config->setEnscriptPath('/usr/bin');
$config->setSedPath('/bin');
$config->setTarPath('/bin');
$config->setGZipPath('/bin');
$config->parentPath('/var/svn/');
“$extEnscript['.pas'] = 'pascal';”位置下面新增加內(nèi)容如下:
$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";
3)運(yùn)行apache服務(wù)器。
systemctl start httpd
----結(jié)束
?4.運(yùn)行和驗(yàn)證
在瀏覽器中輸入“http://[ECS IP]/websvn”即可瀏覽WebSVN版本庫。