https://subversion.apache.org/packages.html
1. 安装 Subversion
yum install -y subversion
2.安装 mod_dav_svn
yum install -y mod_dav_svn
3. 使用 svnadmin 命令创建svn仓库 手册
svnadmin create /data/svn/repo1
4. 将所属权移交apache
chown -R apache:apache /data/svn/repo1
5. 修改 svn服务配置
vi /data/svn/repo1/conf/svnserve.conf
如下
[general] anon-access = none auth-access = write password-db = passwd authz-db = authz
6. 使用apache工具创建用户名密码文件
htpasswd -c /data/svn/repo1/conf/passwd zxg
7. 继续添加用户
htpasswd /data/svn/repo1/conf/passwd ljt
8. 为用户设置权限
vi /data/svn/repo1/conf/authz
添加内容如下:
[repo1:/] zxg = rw ljt = rw * =
9. 配置Apache HTTP Server
vi /etc/httpd/conf/httpd.conf
放开注释如下内容
Include conf.d/*.conf
10. 配置 Subversion
vi /etc/httpd/conf.d/subversion.conf
增加如下内容:
LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /repo1> DAV svn SVNPath /data/svn/repo1 Authtype Basic AuthName "My Repository" AuthzSVNAccessFile /data/svn/repo1/conf/authz AuthUserFile /data/svn/repo1/conf/passwd Require valid-user </Location>
11. 重启 Apache HTTP Server 服务
service httpd restart
标签:svn,authz,..,CentOS,repo1,conf,apache,data From: https://www.cnblogs.com/zno2/p/6127012.html