First step Download
Go to the SVN website to download a new version of SVN
SVN website
The link jumps to the
https://sourceforge.net/projects/win32svn/
To download
Second Step installation
Double-click the setup-subversion-1.8.15.msi you just downloaded
And then keep next.
Once the installation is complete, you will find that we have one more C:\Program in our PATH environment variable Files\tortoisesvn\bin
The third step is to configure the SVN repository
Create an empty directory anywhere on your computer to store SVN resources. I built a svndata under the D-Packing catalogue.
The command line is then executed such as the following command
svnadmin create D:\svnData\svndemo
After execution, a Svndemo directory will be generated under D-disk svndata with a very many generated directories and files.
Enter the Conf directory
Configure the svnserve.conf file. Uncomment the file for example below, in line 77-78.
anno-access = readauth-access = write
The above specifies that anonymous users are allowed to read the repository (assuming that anonymous users are prevented from reading.) Change to anno-access = none). Authorized users to perform read and write operations on the resource pool
Continue to configure the file
Remove the following gaze. In line 27.
password-db = passwd
The SVN repository specified above uses the passwd file to save username, password
Configuring the passwd file in the Conf directory
Add such as the following line
gwcheng = gwcheng
The above adds a user to the SVN repository. Username for Gwcheng. Password is Gwcheng.
After the above configuration, the Svnserver has been configured.
You can then start the SVN service by typing in the name line such as the following command
svnserve -d -r D:\svnData
In the above command, Svnserve is an executable program in the bin directory under the Svnserver installation path, and D:\svnData is where the SVN repository is saved. Execute the command to start Svnserver.
Starting svnserver every time through the command line is a very tedious task. You can use it as a Windows service, and then set the service as a self-initiated Windows service. Each time Windows starts, it initiates the service on its own initiative.
Perform the following naming as an administrator
sc create svn binpath= "C:\Program Files(x86)\Subversion\bin\svnserve.exe --service -r D:\svnData" displayname= "Subversion 服务" depend = Tcpip
This allows you to see the service you just created in the service.
Set it to ON, start, and start the service.
Assume that, for example, the following error occurs, execute the command line as an administrator
[SC] OpenSCManager 失败 5:拒绝訪问。
Execute command line as Administrator win+x
Okay, the SVN service has been successfully installed.
Fourth Step test
Try it with TortoiseSVN.
Advertise the project to the server
Build a directory in any location on your computer and put a few files
I built a test project directory under the e-packing directory and put a few files
Right-click on the test catalogue and select Tortoisesvn–> Import
Fill in the SVN address
Svn//:localhost/svndemo
Here Svndemo is what we created in the third step.
Then enter the Usernamepassword of the third step configuration
So we can publish the project to Svnserver.
Download Project from server
can be downloaded anywhere on the computer, I built a download directory on e-disk to download the project on Svnserver
Right-click on an empty area of the downloaded project directory to select SVN CheckOut
Enter Svnserver address
See for example the following interface means the download is complete
We've seen a lot more files in the downloaded directory, which are loaded from Svnserver.
Okay, SVN wrote it here. And the SVN commit, the synchronization will not be written.
References
Li Gang. Lightweight Java EE Enterprise Application Combat [M]. Electronic industry press, 2014.
Installation and configuration of SVN services under Windows