yum install -y subversion
(server和client均安装subversion)

configure svn:
[root@node01 ~]# mkdir -p /data/svnroot/myproject
[root@node01 ~]# svnadmin create !$
svnadmin create /data/svnroot/myproject
[root@node01 ~]# cd !$/conf
cd /data/svnroot/myproject/conf
[root@node01 conf]# ll
total 12
-rw-r--r-- 1 root root 1080 Dec 29 23:02 authz
-rw-r--r-- 1 root root 309 Dec 29 23:02 passwd
-rw-r--r-- 1 root root 2279 Dec 29 23:02 svnserve.conf

[root@node01 conf]# vim authz
[groups]
admins = user1,user2
[/]
@admins = rw
* = r

[root@node01 conf]# vim passwd
[users]
# harry = harryssecret
# sally = sallyssecret
user1 = nihaoa
user2 = nihaoa

[root@node01 conf]# vim svnserve.conf
[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz
realm = /data/svnroot/myproject

[root@node01 conf]# svnserve -d -r /data/svnroot/
[root@node01 conf]# ps -ef |grep svn
root 1303 1 0 23:15 ? 00:00:00 svnserve -d -r /data/svnroot/
root 1305 1250 0 23:15 pts/0 00:00:00 grep svn
[root@node01 conf]# netstat -lnpt |grep svn
tcp 0 0 0.0.0.0:3690 0.0.0.0:* LISTEN 1303/svnserve

client checkout svn:
[root@node02 ~]# mkdir ~/svntest
[root@node02 ~]# cd !$
cd ~/svntest
[root@node02 svntest]# svn checkout svn://10.100.1.121/myproject --username=user1
Authentication realm: <svn://10.100.1.11:3690> /data/svnroot/myproject
Password for 'user1':

-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:

<svn://10.100.1.11:3690> /data/svnroot/myproject

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@node02 svntest]# ls
myproject
[root@node02 svntest]# ll -at myproject/
total 12
drwxr-xr-x 6 root root 4096 Dec 29 23:22 .svn
drwxr-xr-x 3 root root 4096 Dec 29 23:22 .
drwxr-xr-x 3 root root 4096 Dec 29 23:22 ..
[root@node02 svntest]# cd myproject/
[root@node02 myproject]# cp /etc/fstab .
[root@node02 myproject]# svn add ./fstab //添加到版本控制中心
A fstab
[root@node02 myproject]# svn commit -m "add fstab" //把文件上传到服务器
Adding fstab
Transmitting file data .
Committed revision 1.
[root@node02 myproject]# svn update //更新当前目录的文件
At revision 1.
[root@node02 myproject]# ls
fstab

[root@node01 ~]# mkdir ~/svntest
[root@node01 ~]# cd ~/svntest/
[root@node01 svntest]# svn checkout svn://10.100.1.121/myproject --username=user1
A myproject/fstab
Checked out revision 1.
[root@node01 svntest]# ll -at myproject/
total 16
drwxr-xr-x 6 root root 4096 Dec 29 23:37 .svn
drwxr-xr-x 3 root root 4096 Dec 29 23:37 .
-rw-r--r-- 1 root root 805 Dec 29 23:37 fstab
drwxr-xr-x 3 root root 4096 Dec 29 23:37 ..

[root@node01 myproject]# cp /etc/passwd .
[root@node01 myproject]# svn add ./passwd
A passwd
[root@node01 myproject]# svn commit -m "add passwd"
Adding passwd
Transmitting file data .
Committed revision 2.
[root@node01 myproject]# svn update
At revision 2.
[root@node01 myproject]# ll -t
total 8
-rw-r--r-- 1 root root 890 Dec 29 23:49 passwd
-rw-r--r-- 1 root root 805 Dec 29 23:37 fstab
[root@node01 myproject]# svn delete passwd //在本地删除文件
D passwd
[root@node01 myproject]# svn commit -m "delete passwd" //在服务器上删除
Deleting passwd

Committed revision 3.
[root@node01 myproject]# svn up //更新同步
At revision 3.
[root@node01 myproject]# ll -t
total 4
-rw-r--r-- 1 root root 805 Dec 29 23:37 fstab

[root@node01 myproject]# svn log //查看变更日志
------------------------------------------------------------------------
r3 | user1 | 2018-12-29 23:52:47 +0800 (Sat, 29 Dec 2018) | 1 line

delete passwd
------------------------------------------------------------------------
r2 | user1 | 2018-12-29 23:50:51 +0800 (Sat, 29 Dec 2018) | 1 line

add passwd
------------------------------------------------------------------------
r1 | user1 | 2018-12-29 23:32:00 +0800 (Sat, 29 Dec 2018) | 1 line

add fstab
------------------------------------------------------------------------

代码管理平台之svn的更多相关文章

  1. Visual SVN 企业版代码管理平台的建设

    通常需要完整的SVN的代码管理平台系统的搭建,需要安装三个文件,Visual SVN server  , TortoiseSVN, Visual SVN. Visual SVN server  企业版 ...

  2. 阿里云代码管理平台 Teambition Codeup(行云)亮相,为企业代码安全护航

    2019杭州云栖大会企业协作与研发效能专场,企业协同平台Teambition负责人齐俊元正式发布阿里云自研的代码管理平台Teambition Codeup(行云),Codeup是一款企业级代码管理产品 ...

  3. Dubbo入门到精通学习笔记(三):持续集成管理平台之SVN版本管理系统的安装和使用

    文章目录 持续集成管理平台介绍 持续集成介绍 持续集成管理平台的组成 持续集成实践介绍 即将学习 SVN版本管理系统的安装 安装 Subversion + Apache 安装 jsvnadmin 简单 ...

  4. 代码管理平台之git

    yum install -y gitmkdir -p /date/gitrootcd !$git init git add 1.txtgit commit -m "add 1.txt&quo ...

  5. 从零开始搭建gitea代码管理平台

    Gitea,一款极易搭建的Git自助服务.如其名,Git with a cup of tea.跨平台的开源服务,支持Linux.Windows.macOS和ARM平台.配置要求低,甚至可以运行在树莓派 ...

  6. Docker搭建Gitlab代码管理平台

    一.Gitlab的安装 宿主机环境: CentOS 7 docker docker-compose 1.查找镜像 docker search gitlab 2.拉取镜像 docker pull git ...

  7. 探讨 Git 代码托管平台的若干问题

    关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...

  8. 探讨 Git 代码托管平台的若干问题 - 2019 版

    关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...

  9. 使用git将自己的代码同时保存在多个代码托管平台

    现在有很多代码管理平台,例如github,oschina-git,coding.net,我的网速有时候访问github比较慢.这时候我使用国内的.但是只使用一家我已不知道我的代码在他们的管理平台是否足 ...

随机推荐

  1. Log4net 使用汇总(网络收集整理)

    原帖1:http://blog.csdn.net/wanzhuan2010/article/details/7587780 原帖2:http://grim1980.blog.sohu.com/2555 ...

  2. css之文本两端对齐的两种解决方法

    说起文本对齐,大家都知道text-align,最常用的有left.right.center,今天我们说一下justify,也就是文本两端 对齐.说起来简单,但是有些小坑大家还是要注意的. 现在我们有这 ...

  3. 【Android - 自定义View】之自定义View实现“刮刮卡”效果

    首先来介绍一下这个自定义View: (1)这个自定义View的名字叫做 GuaguakaView ,继承自View类: (2)这个View实现了很多电商项目中的“刮刮卡”的效果,即用户可以刮开覆盖层, ...

  4. for源码实现

    for源码实现 我们知道,java的while和for基本上是实现一样的功能,这样会不会有一点缺点,同时java的迭代器显得尤为的麻烦. python的for和while就不同了,在实现迭代的功能的情 ...

  5. 第三章 学习Shader所需的数学基础(4)

    法线变换 法线(normal),也被称为法矢量(normal vector).在以前我们已经讲过如何使用变换矩阵来变换一个顶点或方向矢量,但法线是需要我们特殊处理的一种方向矢量.在游戏中,模型的顶点往 ...

  6. php 7.4 的 Unpacking inside arrays (...)

    总的说明 php 7.4 增加了一个很有意思的功能 这是官方说明: Unpacking inside arrays <?php$parts = ['apple', 'pear'];$fruits ...

  7. C#中的委托和事件(二)

    引言 如果你看过了 C#中的委托和事件 一文,我想你对委托和事件已经有了一个基本的认识.但那些远不是委托和事件的全部内容,还有很多的地方没有涉及.本文将讨论委托和事件一些更为细节的问题,包括一些大家常 ...

  8. 免费试用 | 多模 NoSQL 服务GeminiDB for Cassandra 全球首发

    PS:多模NoSQL服务GeminiDB重磅公测,免费体验,参与公测还有华为AI音响好礼相送~ 7月5日,华为云多模 NoSQL 服务GeminiDB for Cassandra正式对外定向邀测.华为 ...

  9. activate-power-mode,让你在Python编码中,感受炫酷的书写特效!

    Atom Atom 是github专门为程序员推出的一个跨平台文本编辑器,具有简洁和直观的图形用户界面,并有很多有趣的特点:支持CSS,HTML,JavaScript等网页编程语言.说到这里大家以为我 ...

  10. Maven学习整理

    1. window系统中安装Maven 2. 解决使用代理联网时无法下载jar包 3. 配置本地仓库 4. 处理本地仓库和中央仓库都没有依赖的jar包的情况