This section describes how to set up the svn server in windows. Here, we will share with you some suggestions and hope they will be useful to you.
1. Software Download
(1) SVN http://subversion.apache.org/packages.html#windows I installed win32svn (32-bit client, server and bindings, MSI and zips; maintained by David darj) This version;
(2) download the Subversion Windows client tortoisesvn. Tortoisesvn is a tool used to expand Windows shell. It can be seen as a plug-in for Windows resource manager. After installation, Windows can identify the working directory of subversion. The official website is tortoisesvn. The download method is similar to that of the svn server. On the download page, we can select the version to download.
2. server and client Installation
Windows SVN server construction, Server Installation, directly run the Setup-Subversion-1.7.0.msi, according to the prompts to install, so we have a set of servers can run the environment. Install tortoisesvn, also directly run the TortoiseSVN-1.7.0.22068-win32-svn-1.7.0.msi according to the prompts to install, but after the completion of the last will prompt whether to restart, in fact, restart is just to make SVN work copy in the special style of Windows effective, it has nothing to do with all the actual functions. In order to immediately see the good results, restart the machine.
3. Create a version Library (repository)
To run the Subversion server, you must first create a version Library (repository), which can be viewed as a database for storing data on the server.
In the doscommand mode, enter the installation directory of the svn server, for example, c: \ Program Files \ subversion \ bin. Run svnadmin create E: \ svnsource \ repository and E: create a version Library Under \ svnsource \ repository.
We can also use tortoisesvn to perform this step graphically: Right-click the directory e: \ svnsource \ repository and choose tortoisesvn> createrepositoryhere... ", then you can select the version library mode. Here you can use the default mode, and then create a series of directories and files.
4. Configure users and permissions
To build the svn server in windows, go to the E: \ svnsource \ repository \ conf directory and modify svnserve. conf:
# [General]
# Password-DB = passwd
Remove # change:
[General]
Password-DB = passwd
If you don't want everyone to get your source code, open the svnserve. conf file in the same directory
# Change anon-access = read
Anon-access = none
Modify the passwd file in the same directory and remove the following three lines of comment:
# [Users]
# Harry = harryssecret
# Sally = sallyssecret
Finally changed:
[Users]
Harry = harryssecret # create your user here, format username = password, for example, admin = xzsoft
Sally = sallyssecret
5. Create a Windows Service
SC create svnservice binpath = "C: \ Program Files \ subversion \ bin \ svnserve.exe -- service-R E: \ svnsource \ repository" displayname = "svnservice" depend = TCPIP start = auto
Note:
{SVN} is the service name
{C: \ Program Files \ subversion \ bin \ svnserve.exe} is the svn installation directory.
{E: \ svnsource \ repository} is the directory of the SVN version library.
{Svnservice} is the service display name.
1.to enable svnserve.exe.exe to start with --service.exe, other options of svnserve.exe must be specified on the same line, but you cannot use conflicting options, such as -- daemon (-D)
,-Tunnel or -- inted (-I), and the option-R or-Listen-port is no problem.
2.when using SC .exe, you must pay attention to spaces. In key = value mode, there must be no spaces before key = and a space before = and value.
3. Note the space in the command to be executed. If the directory name contains spaces (or other characters to be avoided), you must put the entire binpath value in double quotation marks to avoid these characters.
6. initialize the Import
Create a directory for testing to be checked in SVN, for example, E: \ svndemo \. The directory contains a readme.txt file: Right-click the svndemo directory-> tortoisesvn-> Import...
After entering "SVN: // localhost/" OK in the URL of repository, the directory remains unchanged. If no error is reported, all the data has been imported to the version library we just defined.
Note that this step can be performed on another host with tortoisesvn installed. For example, if the IP address of the host running svnserve is 133.96.121.22, the content entered in the URL section is "SVN: // 133.96.121.22 /".
Configuration complete.