1 、安装篇:
我用的是 RHEL 4 ( 32bit ),到 SVN 官网,最终你会在这个网址可供下载的 rpm 包:
http://the.earth.li/pub/subversion/summersoft.fay.ar.us/pub/subversion/latest/rhel4/i386/
本来嘛,有这个就够了: subversion-1.5.5-1.i386.rpm
但是,安装它需要几个 dependencies ,也就是同目录下的 apr-0.9.12-2.i386.rpm , apr-util-0.9.12-1.i386.rpm , neon-0.27.2-1.i386.rpm ,把这几个先装了就搞定了,其他没什么好说的
2 、配置篇( http://blog.csdn.net/hitzhang/archive/2009/08/23/4474925.aspx )
为了方便进行hadoop开发和测试核自己控制,我在linux开发机上搭建了一个svnserve,没想到还费了挺多时间,汗
具体步骤如下,希望后来人可以节约点时间了
1. 安装subversion
我采用的方式是 sudo yum subversion
根据你的box的不同你可以采用不同的安装方式
2. 创建你的svn仓库文件目录
svnadmin create /home/maosen/svnrepos
这时候就会在/home/maosen/svnrepos目录里面生成一系列的文件
- conf dav db format hooks locks README.txt
3. 进行授权管理
根据你的需求可以进行不同的配置,我的配置如下:
svnserve.conf文件:
- [general]
- ### These options control access to the repository for unauthenticated
- ### and authenticated users. Valid values are "write" , "read" ,
- ### and "none" . The sample settings below are the defaults.
- anon-access = read
- auth-access = write
- ### The password-db option controls the location of the password
- ### database file. Unless you specify a path starting with a /,
- ### the file's location is relative to the conf directory.
- ### Uncomment the line below to use the default password file.
- password-db = passwd
- ### The authz-db option controls the location of the authorization
- ### rules for path-based access control. Unless you specify a path
- ### starting with a /, the file's location is relative to the conf
- ### directory. If you don't specify an authz-db, no path-based access
- ### control is done.
- ### Uncomment the line below to use the default authorization file.
- authz-db = authz
authz文件:
- [groups]
- developer = maosen
- [/]
- @developer = rw
- * = r
- [repository:/home/maosen/dev/svnrepos]
- @developer = rw
- * = r
passwd文件:
- [users]
- maosen = 123456
4. 载入你的代码
svn import dev/localsvn/hadoop-0.20.0/ file:///home/maosen/dev/svnrepos/hadoop-0.20.0 -m 'import'
5. 访问你的代码
svn co svn:///"hostname or ip"/hadoop-0.20.0 hadoop-0.20.0
完毕
三、使用篇
1 、建立好服务器后,可以重新删除 phpweb20 文件夹,并重新 checkout 命令:
#rm –fr /var/www/phpweb20
#svn checkout svn://192.168.182.128/phpweb20
2 、使用过程中客户端更新后提交到服务器,服务器再 checkout 下来。