部分内容参考来自(
https://my.oschina.net/HankCN/blog/183254)
1. 安装软件:
yum install subversion httpd php mysql-server mod_dav_svn php-mysql php-pear php-mbstring
2. 集成SVN和Apache
2.1 创建仓库
mkdir -p /var/scottsv/repos
mkdir -p /var/scottsv/trash
svnadmin create /var/scottsv/repos/test
chown -R apache:apache /var/scottsv
2.2 配置apache(vi /etc/httpd/conf.d/php.conf, 在最后添加即可)
<Location /scottsv/>
DAV svn
SVNListParentPath on
SVNParentPath /var/scottsv/repos
AuthType Basic
AuthName "ZGSM SVN"
AuthUserFile /var/scottsv/passwdfile
AuthzSVNAccessFile /var/scottsv/accessfile
Require valid-user
</Location>
2.3 创建密码文件及访问文件
touch /var/scottsv/passwdfile
touch /var/scottsv/accessfile
chown apache:apache passwdfile accessfile
2.4 启动apache并验证svn
service httpd start
2.5 测试
在浏览器里输入http://127.0.0.1/scottsv/test看是否有提示输入用户名密码
3. 安装和配置svnmanager-1.09
3.1.下载svnmanager解压并放置到/var/www/html/下,并改名称
mv svnmanager-1.09 scottsvmgr
3.2 安装VersionControl_SVN
pear install --alldeps VersionControl_SVN-0.3.1
3.3 向http.conf文件添加新内容(vi /etc/httpd/conf/httpd.conf)
<Directory "/var/www/html/scottsvmgr/">
AllowOverride None
Order deny,allow
Deny from all
Allow from all
</Directory>
3.4 创建svnmanager使用的mysql数据库
create database svn;
grant all on svn.* to svnmanager@localhost identified by "svnmanager123456";
flush privileges;
quit;
3.5 更改svnmanager的配置文件(vi /var/www/html/scottsvmgr/config.php)
<?php
$lang = "en_US.UTF-8";
$htpassword_cmd = "/usr/bin/htpasswd";
$svn_cmd = "/usr/bin/svn";
$svnadmin_cmd = "/usr/bin/svnadmin";
$svn_config_dir = "/var/scottsv/svnconfig";
$svn_repos_loc = "/var/scottsv/repos";
$svn_passwd_file = "/var/scottsv/passwdfile";
$svn_access_file = "/var/scottsv/accessfile";
$svn_trash_loc = "/var/scottsv/trash";
$svnserve_user_file="";
$smtp_server = "smtp.163.com";
$dsn = "mysqli://svnmanager:svnmanager123456@localhost/svn";
$admin_name = "admin";
$admin_temp_password = "admin";
?>
其中文件要对应(passwdfile, accessfile):
/etc/httpd/conf.d/php.conf
/var/www/html/scottsvmgr/config.php
3.6 校验