服务端安装完成后

1.创建一个存放仓库的文件夹(这里在home目录创建)

#mkdir svnRepo
#cd svnRepo/

创建一个仓库 (写全路径)

# svnadmin create /root/svnRepo/test.com

查看仓库里面默认的文件结构

[root@wentao13 svnRepo]# cd test.com/
[root@wentao13 test.com]# ll
total
drwxr-xr-x. root root Mar : conf //配目录件 匿名读写,授权都要在这里修改
drwxr-sr-x. root root Mar : db //程序存放
-r--r--r--. root root Mar : format
drwxr-xr-x. root root Mar : hooks //钩子 实现一些高级功能
drwxr-xr-x. root root Mar : locks
-rw-r--r--. root root Mar : README.txt
[root@wentao13 test.com]#

启动仓库(这里对整个大仓库的启动,也可以对项目仓库启动,也就是单库和多库的区别访问方式也不同):

[root@wentao13 svnRepo]# svnserve -d -r /root/svnRepo/

查看是否启动:端口是3690

[root@wentao13 svnRepo]# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0.0.0.0: 0.0.0.0:* LISTEN /svnserve
tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
tcp6 ::: :::* LISTEN /mysqld
tcp6 ::: :::* LISTEN /sshd
tcp6 ::: :::* LISTEN /master

访问(取得联系,及git clone):

[root@wentao13 ]# svn checkout svn://localhost/test.com
Checked out revision .

上面命令完成,本地已经把仓库文件拉下来了,并创建了test.com

drwxr-xr-x.  root root   Mar  : test.com
[root@wentao13 ]# cd test.com/
[root@wentao13 test.com]# ll -a
total
drwxr-xr-x. root root Mar : .
drwxr-xr-x. root root Mar : ..
drwxr-xr-x. root root Mar : .svn

接下来,修改本地文件,提交:

1.加入提交队列

[root@wentao13 test.com]# svn add .php
A .php

2.提交svn库里面

[root@wentao13 test.com]# svn commit -m "commit 1.php file" .php
svn: E170001: Commit failed (details follow):
svn: E170001: Authorization failed //权限验证失败

一般这样是可以提交成功的,之所以报错,是因为svn服务器禁止匿名用户提交文件.修改svn服务器配置文件即可 (修改下面scnserve.conf文件)

[root@wentao13 conf]# pwd
/root/svnRepo/test.com/conf
[root@wentao13 conf]# ll
total
-rw-r--r--. root root Mar : authz
-rw-r--r--. root root Mar : passwd
-rw-r--r--. root root Mar : svnserve.conf
[root@wentao13 conf]#

配置一个最简单的 (所有匿名用户都可以提交,之后再修改让authz等)

vim svnserve.conf

# anon-access = read
anon-access = write //添加一个 匿名用户都可以提交
# auth-access = write

 

2.现在提交就没有报错 :

[root@wentao13 test.com]# svn commit -m "commit 1.php file" .php
Adding .php
Transmitting file data .
Committed revision .

现在你库里面就有那个文件了 在:

[root@wentao13 ]# pwd
/root/svnRepo/test.com/db/revprops/
[root@wentao13 ]# ll
total
-r--r--r--. root root Mar :
-r--r--r--. root root Mar :

总结提示提交就两步:(之后会有图形界面)

[root@wentao13 test.com]# svn add .php
[root@wentao13 test.com]# svn commit -m "commit 1.php file" .php

下一节介绍下,权限分配  解决冲突等

参考:http://www.runoob.com/svn/svn-start-mode.html

SVN 创建仓库操作的更多相关文章

  1. SVN服务端的版本对比及创建仓库时的注意事项

    SVN是一个开放源代码的版本控制系统,分为客户端和服务端.就windows系统而言,客户端通常使用 TortoiseSVN,下载地址:https://tortoisesvn.net/  ,而服务端通常 ...

  2. SVN学习——简单入门之创建仓库、导入、检出(一)

    从刚刚参加工作就开始使用svn,清晰的记得那年师姐比较生气的来找我:“你怎么又不更新就提交代码了,把我写的都给覆盖掉了”,哈哈~ 虽然一直在用svn,不过在日常工作中主要用到的是简单的操作,而且大多数 ...

  3. Linux下安装SVN,仓库创建,用户权限管理

    Exported from Notepad++           Linux下安装SVN,仓库创建,用户权限管理 1.SVN安装 Ubuntu系统下安装:sudoapt-getinstallsubv ...

  4. (三)svn 服务器端之创建仓库

    创建仓库 svn服务端创建完成需要创建仓库,仓库中存放 要被管理的文件. 通过开始菜单进入  VisualSVN server manager: 主界面为: 右键点击Repositories创建仓库 ...

  5. 5. Git初始化及仓库创建和操作

    4. Git初始化及仓库创建和操作 基本信息设置 1. 设置用户名 git config --global user.name 'itcastphpgit1' 2. 设置用户名邮箱 git confi ...

  6. Ubuntu GitHub操作——创建仓库

    一.创建仓库 1.初始化仓库(只在初始化时执行一次) git init 这部是新建并初始化仓库 2.向仓库中添加文件 git add . 将文件夹内的所有文件都添加到仓库中(注意小“.”),在这部之后 ...

  7. 使用 DDL 语句分别创建仓库表、供应商表、产品表和入库表,并对其进行操作

    查看本章节 查看作业目录 需求说明: 使用 DDL 语句分别创建仓库表.供应商表.产品表和入库表 使用 DML 语句分别新增一条仓库表.供应商表.产品表和入库表记录 使用 DML 语句更新满足指定条件 ...

  8. 利用Cocoapods、SVN 创建私有库实现方案(yoowei)

    由于项目年后要进行组件化,考虑到如果公司内部实现一些私有的组件,不对外公开,而又想在不同项目中使用,该怎么办呢? 使用Cocoapods制作私有库就完美的解决了这个问题.下图就是使用私有库带给我们的好 ...

  9. Git 学习(三)本地仓库操作——git add & commit

    Git 学习(三)本地仓库操作——git add & commit Git 和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念.这在上文已有提及,本文具体说明什么是工作区及暂存区,以及 ...

随机推荐

  1. [BZOJ2152]聪聪可可 点分治/树形dp

    2152: 聪聪可可 Time Limit: 3 Sec  Memory Limit: 259 MB Submit: 3602  Solved: 1858 [Submit][Status][Discu ...

  2. IIS——MIME介绍与添加MIME类型

    MIME(MultipurposeInternet Mail Extensions)多用途互联网邮件扩展类型.是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会 ...

  3. NEUQOJ 1999: 三角形or四边形?【搜索联通块/模拟】

    http://newoj.acmclub.cn/problems/1999 1999: 三角形or四边形? 描述 题目描述: JiangYu很无聊,所以他拿钉子在板子上戳出了一个由.#组成的10*10 ...

  4. 华农oj Problem L: CreatorX背英语【STL】

    Problem L: CreatorX背英语 Time Limit: 1 Sec Memory Limit: 64 MB Submit: 53 Solved: 36 [Submit][Status][ ...

  5. HDU1016 Prime Ring Problem (回溯 + 剪枝)

    本文链接:http://www.cnblogs.com/Ash-ly/p/5398684.html 题意: 给你一个数字N(N <= 20),要求你把这N个数组成一个环,环内的数字不能重复,左右 ...

  6. XML签名

    英文:https://www.javacodegeeks.com/2013/10/xml-security-with-digital-signature-in-java.html 中文:http:// ...

  7. URl 传参时+号变成空格

    前端用base64加密后的数据,传递到后台时发现一个问题: 比如 韩飞 这个名字,base64加密后的字符串为 6Z+p6aOe 但是后端接受到参数为: 6Z p6aOe +号变成了空格,导致后台解密 ...

  8. NOIP2016_day1_No1玩具谜题

    #include <iostream> #include <cstdio> using namespace std; int main () { freopen("t ...

  9. My first blog on cnBlogs!

    以后会长期更新自己的心得体会!以此锻炼自己,奋发向前.

  10. SQL SERVER 内存学习系列

    http://www.cnblogs.com/double-K/p/5049417.html http://blog.sina.com.cn/s/blog_5deb2f5301014wti.html ...