CentOS:svn服务器安装
Svn及相关模块的安装
yum install subversion mod_dav_svn mod_authz_ldap
初始化svn库
mkdir /home/svn
svnadmin create /home/svn/repos
设置Apache的访问权限
chown -R apache.apache repos
然后修改配置文件
vim /etc/httpd/conf.d/subversion.conf
主要修改内容如下:
<Location /svn> DAV svn SVNParentPath /home/svn AuthType Basic AuthBasicProvider ldap AuthzLDAPAuthoritative off AuthLDAPURL "ldap://127.0.0.1:389/dc=brilliance,dc=com?uid?sub?(objectClass=*)" AuthName "Nice to meet you,but you know..." AuthzSVNAccessFile /home/svn/authz.conf Require valid-user </Location>
Svn地址:
http://192.168.1.9/svn/repos
重启Apache 即可
service httpd restart
附注: 若svn提交失败,提示Permission denied,是因为svnadmin创建库时是root用户,导致apache无法访问。解决方式:
chown –R apache.apache /home/svn/documents
chmod 775 /home/svn/documents