centos7.x搭建svn server
簡介
Subversion(SVN) 是一個開源的版本控制系統, 也就是說 Subversion 管理著隨時間改變的數據。這些數據放置在一個中央資料檔案庫(repository) 中。這個檔案庫很像一個普通的文件服務器, 不過它會記住每一次文件的變動。這樣你就可以把檔案恢復到舊的版本, 或是瀏覽文件的變動歷史。
SVN 的一些概念
repository(源代碼庫):源代碼統一存放的地方
Checkout(提取):當你手上沒有源代碼的時候,你需要從repository checkout一份
Commit(提交):當你已經修改了代碼,你就需要Commit到repository
Update (更新):當你已經Checkout了一份源代碼,Update一下你就可以和Repository 上的源代碼同步,你手上的代碼就會有最新的變更
日常開發過程其實就是這樣的(假設你已經Checkout並且已經工作了幾天):Update(獲得最新的代碼) —>作出自己的修改並調試成功 —> Commit(大家就可以看到你的修改了) 。
如果兩個程序員同時修改了同一個文件呢, SVN可以合並這兩個程序員的改動,實際上SVN管理源代碼是以行為單位的,就是說兩個程序員只要不是修改了同一行程序,SVN都會自動合並兩種修改。
如果是同一行,SVN會提示文件Confict, 沖突,需要手動確認。
subversion目錄說明:
db目錄:就是所有版本控制的數據存放文件。
hooks目錄:放置hook腳本文件的目錄。
locks目錄:用來放置subversion見艱苦鎖定數據的目錄,用來追蹤存取文件庫的客戶端。
format文件:是一個文本文件,裏面只放了一個整數,表示當前文件庫配置的版本號。
conf目錄:是這個倉庫的配置文件(倉庫的用戶訪問賬號、權限等)。
進入conf目錄(該svn版本庫配置文件)cd conf/
authz 文件是權限控制文件
passwd 是帳號密碼文件
svnserve.conf SVN服務配置文件
[[email protected] ~]# yum install subversion -y Loaded plugins: fastestmirror base | 3.6 kB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.163.com Resolving Dependencies --> Running transaction check ---> Package subversion.x86_64 0:1.7.14-10.el7 will be installed --> Processing Dependency: subversion-libs(x86-64) = 1.7.14-10.el7 for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_wc-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_subr-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_repos-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_ra_svn-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_ra_neon-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_ra_local-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_ra-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_fs_util-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_fs_fs-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_fs_base-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_fs-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_diff-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_delta-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libsvn_client-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libneon.so.27()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libaprutil-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Processing Dependency: libapr-1.so.0()(64bit) for package: subversion-1.7.14-10.el7.x86_64 --> Running transaction check ---> Package apr.x86_64 0:1.4.8-3.el7 will be installed ---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed ---> Package neon.x86_64 0:0.30.0-3.el7 will be installed --> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.30.0-3.el7.x86_64 ---> Package subversion-libs.x86_64 0:1.7.14-10.el7 will be installed --> Running transaction check ---> Package pakchois.x86_64 0:0.4-10.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: subversion x86_64 1.7.14-10.el7 base 1.0 M Installing for dependencies: apr x86_64 1.4.8-3.el7 base 103 k apr-util x86_64 1.5.2-6.el7 base 92 k neon x86_64 0.30.0-3.el7 base 165 k pakchois x86_64 0.4-10.el7 base 14 k subversion-libs x86_64 1.7.14-10.el7 base 921 k Transaction Summary ================================================================================ Install 1 Package (+5 Dependent packages) Total download size: 2.3 M Installed size: 8.1 M Downloading packages: (1/6): apr-util-1.5.2-6.el7.x86_64.rpm | 92 kB 00:00 (2/6): neon-0.30.0-3.el7.x86_64.rpm | 165 kB 00:00 (3/6): pakchois-0.4-10.el7.x86_64.rpm | 14 kB 00:00 (4/6): subversion-1.7.14-10.el7.x86_64.rpm | 1.0 MB 00:00 (5/6): subversion-libs-1.7.14-10.el7.x86_64.rpm | 921 kB 00:00 (6/6): apr-1.4.8-3.el7.x86_64.rpm | 103 kB 00:01 -------------------------------------------------------------------------------- Total 1.8 MB/s | 2.3 MB 00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : apr-1.4.8-3.el7.x86_64 1/6 Installing : apr-util-1.5.2-6.el7.x86_64 2/6 Installing : pakchois-0.4-10.el7.x86_64 3/6 Installing : neon-0.30.0-3.el7.x86_64 4/6 Installing : subversion-libs-1.7.14-10.el7.x86_64 5/6 Installing : subversion-1.7.14-10.el7.x86_64 6/6 Verifying : neon-0.30.0-3.el7.x86_64 1/6 Verifying : apr-1.4.8-3.el7.x86_64 2/6 Verifying : subversion-1.7.14-10.el7.x86_64 3/6 Verifying : apr-util-1.5.2-6.el7.x86_64 4/6 Verifying : pakchois-0.4-10.el7.x86_64 5/6 Verifying : subversion-libs-1.7.14-10.el7.x86_64 6/6 Installed: subversion.x86_64 0:1.7.14-10.el7 Dependency Installed: apr.x86_64 0:1.4.8-3.el7 apr-util.x86_64 0:1.5.2-6.el7 neon.x86_64 0:0.30.0-3.el7 pakchois.x86_64 0:0.4-10.el7 subversion-libs.x86_64 0:1.7.14-10.el7 Complete! [[email protected]
--------------------------------------------------------
客戶端連接
windows tortoisesvn 下載
https://tortoisesvn.net/downloads.html
參考:https://yq.aliyun.com/articles/83737
本文出自 “禪劍一如” 博客,請務必保留此出處http://yanconggod.blog.51cto.com/1351649/1927768
centos7.x搭建svn server