CentOS6.5 搭建SVN服务

检查是否已经有svn

svnserve --version

在Linux下安装的是subversion,直接用yum 安装即可。 

yum install -y subversion

 创建svn资源仓库

配置文件就是在这一步生成。

[root@localhost ~] svnadmin create /svndir
[root@localhost ~] cd /svndir/
[root@localhost svndir] ls
conf  db  format  hooks  locks  README.txt
[root@localhost svndir] cd conf/
[root@localhost conf] ls
authz  passwd  svnserve.conf

新增用户及密码,配置权限
已经看到在仓库下面生成了三个文件
authz #权限配置文件
passwd #用户名密码文件
svnserve.conf #资源库配置文件 

备份这三个文件,以备不时之需

[root@localhost conf] ls
authz  passwd  svnserve.conf
[root@localhost svndir] scp authz authz.bak
[root@localhost svndir] scp passwd  passwd.bak
[root@localhost svndir] scp svnserve.conf svnserve.conf.bak

 添加新用户

[root@localhost conf]# vim passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
# harry = harryssecret
# sally = sallyssecret
newuser = 123456

 编辑服务配置

[root@localhost conf] vim svnserve.conf

anon-access = read
auth-access = write
password-db = passwd
authz-db = authz
realm = My First Repository

配置用户权限

[root@localhost conf] vim authz

[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe

[/]
# harry = rw
# &joe = r
# * =
newuser = rw
[repository:/]
# @harry_and_sally = rw
# * = r
newuser = rw

启动或者重启服务

[root@localhost conf] /etc/init.d/svnserve start

 查看是否已监听端口

[root@localhost svndir] netstat -antlp | grep svn

 如果无法连接svn服务,则请检查防火墙,访问的地址和相关配置文件。

 

在从机上checkout 根目录

[root@localhost ~] svn checkout svn://192.168.1.65/svndir/
[root@localhost ~] cd svndir/
[root@localhost svndir] ls
[root@localhost svndir] touch xiao

[root@localhost svndir] ls
xiao
[root@localhost svndir] pwd
/root/svndir
[root@localhost svndir] ls
xiao
[root@localhost svndir] svn add /root/svndir/xiao
A         /root/svndir/xiao

[root@localhost svndir] svn commit /root/svndir/xiao -m 1
Authentication realm: <svn://192.168.1.65:3690> My First Repository
Password for 'root':
Authentication realm: <svn://192.168.1.65:3690> My First Repository
Username: ^Csvn: Commit failed (details follow):
  n: Caught signal
[root@localhost svndir] svn commit /root/svndir/xiao -m 1
Authentication realm: <svn://192.168.1.65:3690> My First Repository
Password for 'root':
Authentication realm: <svn://192.168.1.65:3690> My First Repository
Username: yunwei
Password for 'yunwei':

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

   <svn://192.168.1.65:3690> My First Repository

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
Adding         xiao
Transmitting file data .
Committed revision 1.

 注意:
1、提交代码前,必须先cd到/root/svndir/(就是checkout下来的)目录里;
2、服务器上没有的文件,在客户端需要先add预提交,再commit,如果服务器端已有的文件,直接commit

预提交的命令:

 svn add /root/svndir/xiao

提交的命令:

svn commit /root/svndir/xiao -m 1

出现committed revision 1 提交成功了。

 

14. svnserve -d -r /var/svn/default-repo/ #启动svn server (默认端口3690)

注:同一台服务器可以运行多个svnserver,只需要启动时换一个端口即可:svnserve -d -r /var/svn/another-repo/ --listen-port 3691

内容概要:本文详细介绍了900W或1Kw,20V-90V 10A双管正激可调电源充电机的研发过程和技术细节。首先阐述了项目背景,强调了充电机在电动汽车和可再生能源领域的重要地位。接着深入探讨了硬件设计方面,包括PCB设计、磁性器件的选择及其对高功率因数的影响。随后介绍了软件实现,特别是程序代码中关键的保护功能如过流保护的具体实现方法。此外,文中还提到了充电机所具备的各种保护机制,如短路保护、欠压保护、电池反接保护、过流保护和过温度保护,确保设备的安全性和可靠性。通讯功能方面,支持RS232隔离通讯,采用自定义协议实现远程监控和控制。最后讨论了散热设计的重要性,以及为满足量产需求所做的准备工作,包括提供详细的PCB图、程序代码、BOM清单、磁性器件和散热片规格书等源文件。 适合人群:从事电力电子产品研发的技术人员,尤其是关注电动汽车充电解决方案的专业人士。 使用场景及目标:适用于需要高效、可靠充电解决方案的企业和个人开发者,旨在帮助他们快速理解和应用双管正激充电机的设计理念和技术要点,从而加速产品开发进程。 其他说明:本文不仅涵盖了理论知识,还包括具体的工程实践案例,对于想要深入了解充电机内部构造和工作原理的人来说是非常有价值的参考资料。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值