CentOS安装和部署SVN服务器

一、安装SVNweb

经过yum安装svnapp

[root@localhost webber]# yum install subversion

查看svn是否安装成功svn

[root@localhost webber]# svn --version svn, version 1.7.14 (r1542130) compiled Apr 11 2018, 02:40:28 Copyright (C) 2013 The Apache Software Foundation.

二、配置版本库 this

修改svn的默认数据根目录/var/svn,也能够不修改,此处我将数据根目录设置为/home/svnspa

[root@localhost home]# vi /etc/sysconfig/svnserve # OPTIONS is used to pass command-line arguments to svnserve. # # Specify the repository location in -r parameter: OPTIONS="-r /home/svn"

建立本身的版本库code

[root@localhost home]# svnadmin create /home/svn/webber

配置版本库的用户名和密码,"用户名" = "密码"server

[root@localhost home]# vi /home/svn/webber/conf/passwd
[users] # harry = harryssecret # sally = sallyssecret webber = 123456

配置版本库的权限blog

[root@localhost home]# vi /home/svn/webber/conf/authz

在文件末尾加上用户的权限,如webber版本库根目录的读写权限ci

[webber:/] webber = rw

修改版本库的配置域名

[root@localhost home]# vi /home/svn/webber/conf/svnserve.conf
[general] anon-access = none #控制非鉴权用户访问版本库的权限 auth-access = write #控制鉴权用户访问版本库的权限 password-db = passwd #指定用户名口令文件名 authz-db = authz #指定权限配置文件名 realm = /home/svn/webber               #指定版本库的认证域,即在登陆时提示的认证域名称

全部配置均已经完成,最后一步,启用版本库

[root@localhost home]# svnserve -d -r /home/svn/

三、使用版本库

而后checkout试试可否成功更新版本库webber

[root@localhost webber]# svn checkout svn://192.168.0.108/webber
Authentication realm: <svn://192.168.0.108:3690> /home/svn/webber
Password for 'root': Authentication realm: <svn://192.168.0.108:3690> /home/svn/webber
Username: webber Password for 'webber': ----------------------------------------------------------------------- ATTENTION!  Your password for authentication realm: <svn://192.168.0.108:3690> /home/svn/webber
 can only be stored to disk unencrypted! You are advised to configure your system so that Subversion can store passwords encrypted, if possible. See the documentation for details. You can avoid future appearances of this warning by setting the value of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
'/root/.subversion/servers'. ----------------------------------------------------------------------- Store password unencrypted (yes/no)? yes Checked out revision 0. [root@localhost webber]# ll total 0 drwxr-xr-x. 3 root root  18 Jul 15 01:07 webber
相关文章
相关标签/搜索