[转]Linux(centOS6.5)下SVN的安装、配置及开机启动
1.检查是否已安装
如果要卸载旧版本:
2.安装
[root@localhost ~]# cd /etc/httpd/modules;ls|grep svn
mod_authz_svn.so
mod_dav_svn.so
如果没有需要安装mod_dav_svn
#yum -y install mod_dav_svn(我装了)
3.检查是否安装成功
如果成功会输出版本号
4.创建仓库目录
例如:
ll
如果成功,game目录下会多出几个文件夹
7、配置代码库
进入上面生成的文件夹conf下,进行配置
cd /var/www/svn/repos/conf
7.1用户密码passwd配置
vim 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 ##新增用户的用户名和密码
7.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
设置[/]代表根目录下所有的资源
7.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=/var/www/svn/repos
防火墙 开放svn端口默认是3690端口
启动svn服务
svnserve -d -r /opt/svn/repositories
8、查看SVN进程
ps -ef|grep svn|grep -v grep
返回
root 20850 1 0 Jul24 ? 00:00:00 svnserve -d -r /opt/svn/repositories
9、查看SVN监听的端口
netstat -ln |grep 3690
10、停止启动SVN
killall svnserve #停止
svnserve -d -r /opt/svn/repositories #启动
首先:编写一个启动脚本svn_startup.sh,我放在/root/svn_startup.sh
/usr/bin/svnserve -d -r /home/svn/
这里的svnserve路径保险起见,最好写绝对路径,因为启动的时候,环境变量也许没加载。
绝对路径怎么查?
这里还有可能碰到一个问题,如果你在windows下建立和编写的脚本,拿到linux下,用vi或者vim修改后可能会无法执行,这是文件格式的问题
输入:set ff 回车
如果显示的结果不是fileformat=unix
再次输入
set ff=unix
就OK了
然后修改该脚本的执行权限
或者万能的
chmod 777 svn_startup.sh
最后:加入自动运行
在末尾添加脚本的路径,如:
/root/svn_startup.sh
现在,你可以重启一下试试了。 不懂得怎么确认成功?败给你了
目前最流行的svn客户端非TortoiseSVN莫属
下载安装
客户端连接地址:svn://公网或内网的IP地址,有时候需要添加端口号
用户名/密码: test/123456789 ##要和之前设置的用户名和密码匹配
注意:
默认端口为3690,如果该端口被占用,或者需要修改端口,使用下面语句
svnserve -d -r /opt/svn/repositories --listen-port 3691
[转]Linux(centOS6.5)下SVN的安装、配置及开机启动的更多相关文章
- linux(centos6.9)下使用yum安装mysql,及启动MySQL等
查看系统自带的mysql版本:rpm -qa | grep mysql 卸载mysql:rpm -e mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps 1. 安装my ...
- Linux(centOS6.5)下SVN的安装、配置及开机启动
http://www.blogjava.net/rockblue1988/archive/2014/11/19/420246.aspx
- Redis安装配置以及开机启动
1.下载源码,解压缩后编译源码. $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ .tar.gz $ cd redis- ...
- Linux centos7系统下svn的安装与配置
一.安装svn # yum -y install svn 二.查看svn版本信息 # svnserve --version 三.搭建svn版本库(假设项目名称为project) 1.首先创建版本库目录 ...
- linux(centos6.9)下rpm方式安装mysql后mysql服务无法启动
以下两种方式启动都报错:启动失败: [root@node03 ~]# service mysqld startMySQL Daemon failed to start.Starting mysqld: ...
- CentOS6.5下的Nagios安装配置详解(图文)
最近因为,科研需要,接触上了Nagios,这里,我将安装笔记做个详解.为自己后续需要和博友们学习! VMware workstation 11 的下载 VMWare Workstation 11的安装 ...
- Linux(CentOS6.5)下修改Nginx初始化配置
本文地址http://comexchan.cnblogs.com/,作者Comex Chan,尊重知识产权,转载请注明出处,谢谢! 首先备份相关文件: cp /comexHome/nginx/conf ...
- 【转载并整理】Linux - centOS 6 SVN服务器安装、配置及开机启动
以前在windows上安装svn服务器,用的是VisualSVN-Server用起来还不错,但只能用在windows,在linux上部署使用是 subversion,具体说明如下 参考原文:http: ...
- CentOS下使用yum安装配置和使用svn
安装说明 系统环境:CentOS-6.3安装方式:yum install (源码安装容易产生版本兼容的问题)安装软件:系统自动下载SVN软件 检查已安装版本 ? 1 2 3 4 5 6 7 8 9 1 ...
随机推荐
- FastReport配置打印预览button_C++
如需转载请标明出处:http://blog.csdn.net/itas109 FastReport採用C++方式.配置打印预览选项 //打印预览 //配置打印预览选项 pReport->Prev ...
- 如何在UILable上添加点击事件?
最近开始学习iOS开发,今天上来写第一个iOS笔记 昨天碰到一个需求,在UILable上添加点击事件,网上找了写资料,有人建议用透明的UIButton覆盖,有人建议写一个集成自UILable的类,扩展 ...
- ios7以上自定义导航栏标题的字体大小及颜色的方法
自定义导航栏的字体和颜色,只需要自定义一个lable,然后将lable添加到导航栏的titleview中就可以了 代码如下 UILabel *label = [[UILabel alloc] init ...
- BZOJ 4143 The Lawyer
这道题看起来很吓人,但事实上看懂后会发现,其根本没有任何技术含量,做这道题其实要考虑的就是每天最早结束的一场的结束时间以及最晚开始的一场的开始时间,如果结束时间早于开始时间,那么OK就这 ...
- VC++实现生成右键菜单及添加图标
用VC++实现弹出菜单比较简单,这里介绍其中的一种来实现一个鼠标右键弹出菜单,效果如下图所示: 步骤: 一.新建一个基于对话框的MFC应用程序-----PopMenu 二.添加一个菜单资源------ ...
- perl 安装Net::ZooKeeper
<pre name="code" class="python"><pre name="code" class=" ...
- cocos2dx进阶学习之CCTMXTiledMap
继承关系 CCTMXTiledMap -> CCNode 它由CCNode派生,我们已经知道CCNode是cocos2dx的舞台对象的公共父类,所以CCTMXTiledMap也是个舞台对象 成员 ...
- Uva 1103 Ancient Messages
大致思路是DFS: 1. 每个图案所包含的白色连通块数量不一: Ankh : 1 ; Wedjat : 3 ; Djed : 5 ; Scarab : 4 ; Was : 0 ; Ak ...
- poj 2021 Relative Relatives(暴力)
题目链接:http://poj.org/problem?id=2021 思路分析:由于数据较小,采用O(N^2)的暴力算法,算出所有后代的年龄,再排序输出. 代码分析: #include <io ...
- 【DWR】Annotation入门
DWR简介:http://baike.baidu.com/view/73492.htm?fr=aladdin DWR2.0以后新增加了JDK5的注解(Annotation)功能,使用注解功能之后可以从 ...