CentOS 6.5系统上安装SVN服务器端的方法及步骤
VN其实就是Subversion,分为服务器端和客户端。之前在网上搜了很多方法,都有各种问题,经过自己搜集整理以及实际尝试,总算有个比较靠谱的方法。本文主要介绍CentOS 6.5系统上安装SVN服务器端的方法及步骤。
系统环境说明如下:
操作系统: Centos6.5 x86-64
SVN: subversion-1.8.11
1、检查是否安装了低版本的SVN
rpm -qa | grep subversion
如果已安装SVN,则会返回版本信息,如:subversion-1.6.11-9.el6_4.i686
卸载旧版本SVN
yum remove subversion
2、安装SVN
yum –y install subversion
3、检查安装是否成功
svnserve –version
返回值:
svnserve, version 1.8.11
compiled Jul 23 2013, 21:32:09 on i686-pc-linux-gnu
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository back-end (FS) modules are available:
* fs_fs : Module for working with a plain file (FSFS) repository.
Cyrus SASL authentication is available.
4、代码库创建
mkdir -p /opt/svn/repositories
svnadmin create /opt/svn/repositories
执行上面的命令后,自动建立repositories库,查看/opt/svn/repositories 文件夹发现包含了conf,db,format,hooks,locks, README.txt等文件,说明一个SVN库建立完成。
5、配置代码库
进入上面生成的文件夹conf下,进行配置
cd /opt/svn/repositories/conf
5.1用户密码passwd配置
vi passwd
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
test = 123456789 ##新增用户的用户名和密码
5.2权限控制authz配置
vi authz
目的是设置哪些用户可以访问哪些目录,authz文件的内容如下:
### This file is an example authorization file for svnserve.
### Its format is identical to that of mod_authz_svn authorization
### files.
### As shown below each section defines authorizations for the path and
### (optional) repository specified by the section name.
### The authorizations follow. An authorization line can refer to:
### - a single user,
### - a group of users defined in a special [groups] section,
### - an alias defined in a special [aliases] section,
### - all authenticated users, using the '$authenticated' token,
### - only anonymous users, using the '$anonymous' token,
### - anyone, using the '*' wildcard.
###
### A match can be inverted by prefixing the rule with '~'. Rules can
### grant read ('r') access, read-write ('rw') access, or no access
### ('').
[aliases]
# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
[groups]
# harry_and_sally = harry,sally
# harry_sally_and_joe = harry,sally,&joe
# [/foo/bar]
# harry = rw
# &joe = r
# * =
# [repository:/baz/fuz]
# @harry_and_sally = rw
# * = r
[/]
test = rw
设置[/]代表根目录下所有的资源
5.3服务svnserve.conf配置
vi svnserve.conf
svnserve.conf文件的内容如下:
[general]
#匿名访问的权限,可以是read,write,none,默认为read
anon-access=none
#使授权用户有写权限
auth-access=write
#密码数据库的路径
password-db=passwd
#访问控制文件
authz-db=authz
#认证命名空间,subversion会在认证提示里显示,并且作为凭证缓存的关键字
realm=/opt/svn/repositories
启动svn服务
svnserve -d -r /opt/svn/repositories
6、查看SVN进程
ps -ef|grep svn|grep -v grep
返回
root 20850 1 0 Jul24 ? 00:00:00 svnserve -d -r /opt/svn/repositories
7、查看SVN监听的端口
netstat -ln |grep 3690
8、停止启动SVN
killall svnserve #停止
svnserve -d -r /opt/svn/repositories #启动
9、安装svn客户端
目前最流行的svn客户端非TortoiseSVN莫属
下载安装
http://sourceforge.net/projects/tortoisesvn/files/latest/download?source=dlp
客户端连接地址:svn://公网或内网的IP地址,有时候需要添加端口号
用户名/密码: test/123456789 ##要和之前设置的用户名和密码匹配
注意:
默认端口为3690,如果该端口被占用,或者需要修改端口,使用下面语句
svnserve -d -r /opt/svn/repositories --listen-port 3691
如果出现:Unable to connect to a repository at URL 'svn://202.72.252.246'
无法连接主机“202.72.252.246'”: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
执行一下语句
iptables -I INPUT -p tcp --dport 3690 -j ACCEPT
保存
/etc/rc.d/init.d/iptables save
重启
service iptables restart
查看
/etc/init.d/iptables status
CentOS 6.5系统上安装SVN服务器端的方法及步骤的更多相关文章
- CentOS 6.5系统上安装SVN服务器端的方法及目录访问权限配置(转总结)
SVN其实就是Subversion,分为服务器端和客户端.之前在网上搜了很多方法,都有各种问题,经过自己搜集整理以及实际尝试,总算有个比较靠谱的方法.本文主要介绍CentOS 6.5系统上安装SVN服 ...
- CentOS 6.5系统上安装SVN服务器
有效地管理源代码的方式是使用工具去帮助我们管理 , SVN(Subversion)就是目前主流的源代码管理工具 , 也称为版本控制工具. 本文主要介绍CentOS6.5上安装SVN服务器,配置SVN服 ...
- linux系统上安装svn服务器 环境linux+nginx+svnserver
系统:Ubuntu 12.04 64位 lnmp环境 集成软件:PHP5.4.27.Nginx1.6.0.MySQL5.5.37 阿里云server svnserver有2种执行方式:独立server ...
- CentOS 6.5系统上安装MySQL数据库
1.查看系统是否安装了MySQL 使用命令: #rpm -qa | grep mysql 2.卸载已安装的MySQL 卸载mysql命令如下: #rpm ...
- 在CentOS6.8系统上安装MySQL5.7(转)
mysql-57">如何在CentOS 6.8系统上安装MySQL 5.7? 一.检查系统上是否已经安装MySQL 命令: ? 1 2 3 4 5 [root@localhost ~] ...
- Linux Centos 系统上安装BT客户端 Transmission
Linux Centos 系统上安装BT客户端 Transmission Transmission是一种BitTorrent客户端,特点是一个跨平台的后端和其上的简洁的用户界面,以MIT许可证和G ...
- 在Linux(CentOS 6.6)服务器上安装并配置基于Apache的SVN服务器
#!/bin/bash # # 在Linux(CentOS 6.6)服务器上安装并配置基于Apache的SVN服务器: # # .安装服务 # .创建svn版本库 # .创建svn用户 # .配置sv ...
- CentOS 6.4 系统上如何安装 tomcat 8
CentOS 6.4 系统上如何安装 tomcat 8 本文将详细讲解在Linux系统上如何安装tomcat,tomcat是没有32位和64位之分的. 1.下载tomcat 首先我们肯定要先下载tom ...
- Linux CentOS系统上安装Eclipse
Linux CentOS系统上安装Eclipse 1. 下载Eclipse软件 下载网址:http://www.eclipse.org/downloads/packages/release/Juno/ ...
随机推荐
- 输入任意IP,将IP转化为minion-IP格式(saltstack)
注1:10.102. 可以替换成其他的,或者手动输入. 注2:minion-可以替换为其他的,或者手动输入. 代码如下(python3): import re # list = [] list1 = ...
- UITableView全面解析,讲的好详细
--UIKit之UITableView 概述 在iOS开发中UITableView可以说是使用最广泛的控件,我们平时使用的软件中到处都可以看到它的影子,类似于微信.QQ.新浪微博等软件基本上随处都是U ...
- BZOJ 2252 矩阵距离
BFS. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm&g ...
- 开启Ubuntu php错误提示 ZT
开启Ubuntu php错误提示 在Ubuntu下,LAMP中PHP错误是不提示的,只会出现一个空白页.当然,这对于运行的生产环境来说是必须的.但有时候也需要查看生产环境上错误提示,那么只要通用下面简 ...
- 后序/中序--->前序
preOrder 5 3 2 4 8 6 9 midOrder 2 3 4 5 6 8 9 postOrder 2 4 3 6 9 8 5 #include <iostream> # ...
- UI基础:UITableView的编辑和移动
相对UITableViiew进行编辑,必须设置代理,让代理遵循UITableViewDataSource和UITableViewDelegate协议.因为需要代理实现协议中几个必须的方法. UITab ...
- Raising Modulo Numbers_快速幂取模算法
Description People are different. Some secretly read magazines full of interesting girls' pictures, ...
- UNION语句查询(转载)
联合查询 在对数据信息进行操作时,有时需要将不同数据表中的数据信息组合在一起,这时需要使用联合查询.联合查询指的是将多表中的行数据组合在一个数据集中进行显示.本节将讲解有关联合查询方面的相关知识. ...
- MySQL表名、列名区分大小写详解
前言:出现的问题 在本地数据库上执行修改银行卡没有报错 但线上执行报错 发现是表找不到,发现表名不对应该是card_cardinfo,但本地上没有问题,能正常修改,然后在数据库里测试,发现本地库(wi ...
- mysql中在表中insert数据时,有重复主键id时,变成update
MySQL 自4.1版以后开始支持INSERT … ON DUPLICATE KEY UPDATE语法 例如: id name sex age 1 kathy male 23 2 Javer f ...