subversion是一个非常好用的版本管理工具。
1 安装
yum install -y subversion subversion-devel
2 创建版本库
mkdir /data/svn/exam_test
svnadmin create /data/svn/exam_test/
如下图
2 初始化版本库
cd /data
mkdir -p exam_test/{trunk/{server,client},tags,branches}
svn import exam_test/ file:///data/svn/exam_test/ -m "init exam svn repo"
rm -rf exam_test/
3 svn配置
1、svn服务基础配置:svnserve.conf
vi /data/svn/exam_test/conf/svnserve.conf
引用
anon-access = none
auth-access = write
password-db = /data/svn/exam_test/conf/passwd
authz-db = /data/svn/exam_test/conf/authz
2、svn用户配置:passwd
vi /data/svn/exam_test/conf/passwd
引用
manager = 123456
server = 123456
client = 123456
3、用户权限配置:authz
vi /data/svn/exam_test/conf/authz
引用
[groups]
p_m = manager
p_s = server
p_c = client
[exam_test:/]
@p_m = rw
* = r
[exam_test:/trunk]
@p_m = rw
@p_s = rw
* =
[exam_test:/trunk/client]
@p_m = rw
@p_s = rw
@p_c = rw
* =
4 svn服务启动
svnserve -d -r /data/svn/(启动版本库)
5 防火墙设置
通过netstat命令可以看到svn服务端口为3690
netstat -tulnp
iptables -I INPUT 3 -p tcp --dport 3690 -j ACCEPT
service iptables save
service iptables restart
5 windows本地连接看看