Linux配置安装svn服务端、客户端应用的例子
2019/10/10/17:44:52 阅读:2030 来源:谷歌SEO算法 标签:
Google
安装svn对于团队开发与版本控制的朋友肯定是会用到了,今天,我们来看在Linux配置安装svn服务端、客户端应用的例子,希望这个例子能给各位带来有效帮助.
Linux配置安装svn服务,此次配置环境为centos6.6,内核版本2.6.32.
- Lastlogin:SatMar1406:12:562015
- [root@Svn-Server~]#cat/etc/redhat-release
- CentOSrelease6.6(Final)
- [root@Svn-Server~]#uname-rm
- 2.6.32-504.el6.x86_64x86_64
- [root@Svn-Server~]#rpm-qasubversion
- [root@Svn-Server~]#yuminstallsubversion-y
- DependenciesResolved
- PackageArchVersionRepositorySize
- Installing:
- subversionx86_641.6.11-12.el6_6updates2.3M
- Installingfordependencies:
- aprx86_641.3.9-5.el6_2base123k
- apr-utilx86_641.3.9-3.el6_0.1base87k
- gnutlsx86_642.8.5-14.el6_5base346k
- libproxyx86_640.3.0-10.el6base39k
- libproxy-binx86_640.3.0-10.el6base9.0k
- libproxy-pythonx86_640.3.0-10.el6base9.1k
- neonx86_640.29.3-3.el6_4base119k
- pakchoisx86_640.4-3.2.el6base21k
- perlx86_644:5.10.1-136.el6_6.1updates10M
- perl-Module-Pluggablex86_641:3.90-136.el6_6.1updates40k
- perl-Pod-Escapesx86_641:1.04-136.el6_6.1updates32k
- perl-Pod-Simplex86_641:3.13-136.el6_6.1updates212k
- perl-URInoarch1.40-2.el6base117k
- perl-libsx86_644:5.10.1-136.el6_6.1updates578k
- perl-versionx86_643:0.77-136.el6_6.1updates51k
- TransactionSummary
- =====================================================================================================================================
- Install16Package(s)
- [root@Svn-Server~]#mkdir/byrd/svndata-p
- [root@Svn-Server~]#svnserve-d-r/byrd/svndata/
- [root@Svn-Server~]#ps-ef|grepsvn
- root12161006:31?00:00:00svnserve-d-r/byrd/svndata/
- [root@Svn-Server~]#rpm-qasubversion
- subversion-1.6.11-12.el6_6.x86_64
- [root@Svn-Server~]#netstat-tunlp#lsof-i:3690
- ActiveInternetconnections(onlyservers)
- ProtoRecv-QSend-QLocalAddressForeignAddressStatePID/Programname
- tcp000.0.0.0:220.0.0.0:*LISTEN1053/sshd
- tcp00127.0.0.1:250.0.0.0:*LISTEN1130/master
- tcp000.0.0.0:36900.0.0.0:*LISTEN1216/svnserve
- tcp00:::22:::*LISTEN1053/sshd
- tcp00::1:25:::*LISTEN1130/master
- [root@Svn-Server~]#whichsvnadmin
- /usr/bin/svnadmin
- [root@Svn-Server~]#svnadmincreate/byrd/svndata/linuxerdox#创建svn版本库(ThisisaSubversionrepository)
- [root@Svn-Server~]#cd/byrd/svndata/linuxerdox/conf/
- [root@Svn-Serverconf]#cpsvnserve.confsvnserve.$(date+%F).conf#备份svnserve.conf配置文件
- [root@Svn-Serverconf]#sed-i's#\#anon-access=read#anon-access=none#g'svnserve.conf#取消svn匿名访问
- [root@Svn-Serverconf]#sed-i's#\#auth-access=write#auth-access=write#g'svnserve.conf
- [root@Svn-Serverconf]#mkdir/byrd/svnpasswd#创建公共密码区域
- [root@Svn-Serverconf]#sed-i's/\#password-db=passwd/password-db=\/byrd\/svnpasswd\/passwd/g'svnserve.conf
- [root@Svn-Serverconf]#sed-i's/\#authz-db=authz/authz-db=\/byrd\/svnpasswd\/authz/g'svnserve.conf
- [root@Svn-Serverconf]#diffsvnserve.*
- 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-Serverconf]#cpauthzpasswd/byrd/svnpasswd/
- [root@Svn-Serverconf]#chmod700/byrd/svnpasswd/*
- [root@Svn-Serverconf]#ll/byrd/svnpasswd/
- total8
- -rwx------.1rootroot1080Mar1420:54authz
- -rwx------.1rootroot309Mar1420:54passwd
- [root@Svn-Serverconf]#sed-i's#\#harry=harryssecret#byrd=admin#g'/byrd/svnpasswd/passwd
- [root@Svn-Serversvndata]#tail-3/byrd/svnpasswd/authz
- [linuxerdox:/]
- byrd=rw
- *=
- [root@Svn-Serversvndata]#netstat-tunlp
- ActiveInternetconnections(onlyservers)
- ProtoRecv-QSend-QLocalAddressForeignAddressStatePID/Programname
- tcp000.0.0.0:220.0.0.0:*LISTEN1052/sshd
- tcp00127.0.0.1:250.0.0.0:*LISTEN1129/master
- tcp000.0.0.0:36900.0.0.0:*LISTEN1267/svnserve
- tcp00:::22:::*LISTEN1052/sshd
- tcp00::1:25:::*LISTEN1129/master//phpfensi.com
- [root@Svn-Serversvndata]#pkillsvnserve
- [root@Svn-Serversvndata]#svnserve-d-r/byrd/svndata/
linux作为客户端:
- co:checkout
- ci:commit
- up:update
- ls:list
- [root@Svn-Serverlinuxerdox]#svncosvn://1.1.1.32/linuxerdox/tmp/--username=byrd--password=admin
- -----------------------------------------------------------------------
- ATTENTION!Yourpasswordforauthenticationrealm:
- <svn://1.1.1.32:3690>3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
- canonlybestoredtodiskunencrypted!Youareadvisedtoconfigure
- yoursystemsothatSubversioncanstorepasswordsencrypted,if
- possible.Seethedocumentationfordetails.
- Youcanavoidfutureappearancesofthiswarningbysettingthevalue
- ofthe'store-plaintext-passwords'optiontoeither'yes'or'no'in
- '/root/.subversion/servers'.
- -----------------------------------------------------------------------
- Storepasswordunencrypted(yes/no)?no
- Checkedoutrevision3.
- [root@Svn-Serverlinuxerdox]#svncosvn://1.1.1.32/linuxerdox/tmp/--username=byrd--password=admin
- A/tmp/111.txt
- Checkedoutrevision4.
- [root@Svn-Serverlinuxerdox]#ll/tmp/
- total4
- -rw-r--r--.1rootroot46Mar1421:45111.txt
- [root@Svn-Serverlinuxerdox]#touch/tmp/abc.txt
- [root@Svn-Serverlinuxerdox]#svnadd/tmp/abc.txt
- A/tmp/abc.txt
- [root@Svn-Serverlinuxerdox]#svnci
- svn:'/byrd/svndata/linuxerdox'isnotaworkingcopy
- [root@Svn-Serverlinuxerdox]#svnci-m"abc"
- svn:'/byrd/svndata/linuxerdox'isnotaworkingcopy
- [root@Svn-Serverlinuxerdox]#cd/tmp/
- [root@Svn-Servertmp]#svnci-m"abc"
- Authenticationrealm:<svn://1.1.1.32:3690>3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
- Passwordfor'byrd':
- -----------------------------------------------------------------------
- ATTENTION!Yourpasswordforauthenticationrealm:
- <svn://1.1.1.32:3690>3c9e524f-5a71-49bf-92d5-0a9b8d86bc7e
- canonlybestoredtodiskunencrypted!Youareadvisedtoconfigure
- yoursystemsothatSubversioncanstorepasswordsencrypted,if
- possible.Seethedocumentationfordetails.
- Youcanavoidfutureappearancesofthiswarningbysettingthevalue
- ofthe'store-plaintext-passwords'optiontoeither'yes'or'no'in
- '/root/.subversion/servers'.
- -----------------------------------------------------------------------
- Storepasswordunencrypted(yes/no)?no
- Addingabc.txt
- Transmittingfiledata.
- Committedrevision5.
- [root@Svn-Servertmp]#svncofile:///byrd/svndata/linuxerdox/tmp/--username=byrd--password=admin
- svn:'/tmp'isalreadyaworkingcopyforadifferentURL
- [root@Svn-Servertmp]#ll
- total0
- -rw-r--r--.1rootroot0Mar1422:10abc.txt
- -rw-------.1rootroot0Feb1017:11yum.log
到此配置完成,记得要防火墙开启对应的端口,当然你可以临时关闭防火墙,THX.
热门评论