Centos 搭建 SVN 伺服器

來源:互聯網
上載者:User

標籤:

1,安裝:

# yum install subversion

判斷是否安裝成功:

# svnserve –version

2,建立SVN庫:

# mkdir /opt/svn/repos# svnadmin create /opt/svn/repos

執行上面的命令後,自動在repos下建立多個檔案, 分別是conf, db,format,hooks, locks, README.txt。

----------------------------------------------------------------------------------------------------

3,設定passwd

# nano /opt/svn/repos/conf/passwd
[users]# harry = harryssecret# sally = sallyssecretusername = password#這樣我們就建立了使用者username

4,設定authz

# nano /opt/svn/repos/conf/authz
[/]username = rw# [/] 意思為所有目錄# username = rw 意思為username擁有讀寫權限# 合起來就是username對所有目錄擁有讀寫權限

5,設定svnserv.conf

# nano /opt/svn/repos/conf/svnserv.conf
anon-access = none    # 使非授權使用者無法訪問auth-access = write    # 使授權使用者有寫入權限password-db = password    # 指定passwordauthz-db = authz    # 存取控制檔案realm = /opt/svn/repos    # 認證命名空間,subversion會在認證提示裡顯示,並且作為憑證緩衝的關鍵字。

採用預設配置. 以上語句都必須頂格寫, 左側不能留空格, 否則會出錯.

----------------------------------------------------------------------------------------------------

6,串連

啟動svn:

# svnserve -d -r /opt/svn/repos

如果已經有svn在運行,可以換一個連接埠運行(預設連接埠為:3690):

svnserve -d -r /opt/svn/repos --listen-port 3691

這樣同一台伺服器可以運行多個svnserver

連結地址為:

svn://localhost:3690

完!

Centos 搭建 SVN 伺服器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.