代码管理平台之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比较慢.这时候我使用国内的.但是只使用一家我已不知道我的代码在他们的管理平台是否足 ...
随机推荐
- 如何平滑优雅地在Rancher 2.x中升级cert-manager?
作者: Nassos Michas丨European Dynamics SA, CTO 如果你正在使用由Rancher提供的Helm Chart在Rancher管理的Kubernetes集群中安装ce ...
- oralce迁移Mysql问题总结
最近从oracle数据库迁移到Mysql, 总结了一些不兼容和需要注意的地方,持久层用的Mybatis 1 guid尽量用代码生成 现象:sys_guid() mysql报错,mysql对应的为UU ...
- drf目录
drf目录 1 web接口与restful规范 2 django中的restful规范 3 CBV请求分析 4 请求模块分析 5 响应模块分析 6 异常模块 7 解析模块 8 序列化类 9 视图组件 ...
- DJango中事务的使用
Django 中事务的使用 Django默认的事务行为 默认情况下,在Django中事务是自动提交的.当我们运行Django内置的模板修改函数时,例如调用model.save()或model.dele ...
- shell脚本介绍、shell脚本结构和执行、date命令用法、shell脚本中的变量
7月11日任务 20.1 shell脚本介绍20.2 shell脚本结构和执行20.3 date命令用法20.4 shell脚本中的变量 20.1 shell脚本介绍 1.shell脚本语言是linu ...
- 2019-2020-2 20199317《Linux内核原理与分析》第二周作业
第一章 计算机工作原理 1 存储程序计算机工作模型 存储程序计算机的主要思想是将程序存放在计算机存储器中,然后按存储器中的存储程序的首地址执行程序的第一条指令,以后就按照该程序中编写 ...
- 解决mysql java.sql.SQLException: The server time zone value‘XXXXXX' is unrecognized or represents...
解决 java.sql.SQLException: The server time zone value 'XXXXXX' is unrecognized or represents more tha ...
- make命令和makefile
make命令和Makefiles: 1. make是一个命令,解释makefile中指令的命令工具,不同的IDE有自己的make命令. 1. make命令不知道怎么去构建程序,必须有一个文件告诉mak ...
- 【华为云实战开发】9.如何进行PHP项目的快速搭建并实现CICD?【华为云技术分享】
1 概述 1.1 文章目的 本文主要想为研发PHP项目的企业或个人提供上云指导,通过本文中的示例项目 “workerman-todpole”,为开发者提供包括项目管理,代码托管,代码检查,编译构建,测 ...
- 转:FileSync plugin for Eclipse 安装注意事项 Eclipse文件同步插件
习惯了使用MyEclipse,各种插件不用自己安装,觉得开发起来很方便,现在大家都用Eclipse了,还有不用Eclipse用更高级的,IT当然开发大型项目没人用UltraEdit吧,虽然是一个不错的 ...