search
Homephp教程php手册在服务器上搭建SVN

本文以Centos为测试环境,进行SVN搭建示例。
一、测试安装环境
在服务器上搭建SVN

二、安装命令yum install subversion -y在服务器上搭建SVN

类似出现如下图所示的内容,说明安装完成
在服务器上搭建SVN

二、三、测试查看版本svnserve --version在服务器上搭建SVN
到这里SVN已经安装完成。

四:建立SVN库
创建目录:mkdir -p /opt/svn/repos创建一个新的空版本库:svnadmin create /opt/svn/repos执行上面的命令后,自动在repos下建立多个文件, 分别是conf, db,format,hooks, locks, README.txt。
在服务器上搭建SVN在服务器上搭建SVN

五、配置SVN内容
进入上面生成的文件夹conf下,进行配置, 有以下几个文件authz, passwd, svnserve.conf
其中authz 是权限控制,可以设置哪些用户可以访问哪些目录, passwd是设置用户和密码的, svnserve是设置svn相关的操作。
1. 设置passwd

这样我们就建立了test用户, 123密码 。
在服务器上搭建SVN

2. 设置权限authz

设置test用户对所有的目录有读写权限,当然也可以限定。
在服务器上搭建SVN

3. 设定svnserve.conf

   anon-access = none # 使非授权用户无法访问<br>         auth-access = write # 使授权用户有写权限<br>         password-db = password<br>         authz-db = authz   # 访问控制文件<br>         realm = /opt/svn/repos # 认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字。<br>         采用默认配置. 以上语句都必须顶格写, 左侧不能留空格, 否则会出错.在服务器上搭建SVN

4. 启动svnkillall svnserve //先杀死所有的SVN进程   svn: svnserve -d -r /opt/svn/repos在服务器上搭建SVN
查看启动端口:在服务器上搭建SVN

六、链接

使用SVN客户端工具,安装TortoiseSVN后,右击D:\test目录选择Checkout即可,测试环境下连接正常。
在服务器上搭建SVN在服务器上搭建SVN在服务器上搭建SVN在这里说我的迷点<br> 第一:SVN的路径URL的构成也就是检出的时候需要的路径<br> 首先是svn://host(ip)/<br> 然后看这条命令  svn: svnserve -d -r /opt/svn/repos<br> 如果这条命令你写到了项目名称也就是仓库名称 地址就是svn://host(ip)/<br> 如果你是这样写  svn: svnserve -d -r /opt/svn/<br> 那么地址就是svn://host(ip)/repos<br> <br> 第二个多个版本库的运用<br> 你可以使用svnadmin 创建多个版本库,为了好管理,你最好是都创建在同一目录下面。因为启动SVN服务只能是一个目录而已。<br> 创建好之后,你可以把配置文件都移动到外层,然而你就可以配置好三个文件,对应多个版本库。<br> <br> 第三个SVN的高级命令教程需要自己去研究了,本文指望能领进门而已。<br> <br> 欢迎加我QQ164418960 一起讨论。我也还是一个新手。也欢迎大家留言发表看法或者指出缺点,我会改正。谢谢大家

AD:真正免费,域名+虚机+企业邮箱=0元

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools