代码管理平台之svn
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的更多相关文章
- Visual SVN 企业版代码管理平台的建设
通常需要完整的SVN的代码管理平台系统的搭建,需要安装三个文件,Visual SVN server , TortoiseSVN, Visual SVN. Visual SVN server 企业版 ...
- 阿里云代码管理平台 Teambition Codeup(行云)亮相,为企业代码安全护航
2019杭州云栖大会企业协作与研发效能专场,企业协同平台Teambition负责人齐俊元正式发布阿里云自研的代码管理平台Teambition Codeup(行云),Codeup是一款企业级代码管理产品 ...
- Dubbo入门到精通学习笔记(三):持续集成管理平台之SVN版本管理系统的安装和使用
文章目录 持续集成管理平台介绍 持续集成介绍 持续集成管理平台的组成 持续集成实践介绍 即将学习 SVN版本管理系统的安装 安装 Subversion + Apache 安装 jsvnadmin 简单 ...
- 代码管理平台之git
yum install -y gitmkdir -p /date/gitrootcd !$git init git add 1.txtgit commit -m "add 1.txt&quo ...
- 从零开始搭建gitea代码管理平台
Gitea,一款极易搭建的Git自助服务.如其名,Git with a cup of tea.跨平台的开源服务,支持Linux.Windows.macOS和ARM平台.配置要求低,甚至可以运行在树莓派 ...
- Docker搭建Gitlab代码管理平台
一.Gitlab的安装 宿主机环境: CentOS 7 docker docker-compose 1.查找镜像 docker search gitlab 2.拉取镜像 docker pull git ...
- 探讨 Git 代码托管平台的若干问题
关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...
- 探讨 Git 代码托管平台的若干问题 - 2019 版
关于 Git 版本控制软件种类繁多,维基百科收录的最早的版本控制系统是 1972 年贝尔实验室开发的 Source Code Control System.1986 年 Concurrent Vers ...
- 使用git将自己的代码同时保存在多个代码托管平台
现在有很多代码管理平台,例如github,oschina-git,coding.net,我的网速有时候访问github比较慢.这时候我使用国内的.但是只使用一家我已不知道我的代码在他们的管理平台是否足 ...
随机推荐
- insertBefore()
insertBefore()方法将把一个给定的节点插入到一个给定元素节点的给定子节点前面,他返回一个指向新增子节点的引用指针: reference = element.insertBefore(new ...
- ansible roles 介绍和使用
目录 roles roles 介绍 创建role的步骤 role内个目录中可用的文件 案例 roles roles 介绍 ansible 自1.2版本引入的新特性,用于层次性.结构化地组织playbo ...
- The place where I want to go
The place where I want to go It’s hard to say where I want to go most. Because there are too many pl ...
- C语言l-2019秋作业01
2.1 你对软件工程专业或者计算机科学与技术专业了解是怎样? 在进入大学之前,我认为软件工程就是学习开发软件的,后来,从网上搜索了有关它的定义,软件工程是一门研究用工程化方法构建和维护软件的学科,它以 ...
- C语言博客作业11
一.本周教学内容&目标 第5章 函数 要求学生掌握各种类型函数的定义.调用和申明,熟悉变量的作用域.生存周期和存储类型. 二.本周作业头 这个作业属于那个课程 C语言程序设计II 这个作业要求 ...
- Android 子线程更新UI 异常
众所周知,Android是不可以在子线程中直接更新UI的,需要借助Handler或者View.post(Runnable runnable)或者runOnUIThread(Runnable runna ...
- Java语法进阶12-集合
集合 集合:是一种容器,用来装对象的容器,不能装基本数据类型. 数组也是容器,可以用来装基本数据类型,也可以用来装对象. 本质上,集合需要用对应的数据结构实现,是多个类实现接口Collection系列 ...
- netty的调优-及-献上写过注释的源码工程
Netty能干什么? Http服务器 使用Netty可以编写一个 Http服务器, 就像tomcat那样,能接受用户发送的http请求, , 只不过没有实现Servelt规范, 但是它也能解析携带的参 ...
- idea 使用下Java JDK安装
下载idea 百度云: 链接:https://pan.baidu.com/s/1pmDTH-W1_BhSYJAlcAvljQ 提取码:sgmk 下载Java1.8(jdk-8u181 ...
- 基于Docker快速搭建ELK
[摘要] 本文基于自建的Docker平台速搭建一套完整的ELK系统,相关的镜像直接从Docker Hub上获取,可以快速实现日志的采集和分析检索. 准备镜像 l 获取ES镜像:docker pull ...