FreeBSD搭建SVN服务器
我最喜欢使用的OS就是FreeBSD,而且现在刚好有一台FreeBSD服务器,所以我想把我的SVN服务器迁移到FreeBSD上,再配合hudson和ant就可以自动编译了。
第一步:安装svn:
在安装它之前先使用命令pkg_delete -f libtool\* 把libtool里的东西去掉让它自动更新到最新的,否则安装时会出错的。
使用ports安装:
cd /usr/ports/devel/subversion/
#make install WITHOUT_BDB=yes WITH_MOD_DAV_SVN=yes APXS=/usr/local/sbin/apxs
说明:WITHOUT_BDB=yes
这是不使用BerkleyDB才加上的,你愿意使用可以去掉,WITH_MOD_DAV_SVN=yes
APXS=/usr/local/sbin/apxs
两个参数是为了支持Apache的WebDAV方式
如果不使用apache的话就可以把对它的支持选项全部去掉。
第二步:建库:
mkdir
/usr/svn
#把它做为svn的要目录
svnadmin create
/usr/svn/projectOne
#projectOne就是建的第一个库
第三步:配置权限:
在projectOne下的conf文件夹下有一个conf文件夹,要修改它下面的三个文件:
1、增加一个用户,打开passwd文件,加入一个用户名与密码:如
[users]
# harry =
harryssecret
# sally =
sallyssecret
test =
test
#这里加入一个test用户,并且密码是test
2、修改用户权限:
打开authz文件,配置如下:(只要修改groups节点)
[groups]
admin =
test
#这里表示有一个admin用户组,这个用户组中用一个叫test的用户
[/]
#这里是特别需要注意,如果启动时是指定的svn的要目录就用/,比如启动是指定的是
#svnserve -r -d
/usr/svn/,
如果启动时指定的是 -r -d
/usr/svn/projectOne
这里就要
用 [/projectOne]b
@admin =
rw
#表示admin组中的用户都有读写权限
* =
r
#
[repository:/baz/fuz]
3、修改svnserver.conf文件,配置如下:
anon-access =
none
#表示不允许匿名用户访问
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
#指写权限分配文件
第三步:启动svn服务:
svn默认启动的是IPV6的,所以在启动时需要加一些参数:
svnserve -d -r
/usr/svn/ --listen-host=0.0.0.0
--listen-port=3690
这样就可以了。
好了,开始使用吧,先建立数据库文件存放位置。我这里建立/usr/local/svn_data文件夹,然后输入:
最新文章
- web app上传图片
- hadoop 性能调优与运维
- js-JavaScript高级程序设计学习笔记11
- python之路之正则表达式
- npoi z
- bzoj 1096: [ZJOI2007]仓库建设
- Android(java)学习笔记141:各种边距设置
- css考核点整理(十)-响应式开发经验,响应式页面的三种核心技术是什么
- git工作区和暂存区
- 理解数据点,自变量和因变量(参数和值)ChartControl
- Javascript中alert<;/script>;的方法
- C++图形编程之graphics.h头文件
- deeplearning.ai 人工智能行业大师访谈 Andrej Karpathy 听课笔记
- 【2016北京集训测试赛】azelso
- Vorticity directions 1: self-improving property of the vorticity
- yml多环境配置
- 经典问题----最短路径(Floyd弗洛伊德算法)(HDU2066)
- springboot No Identifier specified for entity的解决办法
- Python基础(上)
- ​python高级数据可视化视频Dash1
热门文章
- [Algorithm] Radix Sort Algorithm
- [Algorithm] Serialize and Deserialize Binary Tree
- [Angular-Scaled web] 2. Architecture sub-modules
- [Backbone]1. Module, View classed
- Jmeter-Maven-Plugin高级应用:Test Results File Format-Test Results
- Android Wi-Fi Peer-to-Peer(Android的Wi-Fi P2P对等网络)
- Opera Unite 用户指南
- Hibernate(七)一对一映射
- GraphQL返回分页对象
- 栈溢出笔记1.3 准备Shellcode