首先安裝 apache
$sudo apt-get install apache2
套件相依:
apache2-common
apache2-utils
apache2-doc (選擇性)
安裝subversion
$> sudo apt-get install subversion
安裝 apache2 mod for subversion
$> sudo apt-get install libapache2-svn
建立svn 檔案庫
$> mkdir /home/svn
$> mkdir /home/svn/projectA
$> sudo svnadmin create /home/svn/projectA
//改變權限給apache
$> sudo chown -R www-data:www-data /home/svn
設定 apache2 for subversion
/etc/apache2/mods-enabled/dav_svn.conf
<Location /svn/repos>
DAV svn
SVNParentPath /home/svn
AuthType Basic
AuthName "Brian Tsao"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>
建立認證帳號檔
$> sudo htpasswd -c[新建檔案] /etc/subversion/passwd admin
重啟apache2
$> sudo /etc/init.d/apache2 restart
開啟firefox 連結
http://domain_name/svn/repos/projectA/
出現
framework - Revision 0: /
Powered by Subversion version 1.6.5 (r38866).
匯入第一個專案,開啟windows cmd
D:\Java\workspace> svn import Struts2Lab http://domain_name/svn/repos/projectA/Struts2Lab -m "first initial repository"
取出第一份專案
D:\Java\workspace\> cd D:\Java\workspace\temp\
D:\Java\workspace\temp> svn checkout http://domain_name/svn/repos/projectA/Struts2Lab
其他參考:
http://dwsnote.blogspot.com/2008/05/ubuntu-svn-server.html
http://blog.xuite.net/gbisland/linux/14229857
沒有留言:
張貼留言