詳細CentOS-6.3安裝配置SVN的方法_Linux

來源:互聯網
上載者:User

安裝說明

系統內容:CentOS-6.3

安裝方式:yum install (源碼安裝容易產生版本相容的問題)

安裝軟體:系統自動下載SVN軟體

 檢查已安裝版本

#檢查是否安裝了低版本的SVN

 [root@localhost /]# rpm -qa subversion

#卸載舊版本SVN

[root@localhost modules]# yum remove subversion

安裝SVN

[root@localhost modules]# yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql

確認已安裝了svn模組

[root@localhost /]# cd /etc/httpd/modules [root@localhost modules]# ls | grep svn mod_authz_svn.so mod_dav_svn.so

驗證安裝

檢驗已經安裝的SVN版本資訊

[root@localhost modules]# svnserve --version
svnserve,版本 1.6.11 (r934486)編譯於 Jun 23 2012,00:44:03 著作權 (C) 2000-2009 CollabNet。 Subversion 是開放原始碼軟體,請參閱 http://subversion.tigris.org/ 網站。  此產品包含由 CollabNet(http://www.Collab.Net/) 開發的軟體。 下列版本庫後端(FS) 模組可用: * fs_base : 模組只能操作BDB版本庫。 * fs_fs : 模組與文字檔(FSFS)版本庫一起工作。 Cyrus SASL 認證可用。

程式碼程式庫建立

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

使用者密碼passwd配置

[root@localhost password]# cd /opt/svn/repositories/conf [root@admin conf]# vi + passwd

修改passwd為以下內容:

[users] # harry = harryssecret # sally = sallyssecret zhoulf=123456 

許可權控制authz配置

[root@admin conf]# vi + authz

目的是設定哪些使用者可以訪問哪些目錄,向authz檔案追加以下內容:

#設定[/]代表根目錄下所有的資源 [/]zhoulf=rw 

服務svnserve.conf配置

[root@admin conf]# vi + svnserve.conf

追加以下內容:

[general] #匿名訪問的許可權,可以是read,write,none,預設為read anon-access=none #使授權使用者有寫入權限 auth-access=write #密碼資料庫的路徑 password-db=passwd #存取控制檔案 authz-db=authz #認證命名空間,subversion會在認證提示裡顯示,並且作為憑證緩衝的關鍵字 realm=/opt/svn/repositories 

配置防火牆連接埠

[root@localhost conf]# vi /etc/sysconfig/iptables

添加以下內容:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT

儲存後重啟防火牆

[root@localhost conf]# service iptables restart

啟動SVN

svnserve -d -r /opt/svn/repositories

查看SVN進程

[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

檢測SVN 連接埠

[root@localhost conf]# netstat -ln |grep 3690 tcp    0   0 0.0.0.0:3690        0.0.0.0:*          LISTEN

停止重啟SVN

[root@localhost password]# killall svnserve  //停止 [root@localhost password]# svnserve -d -r /opt/svn/repositories // 啟動 

測試

SVN服務已經啟動,使用用戶端測試連接。 

用戶端串連地址:svn://192.168.15.231

使用者名稱/密碼: zhoulf/123456

測試建立檔案夾等操作。

以上就是本文的全部內容,希望對大家的學習有所協助,也希望大家多多支援雲棲社區。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.