1. Server Installation
(1) install the ssh server and subversion server
Yum update <br/> yum install openssh-server <br/> yum install subversion
(2) create a user logging on to svn
Useradd login y; add login y user <br/> groupadd svn; add svn user group <br/> usermod-a-G svn login y; add login y user to svn User Group
In addition, if the fify user does not exist, you can use the following statement to replace the preceding three sentences:
Useradd-g svn y
Reference: http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/
(3) create user Storage
Mkdir/home/sort y/svn <br/> mkdir/home/sort y/trunk <br/> svnadmin create/home/sort y/svn/trunk
(4) grant permissions to the svn User Group
Chown-R root: svn/home/y/svn/trunk <br/> chmod-R g + rws/home/y/svn/trunk/* grant the read and write permissions to the svn group, you can change the corresponding permissions */<br/> chmod-R o-rwx/home/y/svn/trunk/* as needed to delete the read, write, and execute permissions of other irrelevant personnel, by default, other users may have the read permission */
(5) generate a key for a member
Switch users:
Su Y
Generate a key pair:
Ssh-keygen-B 1024-t rsa-N passwd-f policykey
Passphrase is the key keyword (equivalent to a password), which is customized by the user. policykey is the key file name. After the key is generated, two files, yykey and fifykey, are generated. pub, where the former is the key and the latter is the public key. rsa indicates that rsa is used for encryption. If this parameter is set to dsa, dsa is used for encryption.
(6) Create the/home/fify/. ssh directory, copy the public key, and rename it as authorized_keys to the directory:
Cp fifykey. pub/home/fify/. ssh/authorized_keys
Note: The file name must be authorized_keys.
(7) Change Resource Access Permissions
Modify the/home/fify/svn/trunk/conf/svnserve. conf file and add the following lines to general:
Anon-access = none // unauthenticated users do not have any access permissions <br/> auth-access = write // Authenticated Users have write permissions <br/> authz-db = authz // The authentication file is the authz file under the conf directory.
Modify the/home/fify/svn/trunk/conf/authz file (if not, create the file) and add:
[/] // The access permission is the root directory of the resource (and the following directories). <br/> permission y = rw // permission y indicates that the access permission is "read + write"
You can also perform authentication using the following methods:
[Groups] <br/> svn = y, sim // defines the user group svn contains two users: policy and sim </p> <p> [/] <br/> @ svn = rw // The access permission of members of the svn user group is "read + write". <br/>
2. log on to the server using PuTTY in windows
Note: The following operations are performed in windows!
(1) download PuTTY-Related Files
Download the following files: pageant.exe, putty.exe, puttygen.exe
(2) generate a PuTTY key
Enter the policykeyfile () in windows, open the puttygen.exe file, select conversions-> Import key, select the policykey file, and enter the previously set passphrase. some information about the key is displayed. Click Save private key to generate the ppk file (assuming it is saved as the policykey. ppk file), that is, the key used by PuTTY.
(3) Use PuTTY to log on to the server
Open putty.exe and enter the server address in the session. Port: 22. In Connection-> SSH-> Auth, select Browse, select the generated policykey. ppk file, and click log on. Enter passphrase to log on. If you can log on to the system after entering passphrase, the setting is successful.
3. Use TortoiseSVN to log on
(1) set TortoiseSVN login Mode
Right-click the directory in which the svn file will be stored (blank space), select TortoiseSVN-> Settings-> Network-> SSH client, and enter: C:/Program Files/TortoiseSVN/bin/TortoisePlink.exe
(2) Enable pageant
Open pageant.exe, right-click the small icon on the right of the taskbar, and select Add Key to Add the generated fifykey. ppk.
(3) log on to resources
Right-click the directory where the svn file will be stored (blank space), choose TortoiseSVN-> RepoBrowser, enter URL: svn + ssh: // fify@10.61.1.91:/home/fify/svn/trunk, now you can see the resource list stored in trunk!
4. Reference
1. Use SVN: http://blog.csdn.net/laverock/archive/2008/03/18/2195290.aspx in Ubuntu
2. SVN server-side permission configuration: http://doc.iusesvn.com/show-8-1.html
3. Linux User Management: http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/
4. Authentication Failure: http://topic.csdn.net/u/20090630/11/c8610589-b4e2-48e8-a55e-3422d7ae6e62.html