Linux系统搭建Apache+SVN(CentOS6.5)

SVN安装部署在前几篇博客中有


1.安装软件

    # yum install httpd

    # yum install mod_dav_svn

    # yum install subversion


2.测试是否成功

    # httpd -version

    # svnserve --version


3.配置

   修改所有者

    # chown -R apache:apache svnrepos (此处svnrepos为svn资源库位置 若全路径则为/var/svn/svnrepos)

   copy  /var/svn/svnrepos/conf 下的 authz到 /var/svn下,并创建passwd文件

    # cp /var/svn/svnrepos/conf/authz /var/www/svn/authz

    # cd /var/svn

    # vi passwd

    :wq保存退出


    生成账号:

    # htpasswd /var/svn/passwd user1

    输入密码,生成user1账号

    权限管理设置:

    # vi /var/svn/authz

    

     在[groups]下添加组,

     [/] 相当于/var/svn这个目录,赋予权限给用户组

     [svnrepos:/] 是指svnrepos

     [svnrepos:/tag]是svnrepos下的tag目录

      [groups]
        admin=user1
        proj1_developer=user2,user3

 
        proj1_desgin=user5,user6
 
        [/]
        @admin=rw
 
        [ svnrepos:/]
        @proj1_developer=rw
 
        [ svnrepos:/tag]
        @proj1_desgin=rw
 

    将svn关联到apache上:

    # vi /etc/httpd/conf.d/subversion.conf

     在底部加上:

    <Location /svn>
   DAV svn
   SVNParentPath /var/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 SVN"
      AuthzSVNAccessFile /var/svn/authz
      AuthUserFile /var/svn/passwd
      Require valid-user
    #   </LimitExcept>
    </Location>

    重启httpd:

    # service httpd restart


4.测试

    http://IP地址:8088/svn/svnrepos/

    apache端口默认80,若改端口则编辑/etc/httpd/conf/httpd.conf中的Listen 80


    


    

你可能感兴趣的:(Linux系统搭建Apache+SVN(CentOS6.5))