svn+apache安装配置
1.安装httpd,mod_dav_svn,subversion
yum install -y httpd mod_dav_svn subversion
2.创建仓库
mkdir /var/www/svn cd /var/www/svn svnadmin create repo
chown -R apache:apache repo
3.创建登录账号、密码
htpasswd -bc /var/www/svn/passwd user1 123456
4.修改配置文件 /etc/httpd/conf.d/subversion.conf
<Location /repos>
DAV svn
SVNParentPath /var/www/svn #svn库的根目录
AuthType Basic
AuthName "Authorization Realm" #浏览器登陆时的提示信息
AuthUserFile /var/www/svn/passwd
AuthzSVNAccessFile /var/www/svn/repo/conf/authz
Require valid-user #在authfile中所有的用户都可以访问
</Location>
5.配置svn权限/var/www/svn/repo/conf/authz
[/]
user1=rw
6.启动apache,输入地址访问svn
/etc/init.d/httpd start
http://IP/repos/repo #输入创建的用户名和密码就可以登录了
7.命令测试
svn co http://localhost/repos/repo --username user1 #checkout仓库
svn mkdir "http://localhost/repos/repo/branches" "http://localhost/repos/repo/tags" "http://localhost/repos/repo/trunk" -m "create a new project" --username "user1" #创建项目目录