Ubuntu 下搭建SVN伺服器,ubuntusvn

來源:互聯網
上載者:User

Ubuntu 下搭建SVN伺服器,ubuntusvn

root@iZ25q0jd99eZ:~# sudo apt-get install subversion

 

root@iZ25q0jd99eZ:/etc/subversion# mkdir /svnroot@iZ25q0jd99eZ:/etc/subversion# cd /svn/

 建立版本庫

root@iZ25q0jd99eZ:/svn# svnadmin create /svn/sxroot@iZ25q0jd99eZ:/svn# lssxroot@iZ25q0jd99eZ:/svn# ll sxtotal 32drwxr-xr-x 6 root root 4096 May  9 08:39 ./drwxr-xr-x 3 root root 4096 May  9 08:39 ../drwxr-xr-x 2 root root 4096 May  9 08:39 conf/drwxr-sr-x 6 root root 4096 May  9 08:39 db/-r--r--r-- 1 root root    2 May  9 08:39 formatdrwxr-xr-x 2 root root 4096 May  9 08:39 hooks/drwxr-xr-x 2 root root 4096 May  9 08:39 locks/-rw-r--r-- 1 root root  246 May  9 08:39 README.txt

 

root@iZ25q0jd99eZ:/svn/sx/conf# pwd/svn/sx/confroot@iZ25q0jd99eZ:/svn/sx/conf# lsauthz  hooks-env.tmpl  passwd  svnserve.conf

 

root@iZ25q0jd99eZ:/svn/sx/conf# vi svnserve.conf 
[general]

anon-access = none
auth-access = write
password-db = /svn/sx/conf/passwd
authz-db = /svn/sx/conf/authz

 

root@iZ25q0jd99eZ:/svn/sx/conf# vi passwd[users]# harry = harryssecret# sally = sallyssecretadmin01 = 123456user01 = 123

 

root@iZ25q0jd99eZ:/svn/sx/conf# vi authz[groups]# harry_and_sally = harry,sally# harry_sally_and_joe = harry,sally,&joeadminsvn = admin01adminuser = user01[/]@adminsvn = rw[/sx]@adminuser = rw

 

root@iZ25q0jd99eZ:/svn/sx/conf# svnserve -d -r /svn/sxroot@iZ25q0jd99eZ:/svn/sx/conf# ps -ef |grep svnroot     25443     1  0 08:54 ?        00:00:00 svnserve -d -r /svn/sxroot     25445 24814  0 08:54 pts/6    00:00:00 grep --color=auto svn

 以上是單個版本庫:在啟動的時候要指定版本庫!!!!

root@iZ25q0jd99eZ:/svn# svnadmin create /svn/testroot@iZ25q0jd99eZ:/svn# ls /svn/test/conf  db  format  hooks  locks  README.txt

 

root@iZ25q0jd99eZ:/svn/test/conf# vi svnserve.conf
[general]anon-access = noneauth-access = writepassword-db = /svn/test/conf/passwdauthz-db = /svn/test/conf/authz

 

root@iZ25q0jd99eZ:/svn/test/conf# vi passwd [users]# harry = harryssecret# sally = sallyssecretadmintest01 = 123456usertest01 = 123

 

root@iZ25q0jd99eZ:/svn/test/conf# vi authz[groups]# harry_and_sally = harry,sally# harry_sally_and_joe = harry,sally,&joeadminuser = admintest01usertest = usertest01[/]@adminuser = rw[/test]@usertest = rw* =

 

root@iZ25q0jd99eZ:/svn/test/conf# ps -ef |grep svnroot     25486     1  0 09:05 ?        00:00:00 svnserve -d -r /svn/sxroot     25586 24814  0 09:17 pts/6    00:00:00 grep --color=auto svnroot@iZ25q0jd99eZ:/svn/test/conf# kill -9 25486root@iZ25q0jd99eZ:/svn/test/conf# svnserve -d -r /svnroot@iZ25q0jd99eZ:/svn/test/conf# ps -ef |grep svnroot     25590     1  0 09:18 ?        00:00:00 svnserve -d -r /svn #如果是多個版本庫  不要指定版本庫(啟動的時候)root     25592 24814  0 09:18 pts/6    00:00:00 grep --color=auto 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.