系統環境:阿里雲centos
安裝方式:yum install subversion數據庫
#檢查是否安裝了低版本的SVN
[root@localhost /]# rpm -qa subversion後端
#卸載舊版本SVN
[root@localhost modules]# yum remove subversioncentos
[root@localhost modules]# yum install subversion緩存
svn --version //查看版本號tcp
檢驗已經安裝的SVN版本信息
[root@localhost modules]# svnserve --versionsvn
版權全部 (C) 2000-2009 CollabNet。
Subversion 是開放源代碼軟件,請參閱 http://subversion.tigris.org/ 站點。
此產品包含由 CollabNet(http://www.Collab.Net/) 開發的軟件。測試
下列版本庫後端(FS) 模塊可用:阿里雲
* fs_base : 模塊只能操做BDB版本庫。
* fs_fs : 模塊與文本文件(FSFS)版本庫一塊兒工做。開放源代碼
Cyrus SASL 認證可用。code
SVN軟件安裝完成後還須要創建SVN庫
[root@localhost modules]# mkdir -p /opt/svn/repositories
[root@localhost modules]# svnadmin create /opt/svn/repositories
執行上面的命令後,自動創建repositories庫,查看/opt/svn/repositories 文件夾發現包含了conf, db,format,hooks, locks, README.txt等文件,說明一個SVN庫已經創建。
進入上面生成的文件夾conf下,進行配置
[root@localhost modules]# cd /opt/svn/repositories/conf
[root@localhost password]# cd /opt/svn/repositories/conf
[root@admin conf]# vi + passwd
修改passwd爲如下內容:
[root@admin conf]# vi + authz
目的是設置哪些用戶能夠訪問哪些目錄,向authz文件追加如下內容:
[root@admin conf]# vi + svnserve.conf
追加如下內容:
svnserve -d -r /opt/svn/repositories
[root@localhost conf]# ps -ef|grep svn|grep -v grep
root 12538 1 0 14:40 ? 00:00:00 svnserve -d -r /opt/svn/repositories
[root@localhost conf]# netstat -ln |grep 3690
tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN
[root@localhost password]# killall svnserve //中止
[root@localhost password]# svnserve -d -r /opt/svn/repositories // 啓動
SVN服務已經啓動,使用客戶端測試鏈接。 客戶端鏈接地址:svn://192.168.15.231用戶名/密碼: zhoulf/123456測試建立文件夾等操做。