svn server安装配置

安装平台:RHEL5
1.安装软件:httpd、subversion、mod_dav_svn
2.修改配置
修改/etc/httpd/conf.d/subversion.conf。eg:
LoadModule dav_svn_module     modules/mod_dav_svn.so                                                                      
LoadModule authz_svn_module   modules/mod_authz_svn.so                                                                    
                                                                                                                          
#                                                                                                                         
# Example configuration to enable HTTP access for a directory                                                             
# containing Subversion repositories, "/var/www/svn".  Each repository                                                    
# must be readable and writable by the 'apache' user.                                                                     
#                                                                                                                         
# Note that if SELinux is enabled, the repositories must be labelled                                                      
# with a context which httpd can write to; this will happen by default                                                    
# for newly created directories in /var/www.  Use the command                                                             
# "restorecon -R /var/www/svn" to label the repositories if migrating                                                     
# from a system without SELinux enabled; to label a repository outside
# /var/www, use "chcon -R -h -t httpd_sys_content_t /path/to/repos".
#

#
# To create a new repository using this scheme, say,
# http://localhost/repos/stuff, run as root:
#
#   # cd /var/www/svn
#   # svnadmin create stuff   
#   # chown -R apache.apache stuff
#

<Location /repos>
   DAV svn
   SVNParentPath /var/www/svn

#   # Limit write permission to list of valid users.
#   <LimitExcept GET PROPFIND OPTIONS REPORT>
#      # Require SSL connection for password protection.
#      # SSLRequireSSL
#
      AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile /var/www/svn/passwdfile
      Require valid-user
#   </LimitExcept>
</Location>
3.权限更改
安装完apache httpd后,系统默认会增加一个apache用户及apache组。apache系统是用apache用户去访问linux文件系统的。
chown -R apache:apache /var/www/svn
4.创建svn代码仓库
svnadmin create /var/www/svn/sample
5.创建svn用户
htpasswd -b /var/www/svn/passwdfile user1 password1

上一篇:【转载】Python日期时间模块datetime详解与Python 日期时间的比较,计算实例代码


下一篇:javascript各种专业名词