Fedora 13 SVN 服务器搭建

Fedora安装SVN服务器:

1. 软件安装
yum -y install httpd subversion mod_dav_svn

2. 在服务里面使能httpd

3. root下创建SVN repositories路径,设置路径权限:
mkdir -p /var/lib/subversion/repositories
chown -R apache:apache /var/lib/subversion

4. 编写shell脚本,设置可执行属性,放在/bin/make-repos,运行建立SVN 项目,如make-repos svn_prj

#!/bin/shif [ $# -ne 1 ]; then    echo 1>&2 Usage: $0 repository_name    exit 127fiecho "Sudoing...";svnadmin create --fs-type fsfs /var/lib/subversion/repositories/${1}chown -R apache:apache /var/lib/subversion/repositories/${1}chmod -R g+w /var/lib/subversion/repositories/${1}chmod g+s /var/lib/subversion/repositories/${1}/db
5. vi /etc/httpd/conf.d/subversion.conf,添加
<Location /svn>

DAV svn  SVNParentPath /var/lib/subversion/repositories  Satisfy Any  AuthType Basic  AuthName "subversion@tming"  AuthzSVNAccessFile /var/lib/subversion/access.auth  AuthUserFile       /var/lib/subversion/passwords  Require valid-user</Location>
6.建立 password file 和access file:

$ htpasswd -c /var/lib/subversion/passwords ming
$vi /var/lib/subversion/access.auth
[svn_prj:/]
ming=wr

7. 重启 Apache

$ /etc/init.d/httpd restart

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wydydj.html