Subversion是一個自由/開源版本控制系統,具有強大而靈活的版本控制能力。她被設計成爲CVS的替代者。
安裝所需文件及下載地址:
1) Subversion 1.2.3 (http://subversion.tigris.org/downloads/subversion-1.2.3.tar.gz)
2) Berkeley DB 4.4.20 (http://downloads.sleepycat.com/db-4.4.20.tar.gz)
3) Apache 2.0.54 (http://apache.justdn.org/httpd/httpd-2.0.54.tar.gz)
以root用戶登錄系統。
安裝Apache
#tar -zxvf httpd-2.0.54.tar.gz
#cd httpd-2.0.54
#./configure --enable-dav --enable-so --enable-maintainer-mode
#make
#make install
安裝Berkeley DB
#tar -zxvf db-4.4.20.NC.tar.gz
#cd db-4.4.20.NC/build_unix/
#../dist/configure --prefix=/usr/local/bdb
#make
#make install
安裝Subversion
#tar -zxvf subversion-1.2.3.tar.gz
#cd subversion-1.2.3
#./configure --with-berkeley-db=/usr/local/bdb --with-apxs=/usr/local/apache2/bin/apxs
#make
#make install
/* 你能夠用如下命令檢驗subversion是否安裝成功 */
#svnadmin --version
建立repository
#mkdir -p /home/svn/yourproject
#svnadmin create /home/svn/yourproject
/* 建議使用以下目錄結構 */
/home/yourprojectname/trunk
/home/yourprojectname/tags
/home/yourprojectname/branches
/* 若是你是從CVS轉移過來的項目,能夠用下面命令清理你的目錄 */
#find projectname/ -name CVS -exec rm -rf {} \;
導入source
#svn import -m "initial import" /home/yourprojectname file:///home/svn/yourprojectname
啓動svn服務
#svnserve -d
檢查服務
#lsof -i :3690
建立用戶
#groupadd yourproject
#useradd -G yourprojectname -m "it's project admin." yourprojectname
#useradd -G yourprojectname -m "it's andy." alu
#useradd -G yourprojectname -m "it's jon." jshen
#chown -R yourprojectname .yourprojectname /home/svn/yourprojectname
#chmod 770 /home/svn/yourprojectname
#chmod -R g+w /home/svn/yourprojectname
修改svn配置
vi /home/svn/yourprojectname/conf/svnserve.conf
anon-access = read
auth-access = write
參考文章:
http://linux.chinaunix.net/news/info/2005-01-10/726.shtml
http://sunfreeware.com/subversion.html
http://www.germane-software.com/~ser/R_n_R/subversion.html
http://sanwangx.brain-c.com/archives/2004_11/12_153/
Any comments are appreciated.html