Linux 上安装 Subversion
安装所需文件及下载地址:
1) Subversion 1.2.3
1) Subversion 1.2.3
(http://subversion.tigris.org/downloads/subversion-1.2.3.tar.gz)
2) Berkeley DB 4.4.20
2) Berkeley DB 4.4.20
(http://downloads.sleepycat.com/db-4.4.20.tar.gz)
3) Apache 2.0.54
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/
以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/