apache配置svn_使用APACHE Web服务器配置SVN

apache配置svn

Setting up SVN Server using Windows and Apache

使用Windows和Apache设置SVN服务器

Purpose of the document:

文件目的:

      This article will explain the process of how to configure SVN repository in a windows environment using APACHE web server.

本文将说明如何使用APACHE Web服务器在Windows环境中配置SVN存储库的过程。

What is SVN? (http://subversion.tigris.org/)

什么是SVN? ( http://subversion.tigris.org/

      Subversion (SVN) is a version control system initiated in 1999 by CollabNet Inc. It is used to maintain current and historical versions of files such as source code, web pages, and documentation. Its goal is to be a mostly-compatible successor to the widely used Concurrent Versions System (CVS).(WIKI link : http://en.wikipedia.org/wiki/Svn_%28software%29)

Subversion(SVN)是由CollabNet Inc在1999年启动的版本控制系统。它用于维护文件的当前和历史版本,例如源代码,网页和文档。 它的目标是成为广泛使用的并行版本系统(CVS)的主要兼容继承者。(WIKI链接: http : //en.wikipedia.org/wiki/Svn_%28software%29

Required software(s):

所需软件:

"      APACHE web Server

“ APACHE Web服务器

      The latest version of APACHE is Apache HTTP Server 2.2.14, more information on installation and download details is available in APACHE web site. http://httpd.apache.org/download.cgi. If you already have IIS running on your machine please make sure you set a different port number for APACHE installation, more info here http://httpd.apache.org/docs/2.0/platform/windows.html (thanks to Garth J Lancaster for pointing out the link)

APACHE的最新版本是Apache HTTP Server 2.2.14,有关安装和下载详细信息,请访问APACHE网站。 http://httpd.apache.org/download.cgi 。 如果您的计算机上已经在运行IIS,请确保为APACHE安装设置了其他端口号,更多信息请参见http://httpd.apache.org/docs/2.0/platform/windows.html (感谢Garth J Lancaster指出链接)

"      SVN Server

SVN服务器

      SVN can be downloaded from the following URL

可以从以下URL下载SVN

http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100 http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100

File name: Setup-Subversion-1.6.4.msi

文件名:Setup-Subversion-1.6.4.msi

"      Tortoise SVN or equivalent client

“ Tortoise SVN或同等客户端

      For accessing the SVN repository you will need client software that needs to be installed, Tortoise SVN is one of the client tools for accessing SVN repository. It can be downloaded from http://tortoisesvn.net/downloads .

要访问SVN存储库,您需要安装客户端软件,Tortoise SVN是用于访问SVN存储库的客户端工具之一。 可以从http://tortoisesvn.net/downloads下载。

IT IS ADVISABLE TO RESTART YOUR MACHINE AFTER THE INSTALLATION.

建议在安装后重新启动机器。

Setting up the repository

设置存储库

STEP 1: Creating a repository

步骤1:建立储存库

On the server, create a directory D:\SourceCodeRepos, this directory will hold the files of our source code repos.

在服务器上,创建目录D:\ SourceCodeRepos,该目录将保存我们的源代码仓库的文件。

Open Command Prompt and type

打开命令提示符并键入

svnadmin create D:\SourceCodeRepos

svnadmin创建D:\ SourceCodeRepos

(If you get an error bad command or filename then add the SVN bin path to the environment variables. Go to Desktop à right click MyComputer > Properties > -> Advanced -> Environment Variables > Path > Edit > dont overwrite the existing one> copy the bin path of SVN (generally it is c:\Program Files\Subversion\bin) in the end.)

(如果收到错误的错误命令或文件名,则将SVN bin路径添加到环境变量。转到桌面à右键单击MyComputer>属性>->高级->环境变量>路径>编辑>不要覆盖现有的>复制最后是SVN的bin路径(通常是c:\ Program Files \ Subversion \ bin)。

STEP 2: Configure APACHE to work with SVN

步骤2:配置APACHE以与SVN一起使用

Copy the SVN modules to APACHE

将SVN模块复制到APACHE

      The SVN modules are available inside (C:\Program Files\Subversion\bin), copy these two files (mod_authz_svn.so and mod_dav_svn.so) to c:\Program Files\Apache Software Foundation\Apache2.2\modules

SVN模块位于(C:\ Program Files \ Subversion \ bin)内部,将这两个文件(mod_authz_svn.so和mod_dav_svn.so)复制到c:\ Program Files \ Apache Software Foundation \ Apache2.2 \ modul es

Open C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf, and append the following lines to it

打开C:\ Program Files \ Apache Software Foundation \ Apache2.2 \ conf \ httpd.conf ,并在其后附加以下几行

#This will load the SVN modules so that APACHE can communicate with SVN Server

#这将加载SVN模块,以便APACHE可以与SVN服务器通信

LoadModule  dav_svn_module modules/mod_dav_svn.so

LoadModule dav_svn_module模块/mod_dav_svn.so

LoadModule  authz_svn_module modules/mod_authz_svn.so

LoadModule authz_svn_module模块/mod_authz_svn.so

Add the following line to the end of the same conf file

将以下行添加到同一conf文件的末尾

Include c:/etc/subversion.conf

包括c:/etc/subversion.conf

Step 3: Configure Authentication parameters and SVN Repository link

步骤3:配置身份验证参数和SVN存储库链接

Create a new directory c:\etc. Create 3 files inside this directory

创建一个新目录c:\ etc。 在此目录中创建3个文件

Name of the file      

文件名

subversion.conf      

subversion.conf

Content of the file

文件内容

<Location /SourceCodeRepos>

<Location / SourceCodeRepos>

  DAV svn

DAV SVN

  SVNPath D:/SourceCodeRepos

SVNPath D:/ SourceCodeRepos

  AuthType Basic

AuthType基本

  AuthName "Subversion Kinetics repository"

AuthName“ Subversion Kinetics存储库”

  AuthUserFile c:/etc/svn-auth-file

AuthUserFile c:/ etc / svn-auth-file

  Require valid-user

需要有效用户

  AuthzSVNAccessFile c:/etc/svn-acl

AuthzSVNAccessFile c:/ etc / svn-acl

</Location>

</ Location>

name of the file

文件名

svn-auth-file      

svn-auth-文件

#EMPTY FILE

#空的文件

Name of the file

文件名

svn-acl      

svn-acl

Content of the file

文件内容

#

# specify groups here

#在此处指定组

#

[groups]

[团体]

developers = harry,sally

开发人员=哈利,莎莉

#

# team1 group has a read/write access to source code repository

#team1组具有对源代码存储库的读/写访问权限

# all subdirectories

#所有子目录

# all others have read access only

#所有其他人只有读权限

#

[SourceCodeRepos:/]

[SourceCodeRepos:/]

@developers = rw

@开发者= rw

* = r

* = r

Now RESTART the APACHE WEB SERVER, so that it can load the SVN modules and point to your directory.

现在,重新启动APACHE WEB服务器,以便它可以加载SVN模块并指向您的目录。

Step 4: Setting up authentication parameters

步骤4:设置身份验证参数

      Now that the repository is configured we need to create the username / password for accessing the repository

现在已经配置了存储库,我们需要创建用于访问存储库的用户名/密码

htpasswd -m c:\etc\svn-auth-file user1

htpasswd -mc:\ etc \ svn-auth-file user1

htpasswd -m c:\etc\svn-auth-file user2

htpasswd -mc:\ etc \ svn-auth-file user2

htpasswd -m c:\etc\svn-auth-file user3

htpasswd -mc:\ etc \ svn-auth-file user3

This will create 3 users and the usernames will be appended to the svn_auth_file that was created in the previous step.

这将创建3个用户,并将用户名附加到上一步中创建的svn_auth_file中。

Checking your Configurations

检查您的配置

Open the URL from the server as http://localhost/SourceCodeRepos, this will list the current version number of the repository.

从服务器打开URL作为http:// localhost / SourceCodeRepos ,这将列出存储库的当前版本号。

Now from any other machine (connected to the server), install Tortoise SVN and create a new working folder (eg: D:\Dev), Windows explorer to the folder D:\Dev, right click and select SVN Checkout, specify the URL of your source code control, (eg: http://servername/SourceCodeRepos) if asked for username and password, please provide the username and password that you have created in the earlier steps. Your SVN Source repository is ready to use.

现在,从任何其他机器(连接到服务器)上,安装Tortoise SVN并创建一个新的工作文件夹(例如:D:\ Dev),将Windows资源管理器添加到文件夹D:\ Dev,右键单击并选择SVN Checkout,指定URL源代码控件的名称(例如: http:// servername / SourceCodeRepos ),如果要求输入用户名和密码,请提供您在前面的步骤中创建的用户名和密码。 您的SVN Source存储库已准备就绪,可以使用。

Now test your environment by adding a new file to the repos and committing the changes. More information on how to create new files / folders is available in the SVN book which is freely downloadable.

现在,通过将新文件添加到存储库并提交更改来测试环境。 SVN书中提供了有关如何创建新文件/文件夹的更多信息,该书可免费下载。

Setting-up-SVN-Server-using-Wind.doc 设置SVN服务器使用Wind.doc

翻译自: https://www.experts-exchange.com/articles/2028/Configure-SVN-with-APACHE-web-Server.html

apache配置svn

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值