2、yum install subversion apr apr-util
如果系统是64位的,则安装64位的subversion即可。安装完成后查看是否安装成功
[iyunv@cnn001 ~]# svnserve --version
svnserve, version 1.6.11 (r934486)
compiled May 14 2012, 05:36:18
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_base : Module for working with a Berkeley DB repository.
* fs_fs : Module for working with a plain file (FSFS) repository.
Cyrus SASL authentication is available.
创建版本存放目录
[iyunv@cnn001 ~]# mkdir -p /svn/repos
创建版本仓库
[iyunv@cnn001 ~]# svnadmin create /svn/repos
查看仓库信息
[iyunv@cnn001 ~]# ls /svn/repos/
conf db format hooks locks README.txt
修改目录权限,否则无法导入项目
[iyunv@cnn001 ~]# chown -R apache.apache /svn/repos
配置passwd文件
[iyunv@cnn001 conf.d]# htpasswd -cm passwd v_jazheng
New password:
Re-type new password:
Adding password for user v_jazheng
[iyunv@cnn001 conf.d]# htpasswd -m passwd svnadmin
New password:
Re-type new password:
Adding password for user svnadmin
重启httpd服务,出现以下错误:
[iyunv@cnn001 conf]# service httpd restart
Starting httpd: Syntax error on line 993 of /etc/httpd/conf/httpd.conf:
Unknown DAV provider: svn
[iyunv@cnn001 ~]# svn co svn://cnn001/tap/ta_parser
Authentication realm: <svn://cnn001:3690> 343561b3-335f-46b2-803b-3728b66d7673
Password for 'root':
Authentication realm: <svn://cnn001:3690> 343561b3-335f-46b2-803b-3728b66d7673
Username: v_jazheng
Password for 'v_jazheng':
-----------------------------------------------------------------------
ATTENTION! Your password for authentication realm:
<svn://cnn001:3690> 343561b3-335f-46b2-803b-3728b66d7673
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
'/root/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
A ta_parser/HelloWorld.java
Checked out revision 1.
此时,在当前目录下check out ta_parser项目
[iyunv@cnn001 ta_parser]# pwd
/root/ta_parser
[iyunv@cnn001 ta_parser]# ls -a
. .. HelloWorld.java .svn