linux 详细安装svn(图例)

部署svn
系统环境:
centos5.5 32位
软件版本:
subversion-1.6.19.tar.gz
subversion-deps-1.6.19.tar.gz
一、搭建svn环境
软件下载地址:
http://subversion.apache.org/download/#supported-releases
http://subversion.tigris.org/downloads/ subversion-1.6.19.tar.gz
http://subversion.tigris.org/downloads/subversion-deps-1.6.19.tar.gz
[root@acong tools]# pwd
/home/acong/tools
[root@acong tools]# wget  http://subversion.tigris.org/downloads/ subversion-1.6.19.tar.gz
[root@acong tools]# wget  http://subversion.tigris.org/downloads/subversion-deps-1.6.19.tar.gz
[root@acong tools]# tar zxf subversion-1.6.19.tar.gz
[root@acong tools]# tar zxf subversion-deps-1.6.19.tar.gz 
[root@acong tools]# cd subversion-1.6.19
 

[root@acong subversion-1.6.19]# ./configure --prefix=/usr/local/svn
配置后提示如下,无影响因为不使用db存储
You don't seem to have Berkeley DB version 4.0.14 or newer
installed and linked to APR-UTIL.  We have created Makefiles which
will build without the Berkeley DB back-end; your repositories will
use FSFS as the default back-end.  You can find the latest version of
Berkeley DB here:
   http://www.oracle.com/technology/software/products/berkeley-db/index.html
[root@acong subversion-1.6.19]# make
[root@acong subversion-1.6.19]# make  install
root@acong subversion-1.6.19]# ll /usr/local/svn/
total 40
drwxr-xr-x 2 root root 4096 Oct 12 18:22 bin
drwxr-xr-x 2 root root 4096 Oct 12 18:21 build-1
drwxr-xr-x 6 root root 4096 Oct 12 18:22 include
drwxr-xr-x 4 root root 4096 Oct 12 18:22 lib
drwxr-xr-x 5 root root 4096 Oct 12 18:22 share
[root@acong subversion-1.6.19]# /usr/local/svn/bin/svnserve --version ##验证svn版本
svnserve, version 1.6.19 (r1383947)
   compiled Oct 12 2012, 18:16:25
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.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.
[root@acong subversion-1.6.19]# echo "PATH=$PATH:/usr/local/svn/bin/" >> /etc/profile
[root@acong subversion-1.6.19]# source /etc/profile
二、配置svn
[root@acong ~]# mkdir /data/svndir_one -p
[root@acong ~]# svnadmin create /data/svndir_one/ ## 建立svn版本库
[root@acong ~]# ll /data/svndir_one/
total 56
drwxr-xr-x 2 root root 4096 Oct 12 18:42 conf
drwxr-xr-x 2 root root 4096 Oct 12 18:42 dav
drwxr-sr-x 5 root root 4096 Oct 12 18:42 db
-r--r--r-- 1 root root    2 Oct 12 18:42 format
drwxr-xr-x 2 root root 4096 Oct 12 18:42 hooks
drwxr-xr-x 2 root root 4096 Oct 12 18:42 locks
-rw-r--r-- 1 root root  229 Oct 12 18:42 README.txt
[root@acong ~]# vim /data/svndir_one/conf/svnserve.conf 
 

anon-access =  read # # 非授权用户无法访问
auth-access = write  # # 授权用户有写权限
password-db = passwd  # # 密码文件路径
authz-db = authz  # # 访问控制文件
[root@acong ~]# vim /data/svndir_one/conf/passwd  ##配置用户
 

[root@acong ~]# vim /data/svndir_one/conf/authz ##文件最下面添加用户与对应 权限
 

[root@acong ~]# svnserve -d -r /data/svndir_one/ ## 启动svn 
-d指明以守护模式运行,3690默认端口
-r选项用来指定svn服务的根目录
三、本地 svn client测试
测试说明:
新建 1文件夹(import后)在其目录下建立1.txt文件,然后svn  committ
新建2文件夹(export后)在其目录下就可以看到1文件夹下刚提交过的1.txt文件
 

 

 

 

 

 

 

 

 

 

 

 

 

######################################################################
 

 

 

 


你可能感兴趣的:(linux,SVN,centos,图片)