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

相关文章

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

ubuntu如何部署Dify以及安装Docker? Dify安装部署指南

《ubuntu如何部署Dify以及安装Docker?Dify安装部署指南》Dify是一个开源的大模型应用开发平台,允许用户快速构建和部署基于大语言模型的应用,ubuntu如何部署Dify呢?详细请... Dify是个不错的开源LLM应用开发平台,提供从 Agent 构建到 AI workflow 编排、RA

ubuntu16.04如何部署dify? 在Linux上安装部署Dify的技巧

《ubuntu16.04如何部署dify?在Linux上安装部署Dify的技巧》随着云计算和容器技术的快速发展,Docker已经成为现代软件开发和部署的重要工具之一,Dify作为一款优秀的云原生应用... Dify 是一个基于 docker 的工作流管理工具,旨在简化机器学习和数据科学领域的多步骤工作流。它

Nginx部署React项目时重定向循环问题的解决方案

《Nginx部署React项目时重定向循环问题的解决方案》Nginx在处理React项目请求时出现重定向循环,通常是由于`try_files`配置错误或`root`路径配置不当导致的,本文给大家详细介... 目录问题原因1. try_files 配置错误2. root 路径错误解决方法1. 检查 try_f

Spring Boot项目部署命令java -jar的各种参数及作用详解

《SpringBoot项目部署命令java-jar的各种参数及作用详解》:本文主要介绍SpringBoot项目部署命令java-jar的各种参数及作用的相关资料,包括设置内存大小、垃圾回收... 目录前言一、基础命令结构二、常见的 Java 命令参数1. 设置内存大小2. 配置垃圾回收器3. 配置线程栈大小

tomcat多实例部署的项目实践

《tomcat多实例部署的项目实践》Tomcat多实例是指在一台设备上运行多个Tomcat服务,这些Tomcat相互独立,本文主要介绍了tomcat多实例部署的项目实践,具有一定的参考价值,感兴趣的可... 目录1.创建项目目录,测试文China编程件2js.创建实例的安装目录3.准备实例的配置文件4.编辑实例的

SpringBoot配置Ollama实现本地部署DeepSeek

《SpringBoot配置Ollama实现本地部署DeepSeek》本文主要介绍了在本地环境中使用Ollama配置DeepSeek模型,并在IntelliJIDEA中创建一个Sprin... 目录前言详细步骤一、本地配置DeepSeek二、SpringBoot项目调用本地DeepSeek前言随着人工智能技

通过Docker Compose部署MySQL的详细教程

《通过DockerCompose部署MySQL的详细教程》DockerCompose作为Docker官方的容器编排工具,为MySQL数据库部署带来了显著优势,下面小编就来为大家详细介绍一... 目录一、docker Compose 部署 mysql 的优势二、环境准备与基础配置2.1 项目目录结构2.2 基

CentOS 7部署主域名服务器 DNS的方法

《CentOS7部署主域名服务器DNS的方法》文章详细介绍了在CentOS7上部署主域名服务器DNS的步骤,包括安装BIND服务、配置DNS服务、添加域名区域、创建区域文件、配置反向解析、检查配置... 目录1. 安装 BIND 服务和工具2.  配置 BIND 服务3 . 添加你的域名区域配置4.创建区域