首页 > 代码库 > CentOs+Apache+websvn的配置必须成功版!

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

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的配置必须成功版!