CentOS安裝SVN Server

來源:互聯網
上載者:User

參考:http://www.ha97.com/4467.html

1. 

# current directory: /home/lizk

mkdir svn

cd svn

svnadmin create myapp

svn import /home/lizk/project file:///home/lizk/svn/myapp -m "init directory"

2. 

# current directory: /home/lizk/svn/myapp/conf

# edit file-passwd

[users]# harry = harryssecret# sally = sallyssecretpm = hello

#edit authz

[groups]# harry_and_sally = harry,sally# harry_sally_and_joe = harry,sally,&joe[/]pm = rw* =

#edit svnserve.conf

general]anon-access = noneauth-access = writepassword-db = passwdauthz-db = authz

3. 

啟動:

svnserve -d -r /home/lizk/svn

關閉:

ps -aux|grep svnserve

kill -9 ID號

4. check out

svn co svn://192.168.60.10/myapp

5. 開機啟動

    參考:http://blog.csdn.net/linglongwunv/article/details/5186968

vim /etc/rc.d/rc.local

    /usr/bin/svnserve -d -r /home/lizk/svn

註:

    svn list svn://192.168.60.10/myapp    // 列舉目錄

    svn export svn://192.168.60.10/myapp,用於匯出乾淨的專案檔,即不包括.svn檔案資訊。

    svn mkdir svn://192.168.60.10/a/b/c -m ""      // 建立目錄

    svn remove svn://192.168.60.10/a/b/trunk -m "sss"        // 刪除目錄

    svn mkdir svn://192.168.60.10/a/b/c/branches -m ""      // 建立目錄

    svn import v1.0/ svn://192.168.60.10/a/b/c/trunk -m "init trunk"    // 匯入專案檔

    svn checkout svn://192.168.60.10/a/b/c/trunk ./myproject  // 匯出   

    svn cp svn://192.168.60.10/a/b/c/trunk svn://192.168.60.10/a/b/c/branches/v1.0 -m "init v1.0 branch"    // 建立branch

    svn info // 查看目前的目錄的svn資訊

    svn switch --relocate svn://lizk@10.10.10.72/a/b/c/branches/v1.8.9 svn://lizk@192.168.1.78/a/b/c/branches/v1.8.9     // 修改svn伺服器ip,或者部署到別的機器後,重定位。

聯繫我們

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