Linux svn安装和配置

 一、 安装要的软件






1  解压安装

  1. tar zxvf subversion-1.6.6.tar.gz  
  2. tar zxvf subversion-deps-1.6.6.tar.gz  
  3. cd subversion-1.6.6/  
  4. ./configure --prefix=/usr/local/svn  
  5. make && make install  

Libraries have been installed in:

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and

2  查看svn信息

[root@localhost bin]# /usr/local/svn/bin/svnserve --version
svnserve, version 1.6.6 (r37116)
compiled Jul  7 2010, 23:06:21

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see
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.

3  将svn的bin目录加到环境变量中去

[root@localhost /]# PATH=$PATH:/usr/local/svn/bin
[root@localhost /]# export PATH
[root@localhost /]# svn
svn            svnadmin       svnlook        svnsync
svn2abs        svndumpfilter  svnserve       svnversion


1  建个svn的根目录,因为项目不只一个

[jancy@localhost ~]$ mkdir -p /home/svnroot    #-p的意思是说如果没有父目录建之

2  建个仓库

[jancy@localhost ~]$ mkdir -p /home/svnroot/repos

[jancy@localhost www]$ svnadmin create /home/svnroot/repos/

3  导入数据

[jancy@localhost ~]$ svn import ./svntest file:///home/svnroot/repos -m "Initial repository test"
Adding         svntest/test.php

Committed revision 1.

4  修改svnserve.conf

[root@localhost conf]# vi svnserve.conf

anon-access = none
auth-access = write
password-db = passwd
authz-db = authz

5  目录控制文件authz

[root@localhost conf]# vi authz

admin= jancy

@admin = rw
* = r

6  修改用户密码文件passwd

[root@localhost conf]# vi passwd

jancy = *****


1  启动svn

[root@localhost www]# svnserve -d -r /home/svnroot


[jancy@localhost checkout]$ svn co svn://
svn: Authorization failed

2  测试svn

(1)  checkout

[jancy@localhost checkout]$ svn co svn://
Authentication realm: <svn://> 3d0c32b1-3841-4518-b6b1-dcdb6c7ed716
Password for 'jancy':
ATTENTION!  Your password for authentication realm:

<svn://> 3d0c32b1-3841-4518-b6b1-dcdb6c7ed716

can only be stored to disk unencrypted!  You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in
Store password unencrypted (yes/no)? yes
A    repos/test.php
Checked out revision 1.

checkout的时候会出现Store password unencrypted,解决办法

vi /home/jancy/.subversion/servers


# store-plaintext-passwords = no

(2). add 和submit

[jancy@localhost repos]$ svn add aaa.php
A         aaa.php
[jancy@localhost repos]$ svn commit aaa.php -m "ok"
Adding         aaa.php
Transmitting file data .
Committed revision 2.


Publish Comment发表评论

点击刷新验证码 点击图片可刷新验证码


詹绍乾 Jancy © 版权所有 2020

Copyright © 2010 by All right reserved.