1.使用yum命令安装svn
yum命令:yum -y install subversion

2.新建仓库目录
在 /opt目录下新建个svn文件夹,作为svn存储目录
命令:mkdir /opt/svn
3.建立项目仓库
建立一个项目仓库
命令:svnadmin create /opt/svn/repository/

4.配置svn服务配置文件 svnserver.conf
进入到repository目录下的conf目录,编辑svnserver.conf文件
命令:vim /opt/svn/repository/conf/svnserve.conf

5. 配置访问的用户及密码
进入到repository目录下的conf目录,编辑passwd文件
命令:vim /opt/svn/repository/conf/passwd

6. 配置用户的授权访问的文件
编辑authz文件,命令:vim /opt/svn/repository/conf/authz
在该文件中追加如下内容:
[/]
test = rw

7.启动svn服务
命令:svnserve -d -r /opt/svn/
ps:其中-d表示后台运行, -r指定根目录,启动目录为仓库目录不是项目目录
8.连接svn
URL: svn://host:port/repository

网友评论