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. 【搞定面试官】你还在用Executors来创建线程池?会有什么问题呢?

    前言 上文我们介绍了JDK中的线程池框架Executor.我们知道,只要需要创建线程的情况下,即使是在单线程模式下,我们也要尽量使用Executor.即: ExecutorService fixedT ...

  2. 【JavaEE】之MyBatis输出映射

    MyBatis中的输出映射有两种:resultType和resultMap. 1.resultType 使用resultType进行结果映射时,只有当查询结果中有至少一列的名称和resultType指 ...

  3. 爬虫框架Scrapy入门——爬取acg12某页面

    1.安装1.1自行安装python3环境1.2ide使用pycharm1.3安装scrapy框架2.入门案例2.1新建项目工程2.2配置settings文件2.3新建爬虫app新建app将start_ ...

  4. shell一键部署nginx+tomcat

    1.首先拉取环境  tomcat需要用到jdk环境 提前准备好nginx源码包,放于指定目录下 vim test.sh #!/bin/bash yum -y install gcc gcc-c++ z ...

  5. ThinkPHP5——Session和Cookie

    Session 首先要引入use think\Session:下面使用静态方法调用Session //赋值 Session::set('name','s1'); //赋值think作用域,set(‘名 ...

  6. Ubuntu 18.04 LTS上安装NFS服务器和客户端

    NFS是基于UDP/IP协议的应用,其实现主要是采用远程过程调用RPC机制,RPC提供了一组与机器.操作系统以及低层传送协议无关的存取远程文件的操作.RPC采用了XDR的支持.XDR是一种与机器无关的 ...

  7. CF1236B Alice and the List of Presents

    题意翻译 有nn种物品和mm个背包,每种物品有无限个,现将若干个物品放到这些背包中,满足: 1.每个背包里不能出现相同种类的物品(允许有空背包): 2.在所有的mm个背包中,每种物品都出现过. 求方案 ...

  8. IPV6-ONLY

    1.ipv4地址已经耗尽,未来可能只支持ipv6-only. 2.在一个纯IPV6环境下,路由器会自动将IPV4地址转成IPv6地址. 苹果这样要求,对于大多数开发者而言,并不困难.目前大多数应用无需 ...

  9. react-native Android release打包失败

    npm run build报错(android) react-native 0.5x在安卓环境 gradle 3.x版本下编译release版本的时候提示编译失败,但是debug模式下是没有问题的. ...

  10. go基础之基本数据结构(数组、slice、map)

    go基本的数据结构有数组.slice.map,高级数据结构为结构体为用户自定义类型.本片文章主要讲解三大基本数据结构. 数组 slice Map 数组 数组是包含单个类型的元素序列,但是长度固定的数据 ...