People who have used VSS long ago know that SVN is indeed a good concept. The copy-based version management mode solves the confusion of checked-in and checked-out under a single VSS data source. However, I recently found that many people do not install SVN. The manager wrote a blog here to share with you.
Environment:
Win7 System
Myeclipse 8.5ga
Jdk1.6
I. Preparations
First, download the software installation package. (The manager uses svn1.6 as an example.) Two installations are required. Program And one decompressed package.
Setup-Subversion-1.6.6.msi. This is the svn server.
(You can download the latest http://subversion.tigris.org here)
TortoiseSVN-1.6.10.19898-win32-svn-1.6.12.msi is a free open source client for SVN version control systems.
(Http://tortoisesvn.net/downloads can be downloaded here)
The site-1.6.12.zip is the plug-in package for myeclipse.
(Subclipse.tigris.org can be downloaded here)
Ii. Install the svn Server
First install SVN server (that is, Setup-Subversion-1.6.6.msi this), according to the general installation is OK. Then install tortoise (that is, TortoiseSVN-1.6.10.19898-win32-svn-1.6.12.msi ).
When installing tortoise, you will be prompted to restart. You 'd better restart it here.
This is the manager's installation directory.
Setup-Subversion-1.6.6.msi --> subversion directory
TortoiseSVN-1.6.10.19898-win32-svn-1.6.12.msi --> tortoisesvn directory
What is the svnroot directory? Next, let's look at it.
Iii. Create a SVN resource library (repository)
Svnroot is the root directory of the svn repository created by the manager, and a directory named repos is created in this directory. (This directory is the directory that the manager intends to make the svn resource library)
Right-click the Directory and choose tortoisesvn> Create repository here.
After you see that many folders are added to the created repos directory, the resource library is successfully created.
You can also see the command cmd created on the Internet, such as svnadmin create d: \ SVN \ repository.
Iv. Configure users and permissions
Open the created resource library folder (repos), which contains a folder named Conf, which contains SVN configuration information. First open the svnserve. conf file
All the items in front of this line are ignored by comments. You can remove # To make that line take effect, or add new lines by yourself. The manager made three major changes to this file.
Change "# anon-access = read" to "Anon-access = none"
(He indicates that the user who has not been verified has no permissions. Previously, it means that the user who has not been verified can perform read operations. The manager strongly recommends that you set this parameter to none. Otherwise, anyone without verification can view the project file)
Remove "# auth-access = write" # To "auth-access = write"
(Verified users have write operations, and write operations include read operations)
Remove "# password-DB = passwd" # To "password-DB = passwd"
(Password data is stored in the passwd file)
Open the passwd file
Set a username such as manager = jingli
There is also a file authz
This file is mainly used to assign different permissions to users for different directories.
For example:
[Groups]
Team1 = manager, staff
Indicates that a group is defined, and the team members have managers and staff users.
[Repository:/Baz/fuz]
@ Team1 = RW
* = R
Indicates that the Team 1 group has read and write permissions on resources, and the resources have read permissions on all users.
[/Foo/bar]
Manager = RW
* = R
You can also set permissions for individuals like this. The manager has the read and write permissions, and the resource has the read permission for all users.
These can be modified as needed.
V. Run the svn Server
There is a bindirectory svnserve.exe under the installed subversiondirectory. It is invalid to directly run this file. You need to start him in the console. Enter svnserve-D-r d: \ SVN \ svnroot In the CMD command to start the service. (Note that the svnroot file is the resource root directory, instead of the Resource Directory repos ). Of course, the svn service is closed when you close the DOS window. All SVN operations must be performed based on the startup of the server. However, it is uncomfortable to open the doscommand window all the time, so the manager writes a program here to enable it to start automatically.
First, we need to create a system service for svnserve.
Take the manager's local installation directory as an example, enter
SC create svnserver binpath = " D: \ SVN \ subversion \ bin \ svnserve.exe -- service-r d: \ SVN \ svnroot "
Displayname = " Svnserver " Depend = Tcpip start = Auto
Pause
Binpathrefers to the path of svnserve.exe
(Note: if there are spaces in your path, remember to use escape characters/"at the beginning and end of the binpath to box the entire binpath. D: \ SVN \ svnroot indicates the root directory of the svn repository)
Displayname indicates the service name.
Depend indicates that the Protocol is tcpid.
Start indicates automatic start upon startup.
Note: Do not lose a space after the above =
Then we open the service and we can see that our service is already automatically started.
6. Install the subeclipse plug-in
Download the site-1.6.12.zip file. You can see two folders: Features and Plugins.
Use the myeclipse plug-in installation method I mentioned earlier to install the plug-in.
Refer:
Http://www.blogjava.net/zhangyuan/archive/2010/07/28/327371.html)
Note that
When installing the plug-in, remove the org. Tigris. subversion. subclipse. mylyn_3.0.0.jar file in features.
Remove org. Tigris. subversion. subclipse. core_1.6.8.jar and org. Tigris. subversion. subclipse. mylyn_3.0.0.jar from plugins.
The manager uses myeclipse8.5 to configure this SVN set. If these files are not deleted, an error will be reported when myeclipse is started.
In this way, SVN is set up ..