티스토리 뷰

1. Subversion 설치


Subversion을 설치한 후 진행


2. 서비스 설치


#서비스 등록

sc create svn binpath= "C:\Program Files (x86)\Subversion\bin\svnserve.exe --service -r D:\Repository2" displayname= "Subversion Server 2" depend= Tcpip start= auto

 

#서비스 해제

sc delete svn displayname= "Subversion Server"


3. 환경설정

스크립트로 저장소를 생성하면 설정파일을 교체하여 모든 저장소가 동일한 ID/PW로 동작할 수 있도록 생성함




저장소 생성 스크립트(repcreate.bat)

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
 
@ECHO runasadmin > %windir%\system32\runasadmin.txt
IF NOT EXIST %windir%\system32\runasadmin.txt GOTO NOT_RUNASADMIN
DEL /s /q %windir%\system32\runasadmin.txt > nul
 
CD /d "%~dp0"
 
CALL :GETARGC ARGC %*
 
IF %ARGC% LSS 1 (
    GOTO USAGE
)

SET REPBASEPATH=D:\Repository2\
SET REPTEMPNAME=%~1
CD /d "%REPBASEPATH%"
svnadmin create --fs-type fsfs "%REPTEMPNAME%"
DEL "%REPBASEPATH%\%REPTEMPNAME%\conf\svnserve.conf"
DEL "%REPBASEPATH%\%REPTEMPNAME%\conf\authz"
DEL "%REPBASEPATH%\%REPTEMPNAME%\conf\passwd"
MKLINK "%REPBASEPATH%\%REPTEMPNAME%\conf\svnserve.conf" "D:\Repository2\svnserve.conf"

GOTO END_STEP

:NOT_RUNASADMIN
ECHO.
ECHO.
ECHO.
ECHO =========================================
ECHO Run as Administrator
ECHO =========================================
ECHO.
ECHO.
ECHO.
REM PAUSE
GOTO END_STEP
 
:USAGE
ECHO.
ECHO * Usage:
ECHO.
ECHO ex) %~n0 NEW_REPOSITORY_NAME
ECHO.
REM PAUSE
GOTO END_STEP
 
:GETARGC
SET GETARGC_V0=%1
SET /a "%GETARGC_V0% = 0"
:GETARGC_L0
IF NOT x%2x==xx (
    SHIFT
    SET /a "%GETARGC_V0% = %GETARGC_V0% + 1"
    GOTO :GETARGC_L0
)
SET GETARGC_V0=
GOTO :eof
 
:END_STEP
ENDLOCAL

:END

passwd

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
kiros33 = kiros33


authz

### This file is an example authorization file for svnserve. ### Its format is identical to that of mod_authz_svn authorization ### files. ### As shown below each section defines authorizations for the path and ### (optional) repository specified by the section name. ### The authorizations follow. An authorization line can refer to: ### - a single user, ### - a group of users defined in a special [groups] section, ### - an alias defined in a special [aliases] section, ### - all authenticated users, using the '$authenticated' token, ### - only anonymous users, using the '$anonymous' token, ### - anyone, using the '*' wildcard. ### ### A match can be inverted by prefixing the rule with '~'. Rules can ### grant read ('r') access, read-write ('rw') access, or no access ### (''). [aliases] # joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average [groups] # harry_and_sally = harry,sally # harry_sally_and_joe = harry,sally,&joe futurelab = kiros33 # [/foo/bar] # harry = rw # &joe = r # * = # [repository:/baz/fuz] # @harry_and_sally = rw # * = r [rep1:/] @futurelab = rw * =



검색: Subversion, SVN, Repository, 저장소, Configuration, 설정, Script, 스크립트




댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함