码迷,mamicode.com
首页 > Web开发 > 详细

CentOs+Apache+websvn的配置必须成功版!

时间:2014-11-19 02:09:07      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:create

svn的配置必须成功版!

1,# yum install subversion

2,# svnserve --version

3,# mkdir /svndata

4,# svnadmin create /svndata/kuming

5,# vim /svndata/kuming/conf/svnserve.conf

[general]

anon-access = none

auth-access = write

password-db = passwd

authz-db = authz

6,# vim /svndata/kuming/conf/passwd

[users]

beyond = beyond

elisa = elisa

7,# vim /svndata/kuming/conf/authz

 [groups]

# harry_and_sally = harry,sally

admin = beyond,elisa

[/]

beyond = rw

elisa = rw

@admin = rw

* =

8,# svnserve -d -r /svndata

 

CentOs+Apache+SVN必须成功版!

#yum install httpd*

#yum install mod_dav_svn subversion

#service httpd restart

#chkconfig --level 35 httpd on

#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 /svn>

   DAV svn

   SVNParentPath /svn

   AuthzSVNAccessFile /svn/authzfile

   AuthType Basic

   AuthName "Authorization repos"

   AuthUserFile /svn/passwdfile

   Require valid-user

</Location>

#htpasswd -cm /svn/passwdfile beyond

#htpasswd -m /svn/passwdfile elisa

#vi /svn/authzfile

[groups]

admin = beyond

[beyond:/]

* = r

@admin = rw

#cd svn

#svnadmin create beyond

#vi /svn/beyond/conf/svnserve.conf

  anon-access = read

  auth-access = write

#chown -R apache.apache beyond

#service httpd restart

测试:http://172.16.4.112/svn/beyond/

websvn必须成功版!!!

========websvn=============

0. 进入/var/www/html下载websvn-2.3.3.tar.gz

1. tar xvf websvn-2.3.3.tar.gz

2. mv websvn-2.3.3.tar.gz websvn

3. cd websvn

4. #vi wsvn.php

     $locwebsvnhttp = ‘/websvn‘;

     $locwebsvnreal = "/var/www/html/websvn";

5. #cd include

6. #cp distconfig.php config.php

7. #vi config.php

      $config->addRepository(‘project‘,‘file:///svn/elisa‘);

      $config->parentPath(‘/svn/elisa‘);

      $config->allowDownload();

8. #vi /etc/httpd/conf/httpd.conf

     <Directory "/websvn/index.php">

     Options Indexes FollowSymLinks

     Options MultiViews

     AllowOverride None

     Order allow,deny

     Allow from all

     </Directory>

9. #vi /etc/httpd/conf.d/websvn.conf

     <Location /var/www/html/websvn/>

     <Location /websvn/> //有验证权限的框

      AuthType Basic

      AuthName "subversion repository"

      AuthUserFile /svn/passwdfile

      Satisfy All

      Require valid-user

     </Location>

10. # chown -R apache.apache html

11. # service httpd restart

12. http://192.168.56.101/websvn


本文出自 “莎吧啦” 博客,请务必保留此出处http://songlisha.blog.51cto.com/6269280/1579235

CentOs+Apache+websvn的配置必须成功版!

标签:create

原文地址:http://songlisha.blog.51cto.com/6269280/1579235

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!