centos5.5搭建svn服务器

本文介绍如何在CentOS环境下搭建独立的SVN服务器,并详细解释了安装步骤、配置过程及启动方法。

svn服务器有2种运行方式:
1. 独立服务器 (例如:svn://xxx.com/xxx)
2. 借助apache。(例如:http://svn.xxx.com/xxx)
由于我装的是nginx, 所以选择了第一种方式-独立的svn服务器。
svn存储版本数据也有2种方式:
1. bdb
2. fsfs。
因为bdb方式在服务器中断时,有可能锁住数据,所以还是fsfs方式更安全一点,我也选择这种方式。
我的环境:
1. svn服务器安装操作系统: centOS

安装步骤:
获取svn安装包:
# wget "http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz"
# wget "http://subversion.tigris.org/downloads/subversion-deps-1.6.6.tar.gz"
编译svn以root用户登录:
# tar xfvz subversion-1.6.6.tar.gz
# tar xfvz subversion-deps-1.6.6.tar.gz
# cd subversion-1.6.6
# ./configure -prefix=/opt/svn -without-berkeley-db
(注:以svnserve方式运行,不加apache编译参数。以fsfs格式存储版本库,不编译berkeley-db)
# make && make install
在/etc/profile最后加入 svn path 以方便操作:
# vi /etc/profile
path=$path:/opt/svn/bin
export path
测试是否安装成功:
# svnserve --version

# /opt/svn/bin/svnserve -version
[root@hexu softs]# svnserve -version
假如显示如下,svn安装成功:
svnserve, version 1.6.6 (r40053)
compiled dec 2 2009, 22:37:15
copyright (c) 2000-2009 collabnet.
subversion is open source software, see http://subversion.tigris.org/
this product includes software developed by collabnet (http://www.collab.net/ ).
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.
2. svn配置建立svn版本库目录可建多个:
新建文件夹:
# mkdir -p /opt/svndata/repos
建立svn版本库:
# svnadmin create /opt/svndata/repos
修改svn版本库配置文件版本库:
# vi /opt/svndata/repos/conf/svnserve.conf
内容修改为:
[general]
anon-access = none
auth-access = write
password-db = /opt/svn/conf/passwd.conf
authz-db = /opt/svn/conf/authz.conf
realm = repos
注重:对用户配置文件的修改立即生效,不必重启svn。
passwk.conf [users]是必须的,文件格式如下:
[users]
username = password
配置svn用户访问权限:
# vi /opt/svn/conf/authz.conf
注重:
* 权限配置文件中出现的用户名必须已在用户配置文件中定义。
* 对权限配置文件的修改立即生效,不必重启svn。
用户组格式:
[groups]
= ,
其中,1个用户组可以包含1个或多个用户,用户间以逗号分隔。
版本库目录格式:
[<版本库>:/项目/目录]
@<用户组名> = <权限>
<用户名> = <权限>
其中,方框号内部分可以有多种写法:
[/],表示根目录及以下,根目录是svnserve启动时指定的,我们指定为/opt/svndata,[/]就是表示对全部版本库设置权限。
[repos:/] 表示对版本库repos设置权限
[repos2:/abc] 表示对版本库repos2中的abc项目设置权限
[repos2:/abc/aaa] 表示对版本库repos2中的abc项目的aaa目录设置权限
权限主体可以是用户组、用户或*,用户组在前面加@,*表示全部用户。
权限可以是w、r、wr和空,空表示没有任何权限。
示例:
[groups]
admin = alan
[/]
@admin = rw
[repos1:/abc/aaa]
king = rw
[repos2:/pass]
king =
svn配置完毕。
3. 启动svn建立启动svn的用户
# useradd svn
# passwd svn
根据提示,为用户svn设置密码
允许用户svn访问版本库:
# chown -R svn:svn /opt/svndata
启动svn
# su - svn -c "svnserve -d -r /opt/svndata"
其中:
su - svn表示以用户svn的身份启动svn
-d表示以daemon方式(后台运行)运行
-r /opt/svndata指定根目录是/opt/svndata

 

关于Google Play services的各个分支介绍(MX5一定要安装XXXXXX-448分支) 要想使用google play, google map等google应用,就必须安装Google Play Service,但Google Play Service有太多分支了,最近终于搞明白各个分支代表什么。 版本号最后三位(2104405-XYZ)分别表示Android版本,cpu的arm系列,屏幕密度(DPI)。 下面是具体分支介绍: Notes / What's New Uploader's notes: To figure out the right version of Google Play services for your Android device, go to Settings -> Apps -> Google Play services, and look at the last 3 numbers in the parentheses. You'll see something like -XYZ where: 1.第一位X * X defines Android version: 0 for Android =5.0 // 4和7表示Android5.0及以上 8 for Android TV // 8表示Android电视应用 2.第二位Y * Y defines CPU architecture: 1 for armeabi 3 for armeabi-v7a // 32位版本 4 for arm64-v8a // 64位v8版本,MX5必须是这个 7 for x86 // x86主要是对intel cpu来说的 3.第三位Z * Z defines DPI: 0 for universal 2 for 160 4 for 240 6 for 320 8 for 480 // MX5选这个就行了 Notes: It seems that -7YZ builds became -4YZ with Google Play services 6.5. If you were on -7YZ before, you should now install -4YZ. Looks like -8YZ builds are for Android TV. Examples: -014 for Android <5.0 armeabi CPU 240 DPI device -438 for Android 5.0+ armeabi-v7a CPU 480 DPI device -876 for Android TV x86 CPU 320 DPI device 国内用户可以直接从以下镜像网站下载最新到Google Play Service http://www.apkmirror.com/apk/google-inc/google-play-services/ 目前最新版本是Google Play services 7.8.93 MX5用户可以安装以下分支: Google Play services 7.8.93 (2104405-448) http://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-7-8-93-2104405-448-android-apk-download/ 另外,安装后好需要禁止系统自带【应用中心】自动安装更新,可以设置面流量更新,但不要设置“静默安装更新包”,否则新版本发布后会自动更新成应用中心的最新版本,而最新版本的后三位可能不是你想要的分支,这时候就会导致弹出提示架构不符等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值