The Linux configuration installs the SVN service, this configuration environment is centos6.6, the kernel version 2.6.32.
Last Login:sat Mar 14 06:12:56 2015
[Root@svn-server ~]# Cat/etc/redhat-release
CentOS Release 6.6 (Final)
[Root@svn-server ~]# Uname-rm
2.6.32-504.el6.x86_64 x86_64
[Root@svn-server ~]# Rpm-qa Subversion
[Root@svn-server ~]# Yum Install subversion-y
Dependencies resolved
Package Arch Version Repository Size
Installing:
Subversion x86_64 1.6.11-12.el6_6 Updates 2.3 M
Installing for dependencies:
Apr x86_64 1.3.9-5.el6_2 Base 123 K
Apr-util x86_64 1.3.9-3.el6_0.1 Base K
GnuTLS x86_64 2.8.5-14.el6_5 Base 346 k
Libproxy x86_64 0.3.0-10.EL6 Base K
Libproxy-bin x86_64 0.3.0-10.EL6 Base 9.0 k
Libproxy-python x86_64 0.3.0-10.EL6 Base 9.1 k
Neon x86_64 0.29.3-3.el6_4 Base 119 K
Pakchois x86_64 0.4-3.2.EL6 Base K
Perl x86_64 4:5.10.1-136.el6_6.1 Updates Ten M
Perl-module-pluggable x86_64 1:3.90-136.el6_6.1 Updates K
Perl-pod-escapes x86_64 1:1.04-136.el6_6.1 Updates K
Perl-pod-simple x86_64 1:3.13-136.el6_6.1 Updates 212 K
Perl-uri Noarch 1.40-2.el6 Base 117 K
Perl-libs x86_64 4:5.10.1-136.el6_6.1 Updates 578 K
Perl-version x86_64 3:0.77-136.el6_6.1 Updates Wuyi K
Transaction Summary
=============================================================================================================== ======================
Install Package (s)
[Root@svn-server ~]# Mkdir/byrd/svndata-p
[Root@svn-server ~]# svnserve-d-r/byrd/svndata/
[Root@svn-server ~]# ps-ef |grep Svn
Root 1216 1 0 06:31? 00:00:00 svnserve-d-r/byrd/svndata/
[Root@svn-server ~]# Rpm-qa Subversion
Subversion-1.6.11-12.el6_6.x86_64
[Root@svn-server ~]# NETSTAT-TUNLP #lsof-I: 3690
Active Internet connections (only servers)
Proto recv-q Send-q Local address Foreign address State Pid/program Name
TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1053/sshd
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1130/master
TCP 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 1216/svnserve
TCP 0 0:: £ º::* LISTEN 1053/sshd
TCP 0 0:: 1:25:::* LISTEN 1130/master
[Root@svn-server ~]# which svnadmin
/usr/bin/svnadmin
[Root@svn-server ~]# svnadmin create/byrd/svndata/linuxerdox #创建svn版本库 (This is a Subversion repository)
[Root@svn-server ~]# cd/byrd/svndata/linuxerdox/conf/
[Root@svn-server conf]# CP svnserve.conf svnserve.$ (date +%f). conf #备份svnserve. conf profile
[Root@svn-server conf]# sed-i ' s#\# anon-access = read#anon-access = None#g ' svnserve.conf #取消svn匿名访问
[Root@svn-server conf]# sed-i ' s#\# auth-access = write#auth-access = Write#g ' svnserve.conf
[Root@svn-server conf]# mkdir/byrd/svnpasswd #创建公共密码区域
[Root@svn-server conf]# sed-i ' s/\# password-db = passwd/password-db = \/byrd\/svnpasswd\/passwd/g ' svnserve.conf
[Root@svn-server conf]# sed-i ' s/\# authz-db = authz/authz-db = \/byrd\/svnpasswd\/authz/g ' svnserve.conf
[Root@svn-server conf]# diff svnserve.*
12,13c12,13
< # anon-access = Read
< # auth-access = Write
---
> anon-access = None
> auth-access = Write
20c20
< # password-db = passwd
---
> password-db =/byrd/svnpasswd/passwd
27c27
< # authz-db = Authz
---
> authz-db =/byrd/svnpasswd/authz
[Root@svn-server conf]# CP Authz passwd/byrd/svnpasswd/
[Root@svn-server conf]# chmod 700/byrd/svnpasswd/*
[Root@svn-server conf]# ll/byrd/svnpasswd/
Total 8
-RWX------. 1 root 1080 Mar 20:54 Authz
-RWX------. 1 root 309 Mar 20:54 passwd
[Root@svn-server conf]# sed-i ' s#\# Harry] Harryssecret#byrd = Admin#g '/byrd/svnpasswd/passwd
[Root@svn-server svndata]# tail-3/byrd/svnpasswd/authz
[linuxerdox:/]
Byrd = RW
* =
[Root@svn-server svndata]# NETSTAT-TUNLP
Active Internet connections (only servers)
Proto recv-q Send-q Local address Foreign address State Pid/program Name
TCP 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1052/sshd
TCP 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1129/master
TCP 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 1267/svnserve
TCP 0 0:: £ º::* LISTEN 1052/sshd
TCP 0 0:: 1:25:::* LISTEN 1129/master
[Root@svn-server svndata]# Pkill Svnserve
[Root@svn-server svndata]# svnserve-d-r/byrd/svndata/
Linux as a client:
Co:checkout
Ci:commit
Up:update
Ls:list
[Root@svn-server linuxerdox]# SVN Co svn://1.1.1.32/linuxerdox/tmp/--username=byrd--password=admin
-----------------------------------------------------------------------
attention! Your Password for authentication realm:
<svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
Can is stored to disk unencrypted! are advised to configure
Your system so, Subversion can store passwords encrypted, if
Possible. The documentation for details.
Can avoid future appearances of this warning by setting the value
Of the ' store-plaintext-passwords ' option to either ' Yes ' or ' no ' in
'/root/.subversion/servers '.
-----------------------------------------------------------------------
Store Password unencrypted (yes/no)? No
Checked out Revision 3.
[Root@svn-server linuxerdox]# SVN Co svn://1.1.1.32/linuxerdox/tmp/--username=byrd--password=admin
A/tmp/111.txt
Checked out Revision 4.
[Root@svn-server linuxerdox]# ll/tmp/
Total 4
-rw-r--r--. 1 root 21:45 111.txt
[Root@svn-server linuxerdox]# Touch/tmp/abc.txt
[Root@svn-server linuxerdox]# Svn Add/tmp/abc.txt
A/tmp/abc.txt
[Root@svn-server linuxerdox]# Svn CI
SVN: '/byrd/svndata/linuxerdox ' is not a working copy
[Root@svn-server linuxerdox]# Svn ci-m "abc"
SVN: '/byrd/svndata/linuxerdox ' is not a working copy
[Root@svn-server linuxerdox]# cd/tmp/
[Root@svn-server tmp]# Svn ci-m "abc"
Authentication Realm: <svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
Password for ' Byrd ':
-----------------------------------------------------------------------
attention! Your Password for authentication realm:
<svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
Can is stored to disk unencrypted! are advised to configure
Your system so, Subversion can store passwords encrypted, if
Possible. The documentation for details.
Can avoid future appearances of this warning by setting the value
Of the ' store-plaintext-passwords ' option to either ' Yes ' or ' no ' in
'/root/.subversion/servers '.
-----------------------------------------------------------------------
Store Password unencrypted (yes/no)? No
Adding abc.txt
Transmitting file data.
Committed revision 5.
[Root@svn-server tmp]# SVN Co file:///byrd/svndata/linuxerdox/tmp/--username=byrd--password=admin
SVN: '/tmp ' is already a working copy for a different URL
[Root@svn-server tmp]# LL
Total 0
-rw-r--r--. 1 root 0 Mar 22:10 abc.txt
-RW-------. 1 root 0 Feb 17:11 yum.log
To complete this configuration, remember to have the firewall open the corresponding port. Of course you can temporarily turn off the firewall. Thx.