2011年5月18日 星期三

版本控制+使用subversion(+2001/6/12

裡面有太多太多要講了.
目前,已完成了 1.使用subversion 2.使用Web建立
此篇,要講的是如何在web存取及設定(其它相關的會改天)

http://www.ithome.com.tw/itadm/article.php?c=67969
  1.需要安裝有 subversion , ApacheHTTPserver,libapache2-svn
   $apt-get install subversion[libapache2-svn]

2.(目前,未知如何在未端下.來建立檔案庫)
   $ svnadmin create /usr/local/svn/newrepos [newrepos:為一個檔案庫]
[$ svn import mytree  file:///usr/local/svn/newrepos/fooproject]
 
 3.設定apache2
   A. 
 /etc/apache2/mods-available/dav_svn.conf 
 
#在web上所可以看到的
     DAV svn
#必加上
     SVNPath /home/svn/myproject
#設定其檔案庫的位置
     AuthType Basic
     AuthName "myproject subversion repository"
     AuthUserFile /etc/subversion/passwd
     
        Require valid-user
     
  
B.
create /etc/subversion/passwd file. This file contains user authentication details
$ sudo htpasswd -c /etc/subversion/passwd user_name
#-c 為避免覆寫passwd 

It prompts you to enter the password. Once you enter the password, the user is added.
C.
restart apache2 web server
$sudo /etc/init.d/apache2 restart

D.結果

$ svn co http://hostname/svn/myproject myproject --username name

參考資料:
http://twpug.net/docs/Subversion/#svn-ch-0-sect-1
https://help.ubuntu.com/community/Subversion
https://help.ubuntu.com/community/InstallingSoftware
 http://svnbook.red-bean.com
https://help.ubuntu.com/community/ApacheHTTPserver

沒有留言:

張貼留言