Preparatory work:
1. Get the Subversion Server program
Download the latest server Installer to the official website (http://subversion.tigris.org/). In:http://subversion.tigris.org/servlets/projectdocumentlist?folderid=8100&expandfolder=8100& folderid=91
2. Get TortoiseSVN client program
get the latest TortoiseSVN from the official website http://tortoisesvn.net/downloads . TortoiseSVN is a client-side program used to communicate with the subvers server. Subversion comes with a client-side program Svn.exe, but TortoiseSVN is better to operate and improve efficiency.
First, installation
First download a SubVersion, and TortoiseSVN. The former is the server side of svn , which is the client of SVN. Note that the server-side version and the client version must be consistent before the error can occur:
SVN Installation and startup Services -Spring- the door to success
Error * expected file system format "2"; Discovery format "3"
Error occurred during use of subversion * expected file system format "2"; Discovery format "3" Error, this is the server program Subversion and the client program TortoiseSVN version number is inconsistent. Remove Subversion and legacy repositories, reinstall Subversion and TortoiseSVN with the same version , the problem can be solved.
Second, build the repository (Repository)
Running the Subversion server requires that you first build a repository (Repository). Repositories can be seen as places where data is centrally stored and managed on the server.
Start building the repository. Start by establishing the e:\svn empty folder as the root directory for all repository. Then, go to the command line and switch to the subversion bin directory. Enter the following command:
Svnadmin Create E:\svn\repos1
This command establishes a repository repos1 under E:\svn . repos1 Some folders and files are automatically generated below.
We can also use TortoiseSVN to graphically complete this step:
First set up empty directory E:\svn\repos1 , notice must be empty. Then on the repos1 folder, right - ->tortoisesvn->create Repository here ... , then you can select the repository mode, which uses the default FSFS , and then create a series of folders and files that are created as the command line.
Third, set the user name and password
Setting the user name and password is used when the item has been modified between members after the injury. Let's set up a username and password. find a file called svnserve.conf in the Conf folder under the Library folder you just built . Open it with a text editor. Then find # # password-db = passwd This line of code. Remove the # Sign of this line of code and make sure there are no spaces shelf. # indicates comments, minus # and spaces to enable the encryption file.
Then conf folder to find a file called password , the same text editor open, and then see the following code:
[Users]
# Harry = Harryssecret
# sally = Sallyssecret
These two lines are two user names and passwords, preceded by a user name, followed by a password, and one line is a user. We can add our own username directly below it, or we can delete it and rewrite it. For example:
[Users]
Test=test
Save it after you've written it.
Iv. Start-up service
The same is done under the bin file under the installation directory svnserve-d-R E:\svn\repos1
Our server program has been started. Be careful not to close the command-line window, and close the window will also stop svnserve .
This is inconvenient, the solution is to add services to the Windows system services. Here's how:
C:\>SC Create Svnserve binpath= "E:\Subversion\bin\svnserve.exe--service--root
E:\SVN\repos1 "Displayname=" Subversion "depend= tcpip start= Auto
Note: You need a space between the equals sign and the value, I just got this pit for half a day, see below for details
This will enable our server program to start automatically when Windows starts.
SVN installation and self-boot settings