多语言展示
当前在线:133今日阅读:176今日分享:34

CentOS搭建SVN服务器

CentOS搭建SVN服务器实验网络模型:首先 测试环境采用SVN Server CentOS6.2x86 + Client win7x64客户端使用TortoiseSVN为了实验方便先关闭IPtables和selinux安装SVN#查看本机是否已安装SVN[root@test2 etc]# rpm -qa subversion[root@test2 etc]##卸载旧版[root@test2 etc]# yum remove subversion#安装SVN 为了便于以后操作同时安装其他服务可以仅安装SVN[root@test2 etc]# yum install httpd httpd-devel subversion mod_dav_svn mod_auth_mysql确认已安装了svn模块[root@test2 etc]#cd /etc/httpd/modules[root@test2 etc]# ls | grep svnmod_authz_svn.somod_dav_svn.so验证安装:[root@test2 conf]# svnserve --versionsvnserve,版本 1.6.11 (r934486) 编译于 Apr 11 2013,16:13:51版权所有 (C) 2000-2009 CollabNet。Subversion 是开放源代码软件,请参阅 http://subversion.tigris.org/ 站点。此产品包含由 CollabNet(http://www.Collab.Net/) 开发的软件。下列版本库后端(FS) 模块可用:* fs_base : 模块只能操作BDB版本库。* fs_fs : 模块与文本文件(FSFS)版本库一起工作。Cyrus SASL 认证可用。[root@test2 conf]#创建代码库[root@test2 etc]# mkdir -p /opt/svn/repositories[root@test2 etc]# svnadmin create /opt/svn/repositories执行上面的命令后,自动建立repositories库,查看/opt/svn/repositories 文件夹发现包含了conf, db,format,hooks, locks, README.txt等文件,说明一个SVN库已经建立。用户配置[root@test2 conf]# cd /opt/svn/repositories/conf[root@test2 conf]#vi passwd[users]# harry = harryssecret# sally = sallyssecrettest=123456[root@test2 conf]#vi authz[/]test=rw[root@test2 conf]#vi svnserve.conf[general]#匿名访问的权限,可以是read,write,none,默认为readanon-access=none#使授权用户有写权限auth-access=write#密码数据库的路径password-db=passwd#访问控制文件authz-db=authz#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字realm=/opt/svn/repositories启动SVN#启动SVN[root@test2 conf]#svnserve -d -r /opt/svn/repositories#查看SVN进程[root@test2 conf]# ps -ef|grep svn|grep -v greproot 2301 10 18:58 ? 00:00:00 svnserve -d -r /opt/svn/repositories[root@test2 conf]##检测SVN端口[root@test2 conf]# netstat -ln |grep 3690tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN [root@test2 conf]#[root@test2 conf]# killall svnserve //停止[root@test2 conf]#svnserve -d -r /opt/svn/repositories // 启动[root@test2 conf]#测试
推荐信息