centOS6.4 部署SVN

2024-06-23 08:48
文章标签 部署 svn centos6.4

本文主要是介绍centOS6.4 部署SVN,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

因工作需要,需要准备一台svn,开了几个帖子,有一点不尽人意,刚部署完,共享一份资料。

1、安装


[root@localhost ~]# yum install httpd mod_dav_svn subversion mod_ssl mod_authz_svn.so -y

这里可以直接 yum install httpd* subversion* mod_dav_svn* mod_authz_svn* -y


2、创建代码库

[root@localhost ~]# mkdir /svn/splunk
[root@localhost ~]# svnadmin create /svn/splunk
查看/svn/splunk/下,是否生成conf, db,format,hooks, locks, README.txt等文件,说明一个SVN库已经建立。


3、配置svn

[root@localhost ~]# cd /svn/splunk/conf/
[root@localhost conf]# ls
   authz  passwd  svnserve.conf
(1)访问权限控制
[root@localhost conf]# vim authz 
#配置组
[groups]
#可以创建一个test,组里包含user1和user2
#test = user1,user2


#配置访问控制
[/]
#可以设置组的权限如@test代表组权限,也可以单独配置用户
@test = rw
user1 = rw


(2)svn主配置文件  
第8  13  20   27  32行去掉注释,顶行。
[root@localhost conf]# vim svnserve.conf 
[general]
### These options control access to the repository for unauthenticated
### and authenticated users.  Valid values are "write", "read",
### and "none".  The sample settings below are the defaults.
# anon-access = read
auth-access = write
### The password-db option controls the location of the password
### database file.  Unless you specify a path starting with a /,
### the file's location is relative to the directory containing
### this configuration file.
### If SASL is enabled (see below), this file will NOT be used.
### Uncomment the line below to use the default password file.
password-db = passwd
### The authz-db option controls the location of the authorization
### rules for path-based access control.  Unless you specify a path
### starting with a /, the file's location is relative to the the
### directory containing this file.  If you don't specify an
### authz-db, no path-based access control is done.
### Uncomment the line below to use the default authorization file.
authz-db = authz
### This option specifies the authentication realm of the repository.
### If two repositories have the same authentication realm, they should
### have the same password database, and vice versa.  The default realm
### is repository's uuid.
realm = /svn/splunk


4、配置httpd
[root@localhost conf]# cd /etc/httpd/conf.d/
[root@localhost conf.d]# vim subversion.conf 


还配置文件低端添加,根据实际情况修改/svn/目录
<Location /svn>
DAV svn
SVNParentPath /svn/
AuthType Basic
AuthName "svn"
AuthUserFile /svn/splunk/conf/passwd
AuthzSVNAccessFile /svn/splunk/conf/authz
Require valid-user
</Location>


5、创建apache用户
因为svn通过httpd发出去,所有需要用apache用户登录


第一次创建账号
[root@localhost conf.d]# htpasswd -c /svn/splunk/conf/passwd user1
以后创建账号
[root@localhost conf.d]# htpasswd /svn/splunk/conf/passwd user2


创建完用户后记得在 3-(1)中给用户赋权。


6、启动服务
启动svn
[root@localhost conf.d]# service svnserve start
启动httpd
[root@localhost conf.d]# service httpd start

加入开机启动
[root@localhost conf.d]# chkconfig svnserve on
[root@localhost conf.d]# chkconfig httpd on


因为内网环境中iptables是关闭的,不考虑端口问题,如果开着的话,记的开端口。
[root@localhost conf.d]# iptables -I INPUT -p tcp --dport 3690 -j ACCEPT




有可能碰到的问题
Error: Can’t open ‘/home/svn/db/txn-current-lock’:拒绝访问


解决方法
给svn根目录赋权
[root@localhost conf.d]#chmod –R o+rw /svn/splunk/


在浏览器
http://svn服务器ip/svn/splunk/   输入用户名密码就可以了

这篇关于centOS6.4 部署SVN的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1086689

相关文章

通过Docker容器部署Python环境的全流程

《通过Docker容器部署Python环境的全流程》在现代化开发流程中,Docker因其轻量化、环境隔离和跨平台一致性的特性,已成为部署Python应用的标准工具,本文将详细演示如何通过Docker容... 目录引言一、docker与python的协同优势二、核心步骤详解三、进阶配置技巧四、生产环境最佳实践

Nginx部署HTTP/3的实现步骤

《Nginx部署HTTP/3的实现步骤》本文介绍了在Nginx中部署HTTP/3的详细步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学... 目录前提条件第一步:安装必要的依赖库第二步:获取并构建 BoringSSL第三步:获取 Nginx

redis-sentinel基础概念及部署流程

《redis-sentinel基础概念及部署流程》RedisSentinel是Redis的高可用解决方案,通过监控主从节点、自动故障转移、通知机制及配置提供,实现集群故障恢复与服务持续可用,核心组件包... 目录一. 引言二. 核心功能三. 核心组件四. 故障转移流程五. 服务部署六. sentinel部署

Linux部署中的文件大小写问题的解决方案

《Linux部署中的文件大小写问题的解决方案》在本地开发环境(Windows/macOS)一切正常,但部署到Linux服务器后出现模块加载错误,核心原因是Linux文件系统严格区分大小写,所以本文给大... 目录问题背景解决方案配置要求问题背景在本地开发环境(Windows/MACOS)一切正常,但部署到

使用IDEA部署Docker应用指南分享

《使用IDEA部署Docker应用指南分享》本文介绍了使用IDEA部署Docker应用的四步流程:创建Dockerfile、配置IDEADocker连接、设置运行调试环境、构建运行镜像,并强调需准备本... 目录一、创建 dockerfile 配置文件二、配置 IDEA 的 Docker 连接三、配置 Do

MySQL 主从复制部署及验证(示例详解)

《MySQL主从复制部署及验证(示例详解)》本文介绍MySQL主从复制部署步骤及学校管理数据库创建脚本,包含表结构设计、示例数据插入和查询语句,用于验证主从同步功能,感兴趣的朋友一起看看吧... 目录mysql 主从复制部署指南部署步骤1.环境准备2. 主服务器配置3. 创建复制用户4. 获取主服务器状态5

golang程序打包成脚本部署到Linux系统方式

《golang程序打包成脚本部署到Linux系统方式》Golang程序通过本地编译(设置GOOS为linux生成无后缀二进制文件),上传至Linux服务器后赋权执行,使用nohup命令实现后台运行,完... 目录本地编译golang程序上传Golang二进制文件到linux服务器总结本地编译Golang程序

如何在Ubuntu 24.04上部署Zabbix 7.0对服务器进行监控

《如何在Ubuntu24.04上部署Zabbix7.0对服务器进行监控》在Ubuntu24.04上部署Zabbix7.0监控阿里云ECS服务器,需配置MariaDB数据库、开放10050/1005... 目录软硬件信息部署步骤步骤 1:安装并配置mariadb步骤 2:安装Zabbix 7.0 Server

Web技术与Nginx网站环境部署教程

《Web技术与Nginx网站环境部署教程》:本文主要介绍Web技术与Nginx网站环境部署教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Web基础1.域名系统DNS2.Hosts文件3.DNS4.域名注册二.网页与html1.网页概述2.HTML概述3.

Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例

《Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例》本文介绍Nginx+Keepalived实现Web集群高可用负载均衡的部署与测试,涵盖架构设计、环境配置、健康检查、... 目录前言一、架构设计二、环境准备三、案例部署配置 前端 Keepalived配置 前端 Nginx