============== Set up the svn server in Linux ========================
1 environment:
The server is placed on redhatas4.0, and the client is on Windows 2000.
2 software packages
2.1 Server:
Subversion-1.3.2-1.rh90.i386.rpm. Other dependent components may also be used. In my settings, the following components are used: Apr-
0.9.5-0.2.i386.rpm,
Neon-0.24.7-1.i386.rpm, apr-util-0.9.5-0.1.i386.rpm.
2.2 client:
TortoiseSVN-1.3.2.5840-svn-1.3.0
3. Install the server
[Root @ localhost root] # rpm? IVH apr-0.9.5-0.2.i386.rpm
[Root @ localhost root] # rpm? IVH neon-0.24.7-1.i386.rpm
[Root @ localhost root] # rpm? IVH apr-util-0.9.5-0.1.i386.rpm
[Root @ localhost root] # rpm? IVH subversion-1.3.2-1.rh90.i386.rpm
After the installation is complete, to test whether the installation is successful, enter the following command:
[Root @ localhost root] # svnserve? Version
If the following figure is displayed, the installation is successful:
Svnserve, version 1.4.0 (r21228)
Compiled Oct 12 2006, 10:18:56
Copyright (c) 2000-2006 collabnet.
Subversion is open source software, see
Http://subversion.tigris.org/
This product has DES software developed by collabnet (
Http://www.Collab.Net/
).
The following repository back-end (FS) modules are available:
* Fs_fs: module for working with a plain file (fsfs) repository.
4 SVN settings
4.1 create a version library directory
[Root @ localhost root] # mkdir? P/SVN
SVN is a directory created by myself. Each user designs a name based on the actual situation.
4.2 create a user and manage the version library directory
[Root @ localhost root] # useradd-m-S/bin/bash Lyl
Lyl is the created user name, which can be changed according to habits
4.3 Use the created user to manage the version library directory we just created
[Root @ localhost root] # chown? R Lyl. Lyl/SVN
Use Lyl to manage our version library directory/SVN
4.4 start the server
If you use Lyl to manage the version library directory/SVN, you must convert it to Lyl. The command is as follows:
[Root @ localhost root] # su Lyl
Start SVN Service
[Root @ localhost root] # svnserve-d-r/SVN /;
-D Indicates running in daemon mode (running in the background)
-R/SVN/Specify the root directory as/SVN/
Check whether the server is properly started:
[Svn_leader @ localhost root] $ PS? EF | grep svnserve
If the following information is displayed, the instance is successfully started:
Lyl 6941 1 0? 00:00:00 svnserve-d -- listen-port 9999-r/SVN
5. Create a version Library
[Root @ localhost Home] # cd/SVN
[Root @ localhost svnrepos] # svnadmin create P1;
P1 can be changed. The following directory is available in the P1 Directory: conf Dav dB format hooks locks readme.txt
6. Set the Users Allowed To access test.
Go to conf and run the following command:
[Root @ localhost safety] # cd Conf
Three files are displayed: authz passwd svnserve. conf.
6.1 modify svnserve. conf
[Root @ localhost conf] # vi svnserve. conf
Appears:
[General]
...........................
# Anon-access = read
# Auth-access = write
...........................
# Password-DB = passwd
...........................
# Authz-DB = authz
Modify the content:
[General]
...........................
Anon-access = none
Auth-access = write
...........................
Password-DB = passwd
...........................
Authz-DB = authz
6.2 modify passwd
[Root @ localhost conf] # vi passwd
The file format is as follows:
[Users]
User 1> = PASSWORD 1>
User 2> = PASSWORD 2>
[Users] is required. The following lists the users who want to access SVN. each user has a row. Example:
[Users]
Alan = Password
King = Hello
The user in this example indicates the member of the current test version library.
6.3 modify authz
[Root @ localhost conf] # vi authz
User Group format:
[Groups]
User Group Name> = user 1>, user 2>
One user group can contain one or more users separated by commas. The user must be located in the passwd file. He grants permissions to the user in the file.
Version library directory format:
[/Directory]
@ User Group Name> = permission>
User Name> = permission>
Example:
[Groups]
Admin = Alan
[/]
@ Admin = RW
[/SVN/P1/webproject]
King = RW (indicates that King can read and write all the information in the/SVN/P1/webproject directory)
[/SVN/P1/Web]
ZP = R (indicates that ZP can read all the information in the/SVN/P1/web directory)
By now, the installation and setup of the svn server have been completed.