国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux配置安裝svn服務端、客戶端應用的例子

2024-08-27 23:59:56
字體:
來源:轉載
供稿:網友

安裝svn對于團隊開發與版本控制的朋友肯定是會用到了,今天,我們來看在Linux配置安裝svn服務端、客戶端應用的例子,希望這個例子能給各位帶來有效幫助.

Linux配置安裝svn服務,此次配置環境為centos6.6,內核版本2.6.32.

  1. Last login: Sat Mar 14 06:12:56 2015 
  2. [root@Svn-Server ~]# cat /etc/redhat-release  
  3. CentOS release 6.6 (Final) 
  4. [root@Svn-Server ~]# uname -rm 
  5. 2.6.32-504.el6.x86_64 x86_64 
  6. [root@Svn-Server ~]# rpm -qa subversion 
  7. [root@Svn-Server ~]# yum install subversion -y 
  8. Dependencies Resolved 
  9.  Package                                Arch                    Version                               Repository                Size 
  10. Installing: 
  11.  subversion                             x86_64                  1.6.11-12.el6_6                       updates                  2.3 M 
  12. Installing for dependencies: 
  13.  apr                                    x86_64                  1.3.9-5.el6_2                         base                     123 k 
  14.  apr-util                               x86_64                  1.3.9-3.el6_0.1                       base                      87 k 
  15.  gnutls                                 x86_64                  2.8.5-14.el6_5                        base                     346 k 
  16.  libproxy                               x86_64                  0.3.0-10.el6                          base                      39 k 
  17.  libproxy-bin                           x86_64                  0.3.0-10.el6                          base                     9.0 k 
  18.  libproxy-python                        x86_64                  0.3.0-10.el6                          base                     9.1 k 
  19.  neon                                   x86_64                  0.29.3-3.el6_4                        base                     119 k 
  20.  pakchois                               x86_64                  0.4-3.2.el6                           base                      21 k 
  21.  perl                                   x86_64                  4:5.10.1-136.el6_6.1                  updates                   10 M 
  22.  perl-Module-Pluggable                  x86_64                  1:3.90-136.el6_6.1                    updates                   40 k 
  23.  perl-Pod-Escapes                       x86_64                  1:1.04-136.el6_6.1                    updates                   32 k 
  24.  perl-Pod-Simple                        x86_64                  1:3.13-136.el6_6.1                    updates                  212 k 
  25.  perl-URI                               noarch                  1.40-2.el6                            base                     117 k 
  26.  perl-libs                              x86_64                  4:5.10.1-136.el6_6.1                  updates                  578 k 
  27.  perl-version                           x86_64                  3:0.77-136.el6_6.1                    updates                   51 k 
  28. Transaction Summary 
  29. ===================================================================================================================================== 
  30. Install      16 Package(s) 
  31. [root@Svn-Server ~]# mkdir /byrd/svndata -p 
  32. [root@Svn-Server ~]# svnserve -d -r /byrd/svndata/ 
  33. [root@Svn-Server ~]# ps -ef |grep svn 
  34. root      1216     1  0 06:31 ?        00:00:00 svnserve -d -r /byrd/svndata/ 
  35. [root@Svn-Server ~]# rpm -qa subversion 
  36. subversion-1.6.11-12.el6_6.x86_64 
  37. [root@Svn-Server ~]# netstat -tunlp    #lsof -i :3690 
  38. Active Internet connections (only servers) 
  39. Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name    
  40. tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1053/sshd            
  41. tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1130/master          
  42. tcp        0      0 0.0.0.0:3690                0.0.0.0:*                   LISTEN      1216/svnserve        
  43. tcp        0      0 :::22                       :::*                        LISTEN      1053/sshd            
  44. tcp        0      0 ::1:25                      :::*                        LISTEN      1130/master          
  45. [root@Svn-Server ~]# which svnadmin 
  46. /usr/bin/svnadmin 
  47. [root@Svn-Server ~]# svnadmin create /byrd/svndata/linuxerdox     #創建svn版本庫(This is a Subversion repository) 
  48. [root@Svn-Server ~]# cd /byrd/svndata/linuxerdox/conf/ 
  49. [root@Svn-Server conf]# cp svnserve.conf svnserve.$(date +%F).conf    #備份svnserve.conf配置文件 
  50. [root@Svn-Server conf]# sed -i 's#/# anon-access = read#anon-access = none#g' svnserve.conf     #取消svn匿名訪問 
  51. [root@Svn-Server conf]# sed -i 's#/# auth-access = write#auth-access = write#g' svnserve.conf 
  52. [root@Svn-Server conf]# mkdir /byrd/svnpasswd    #創建公共密碼區域 
  53. [root@Svn-Server conf]# sed -i 's//# password-db = passwd/password-db = //byrd//svnpasswd//passwd/g' svnserve.conf 
  54. [root@Svn-Server conf]# sed -i 's//# authz-db = authz/authz-db = //byrd//svnpasswd//authz/g' svnserve.conf 
  55. [root@Svn-Server conf]# diff svnserve.* 
  56. 12,13c12,13 
  57. < # anon-access = read 
  58. < # auth-access = write 
  59. --- 
  60. > anon-access = none 
  61. > auth-access = write 
  62. 20c20 
  63. < # password-db = passwd 
  64. --- 
  65. > password-db = /byrd/svnpasswd/passwd 
  66. 27c27 
  67. < # authz-db = authz 
  68. --- 
  69. > authz-db = /byrd/svnpasswd/authz 
  70. [root@Svn-Server conf]# cp authz passwd /byrd/svnpasswd/ 
  71. [root@Svn-Server conf]# chmod 700 /byrd/svnpasswd/* 
  72. [root@Svn-Server conf]# ll /byrd/svnpasswd/ 
  73. total 8 
  74. -rwx------. 1 root root 1080 Mar 14 20:54 authz 
  75. -rwx------. 1 root root  309 Mar 14 20:54 passwd 
  76. [root@Svn-Server conf]# sed -i 's#/# harry = harryssecret#byrd = admin#g' /byrd/svnpasswd/passwd  
  77. [root@Svn-Server svndata]# tail -3 /byrd/svnpasswd/authz   
  78. [linuxerdox:/] 
  79. byrd = rw 
  80. * =  
  81. [root@Svn-Server svndata]# netstat -tunlp 
  82. Active Internet connections (only servers) 
  83. Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name    
  84. tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1052/sshd            
  85. tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1129/master          
  86. tcp        0      0 0.0.0.0:3690                0.0.0.0:*                   LISTEN      1267/svnserve        
  87. tcp        0      0 :::22                       :::*                        LISTEN      1052/sshd            
  88. tcp        0      0 ::1:25                      :::*                        LISTEN      1129/master         //Vevb.com 
  89. [root@Svn-Server svndata]# pkill svnserve 
  90. [root@Svn-Server svndata]# svnserve -d -r /byrd/svndata/ 

linux作為客戶端:

  1. co:checkout 
  2. ci:commit 
  3. up:update 
  4. ls:list 
  5. [root@Svn-Server linuxerdox]# svn co svn://1.1.1.32/linuxerdox /tmp/ --username=byrd --password=admin 
  6. ----------------------------------------------------------------------- 
  7. ATTENTION!  Your password for authentication realm: 
  8.    <svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e 
  9. can only be stored to disk unencrypted!  You are advised to configure 
  10. your system so that Subversion can store passwords encrypted, if 
  11. possible.  See the documentation for details. 
  12. You can avoid future appearances of this warning by setting the value 
  13. of the 'store-plaintext-passwords' option to either 'yes' or 'no' in 
  14. '/root/.subversion/servers'. 
  15. ----------------------------------------------------------------------- 
  16. Store password unencrypted (yes/no)? no 
  17. Checked out revision 3. 
  18. [root@Svn-Server linuxerdox]# svn co svn://1.1.1.32/linuxerdox /tmp/ --username=byrd --password=admin 
  19. A    /tmp/111.txt 
  20. Checked out revision 4. 
  21. [root@Svn-Server linuxerdox]# ll /tmp/ 
  22. total 4 
  23. -rw-r--r--. 1 root root 46 Mar 14 21:45 111.txt 
  24. [root@Svn-Server linuxerdox]# touch /tmp/abc.txt 
  25. [root@Svn-Server linuxerdox]# svn add /tmp/abc.txt  
  26. A         /tmp/abc.txt 
  27. [root@Svn-Server linuxerdox]# svn ci 
  28. svn: '/byrd/svndata/linuxerdox' is not a working copy 
  29. [root@Svn-Server linuxerdox]# svn ci -m "abc" 
  30. svn: '/byrd/svndata/linuxerdox' is not a working copy 
  31. [root@Svn-Server linuxerdox]# cd /tmp/ 
  32. [root@Svn-Server tmp]# svn ci -m "abc" 
  33. Authentication realm: <svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e 
  34. Password for 'byrd': 
  35. ----------------------------------------------------------------------- 
  36. ATTENTION!  Your password for authentication realm: 
  37.    <svn://1.1.1.32:3690> 3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e 
  38. can only be stored to disk unencrypted!  You are advised to configure 
  39. your system so that Subversion can store passwords encrypted, if 
  40. possible.  See the documentation for details. 
  41. You can avoid future appearances of this warning by setting the value 
  42. of the 'store-plaintext-passwords' option to either 'yes' or 'no' in 
  43. '/root/.subversion/servers'. 
  44. ----------------------------------------------------------------------- 
  45. Store password unencrypted (yes/no)? no 
  46. Adding         abc.txt 
  47. Transmitting file data . 
  48. Committed revision 5. 
  49. [root@Svn-Server tmp]# svn co file:///byrd/svndata/linuxerdox /tmp/ --username=byrd --password=admin 
  50. svn: '/tmp' is already a working copy for a different URL 
  51. [root@Svn-Server tmp]# ll 
  52. total 0 
  53. -rw-r--r--. 1 root root 0 Mar 14 22:10 abc.txt 
  54. -rw-------. 1 root root 0 Feb 10 17:11 yum.log 

到此配置完成,記得要防火墻開啟對應的端口,當然你可以臨時關閉防火墻,THX.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 绥滨县| 桃江县| 天长市| 安顺市| 平安县| 永修县| 江源县| 兴宁市| 府谷县| 南投县| 乐都县| 大英县| 陕西省| 桦甸市| 双城市| 富裕县| 桃江县| 锦州市| 宜州市| 丰顺县| 壶关县| 郁南县| 灵武市| 襄城县| 昭通市| 滦平县| 兰西县| 太湖县| 英德市| 乳山市| 中牟县| 南通市| 海盐县| 三都| 龙门县| 千阳县| 读书| 开化县| 开化县| 曲周县| 文水县|