FileManagement/linux/svn安装.txt

47 lines
850 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

安装svn
1、yum install subversion
2、输入rpm -ql subversion查看安装位置
输入 svn --help可以查看svn的使用方法
3、创建svn版本库目录
mkdir -p /var/svn/svnrepos
4、创建版本库
svnadmin create /var/svn/svnrepos
5、进入conf目录该svn版本库配置文件
authz文件是权限控制文件
passwd是帐号密码文件
svnserve.conf SVN服务配置文件
6、设置帐号密码
vi passwd
在[users]块中添加用户和密码,格式:帐号=密码如dan=dan
7、设置权限
vi authz
在末尾添加如下代码:
[/]
dan=rw
w=r
意思是版本库的根目录dan对其有读写权限w只有读权限。
8、修改svnserve.conf文件
vi svnserve.conf
打开下面的几个注释:
anon-access = read #匿名用户可读
auth-access = write #授权用户可写
password-db = passwd #使用哪个文件作为账号文件
authz-db = authz #使用哪个文件作为权限文件
realm = /var/svn/svnrepos # 认证空间名,版本库所在目录
9、启动svn版本库
svnserve -d -r /var/svn/svnrepos