Centos搭建SVN服务器subversion

简介:

1、安装  subversion

1
2
3
4
5
6
7
8
9
10
11
yum  install  subversion
#最终显示
Installed:
   subversion.x86_64 0:1.6.11-12.el6_6                                                                                                                                                          
 
Dependency Installed:
   apr.x86_64 0:1.3.9-5.el6_2       apr-util.x86_64 0:1.3.9-3.el6_0.1     libproxy.x86_64 0:0.3.0-10.el6     libproxy-bin.x86_64 0:0.3.0-10.el6     libproxy-python.x86_64 0:0.3.0-10.el6    
   neon.x86_64 0:0.29.3-3.el6_4     pakchois.x86_64 0:0.4-3.2.el6         perl-URI.noarch 0:1.40-2.el6      
 
Complete!
#代表安装成功

2、判断是否安装成功

1
2
3
4
5
6
7
8
9
10
11
12
13
14
svnserve --version
svnserve, version  1.6 . 11  (r934486)
    compiled Feb  10  2015 22 : 08 : 22
 
Copyright (C)  2000 - 2009  CollabNet.
Subversion  is  open source software, see http: //subversion.tigris.org/
This product includes software developed by CollabNet (http: //www.Collab.Net/).
 
The following repository back-end (FS) modules are available:
 
* fs_base : Module  for  working  with  a Berkeley DB repository.
* fs_fs : Module  for  working  with  a plain file (FSFS) repository.
 
Cyrus SASL authentication  is  available.

3、建立SVN库。

1
2
[root@li538- 34  ~]# mkdir -p  /opt/svn/repos
[root@li538- 34  ~]# svnadmin create /opt/svn/repos

执行完上面的命令后,在repos下建立conf, db,format,hooks, locks, README.txt。

4、配置svn

进入上面生成的文件夹conf下,进行配置,   有以下几个文件authz, passwd, svnserve.conf
其中authz 是权限控制,可以设置哪些用户可以访问哪些目录,   passwd是设置用户和密码的,    svnserve是设置svn相关的操作。

1
2
3
4
5
6
7
8
9
10
[root@li538-34 ~] # cd /opt/svn/repos
[root@li538-34 repos] # ll
total 24
drwxr-xr-x 2 root root 4096 Feb 24 06:31 conf
drwxr-sr-x 6 root root 4096 Feb 24 06:31 db
-r--r--r-- 1 root root    2 Feb 24 06:31  format
drwxr-xr-x 2 root root 4096 Feb 24 06:31 hooks
drwxr-xr-x 2 root root 4096 Feb 24 06:31 locks
-rw-r--r-- 1 root root  229 Feb 24 06:31 README.txt
[root@li538-34 repos] #


进入conf打开passwd

1
2
3
4
5
6
7
[root@li538-34 repos] # cd conf
[root@li538-34 conf] # ll
total 12
-rw-r--r-- 1 root root 1080 Feb 24 06:31 authz
-rw-r--r-- 1 root root  309 Feb 24 06:31  passwd
-rw-r--r-- 1 root root 2279 Feb 24 06:31 svnserve.conf
[root@li538-34 conf] # vim passwd
1
2
3
4
5
[ users ]
# harry = harryssecret
# sally = sallyssecret
ningyuqiao=ningyuqiao
用户名=密码

打开authz,设置权限

1
2
[/]
ningyuqiao=rw

意思是ningyuqiao用户对所有的目录有读写权限

设定svnserv.conf

1
2
3
4
5
anon-access = none  # 使非授权用户无法访问
auth-access = write  # 使授权用户有写权限
password-db =  passwd
authz-db = authz    # 访问控制文件
realm =  /opt/svn/repos  # 认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字。

注意:把中文全部去掉,否则会报错。

启动svn服务

1
svnserve -d -r  /opt/svn/repos

如果已经有svn在运行,可以换一个端口运行

1
svnserve -d -r  /opt/svn/repos  --listen-port 3391

采用TortoiseSVN, 连接地址为: svn://your server address (如果指定端口需要添加端口  :端口号)\







      本文转自ning1022 51CTO博客,原文链接:http://blog.51cto.com/ning1022/1615063,如需转载请自行联系原作者





相关文章
|
2月前
|
存储 安全 Linux
新 CentOS 7 服务器的基本配置
新 CentOS 7 服务器的基本配置
41 1
|
2月前
|
Android开发
svn服务器配置常见问题
svn服务器配置常见问题
53 1
|
2月前
|
运维 网络协议 Linux
揭秘CentOS 7:系统目录奥秘大起底,网卡配置秒变高手,让你的服务器管理飞一般的感觉!
【8月更文挑战第5天】CentOS 7作为RHEL的社区版本,以其稳定性和丰富功能广受好评。本文通过案例分析介绍其系统目录结构及网卡配置方法。系统目录如/(根)、/bin(基本命令)、/boot(启动文件)、/dev(设备文件)、/etc(配置文件)、/home(用户目录)和/lib(共享库)等各司其职。网卡配置通过编辑/etc/sysconfig/network-scripts/下的ifcfg文件实现,如设置ens33接口的静态IP地址、子网掩码、网关和DNS服务器,并通过重启网络服务使配置生效。这是系统管理员必备的技能之一。
48 2
|
2月前
|
网络协议 Linux Shell
如何在运行Centos 6的虚拟服务器上安装cPanel
如何在运行Centos 6的虚拟服务器上安装cPanel
24 0
|
2月前
|
关系型数据库 MySQL Linux
在 CentOS 7 服务器上安装和保护 phpMyAdmin 与 Apache 的方法
在 CentOS 7 服务器上安装和保护 phpMyAdmin 与 Apache 的方法
45 0
|
2月前
|
Linux 数据安全/隐私保护
在CentOS 7服务器上添加和删除用户的方法
在CentOS 7服务器上添加和删除用户的方法
45 0
|
10天前
|
Linux 网络安全 Python
linux centos上安装python3.11.x详细完整教程
这篇文章提供了在CentOS系统上安装Python 3.11.x版本的详细步骤,包括下载、解压、安装依赖、编译配置、解决常见错误以及版本验证。
73 1
linux centos上安装python3.11.x详细完整教程
|
8天前
|
Unix Linux 开发工具
centos的官网下载和vm16虚拟机安装centos8【保姆级教程图解】
本文详细介绍了如何在官网下载CentOS 8以及在VMware Workstation Pro 16虚拟机上安装CentOS 8的步骤,包括可能出现的问题和解决方案,如vcpu-0错误的处理方法。
centos的官网下载和vm16虚拟机安装centos8【保姆级教程图解】
|
9天前
|
消息中间件 Linux
centos7安装rabbitmq
centos7安装rabbitmq
|
8天前
|
Linux 虚拟化 Windows
完美解决:重新安装VMware Tools灰色。以及共享文件夹的创建(centos8)
这篇文章提供了解决VMware Tools无法重新安装(显示为灰色)问题的步骤,并介绍了如何在CentOS 8上创建和配置VMware共享文件夹。
完美解决:重新安装VMware Tools灰色。以及共享文件夹的创建(centos8)
下一篇
无影云桌面