1. Create a folder in a directory without spaces non-Chinese, as the repository root directory.
For example: D: \ svnDep
2. Create the repository in the root directory and subdirectories that correspond to specific projects - The purpose of this is to make a SVN server can manage multiple projects simultaneously, rather than set up an SVN server for each project - which is obviously a waste the resources.
For example: D: \ svnDep \ CRM
D:\svnDep\ERP
D: \ svnDep \ OA
3. Create Repository
Project as an example to OA
svnadmin create repository path # For example: svnadmin create D: \ svnDep \ OA
The directory structure of the repository Description:
conf: configuration files used by the repository directory
db: storage directory database files stored version of the data
hooks: storage directory repository hooks program
locks: Lock repository directory, database used to track visitors
format: a file storage integers, the integer representing the library hierarchy version
README.txt: Repository Readme
4. Start the server program
SVN server must be running in order to respond to client requests, help us manage project files. So we have to SVN server starts up. There are two ways to start the SVN server, a command-line mode, a Windows service is registered.
(1) command line
# -D represents the background # -r repository root svnserve -d -r D: \ svnDep
Verify service is started:
(2) Service Mode
# MySVNService 服务名 # binpath依次包括: # SVN 安装目录\bin\svnserve.exe # --service 以服务方式启动 Subversion # -r 表示版本库根目录,可以指定单仓库多仓库,这里配置的是多仓库 # start= auto 表示自动启动 # depend= Tcpip 表示依赖 Tcpip 协议 # 特别注意:binpath、start、depend三个参数等号左边都没有空格,右边都有一个空格 sc create MySVNService binpath= "C:\install\Subversion\bin\svnserve.exe --service -r D:\svnDep" start= auto depend= Tcpip