SVN 创建仓库操作
服务端安装完成后
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 创建仓库操作的更多相关文章
- SVN服务端的版本对比及创建仓库时的注意事项
SVN是一个开放源代码的版本控制系统,分为客户端和服务端.就windows系统而言,客户端通常使用 TortoiseSVN,下载地址:https://tortoisesvn.net/ ,而服务端通常 ...
- SVN学习——简单入门之创建仓库、导入、检出(一)
从刚刚参加工作就开始使用svn,清晰的记得那年师姐比较生气的来找我:“你怎么又不更新就提交代码了,把我写的都给覆盖掉了”,哈哈~ 虽然一直在用svn,不过在日常工作中主要用到的是简单的操作,而且大多数 ...
- Linux下安装SVN,仓库创建,用户权限管理
Exported from Notepad++ Linux下安装SVN,仓库创建,用户权限管理 1.SVN安装 Ubuntu系统下安装:sudoapt-getinstallsubv ...
- (三)svn 服务器端之创建仓库
创建仓库 svn服务端创建完成需要创建仓库,仓库中存放 要被管理的文件. 通过开始菜单进入 VisualSVN server manager: 主界面为: 右键点击Repositories创建仓库 ...
- 5. Git初始化及仓库创建和操作
4. Git初始化及仓库创建和操作 基本信息设置 1. 设置用户名 git config --global user.name 'itcastphpgit1' 2. 设置用户名邮箱 git confi ...
- Ubuntu GitHub操作——创建仓库
一.创建仓库 1.初始化仓库(只在初始化时执行一次) git init 这部是新建并初始化仓库 2.向仓库中添加文件 git add . 将文件夹内的所有文件都添加到仓库中(注意小“.”),在这部之后 ...
- 使用 DDL 语句分别创建仓库表、供应商表、产品表和入库表,并对其进行操作
查看本章节 查看作业目录 需求说明: 使用 DDL 语句分别创建仓库表.供应商表.产品表和入库表 使用 DML 语句分别新增一条仓库表.供应商表.产品表和入库表记录 使用 DML 语句更新满足指定条件 ...
- 利用Cocoapods、SVN 创建私有库实现方案(yoowei)
由于项目年后要进行组件化,考虑到如果公司内部实现一些私有的组件,不对外公开,而又想在不同项目中使用,该怎么办呢? 使用Cocoapods制作私有库就完美的解决了这个问题.下图就是使用私有库带给我们的好 ...
- Git 学习(三)本地仓库操作——git add & commit
Git 学习(三)本地仓库操作——git add & commit Git 和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念.这在上文已有提及,本文具体说明什么是工作区及暂存区,以及 ...
随机推荐
- ORA-01157:无法标识/锁定数据文件,ORA-01110:表空间丢失错误
https://blog.csdn.net/u014432433/article/details/51051854
- 线段树【SP1043】GSS1 - Can you answer these queries I
Description 给出了序列\(A_1,A_2,-,A_n\). \(a_i \leq 15007,1 \leq n \leq 50000\).查询定义如下: 查询\((x,y)=max{a_i ...
- PDF审计工具peepdf
PDF审计工具peepdf PDF是Portable Document Format(便携式文档格式)的缩写.它是Adobe公司推出的文件格式规范.现在,PDF是网络电子书籍的主流格式.由于PDF ...
- Uva 12063 Zero and Ones
给个链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...
- 【bzoj4720】【noip2016】【换座位】期望dp+Floyd
[pixiv] https://www.pixiv.net/member_illust.php?mode=medium&illust_id=62370736 wa...已经快一年了,重新来做这 ...
- intellij idea 分屏设置 与快捷键
1.找到分屏功能 File -> setting -> keymap,搜索(注意大小写): Split Vertically 水平分屏 Split Horizontally 垂直分 ...
- SQL常用函数之五 str()
原文:SQL常用函数之五 str() 使用str函数 :STR 函数由数字数据转换来的字符数据. 语法 STR ( float_expression [ , ...
- 在Centos7.x中安装psutil模块
一.window10操作系统(Python 3.6开发环境)安装psutil 1.安装psutil模块 wget https://pypi.python.org/packages/source/p/p ...
- 15个最受欢迎的Python开源框架(转载)
一.Django: Python Web应用开发框架 Django是一个开放源代码的Web应用框架,由Python写成.采用了MVC的软件设计模式,即模型M,视图V和控制器C.它最初是被开发来用于管理 ...
- java、freemarker保留两位小数
一.Java保留2位小数 double acc = 22.4322; String accX = String.format("%.2f", acc); 二.freemarker保 ...