svn是什么,相信能看到这里的同学应该不会有这个问题了,费话不多说,开始:

1、创建目录

mkdir /home/svn/

2、获取安装svn所需源文件(svn的官方网址是http://subversion.tigris.org

wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz

2、解压

tar zvxf subversion-1.6.1.tar.gz

tar zvxf subversion-1.6.1.tar.gz

上面二个压缩文件解压后会放到同一个文件下subversion-1.6.1

3、安装(这里仅按默认的configure)

此时我们运行./configure,会发现重现了错误:

no acceptable C compiler found in $PATH

是因为我们缺少的C的编译环境。这里我们采用yum来安装gcc(C的编译器,好像也是支持java,C#的)

yum  install gcc.i386


4、步骤3正常运行正常情况下再来./configure

发现报

configure: error: We require OpenSSL; try --with-openssl

提示我们少了openssl(以防万一保证系统上下面两个都存在)

yum install openssl
yum install openssl-devel

5、步骤4运行正常情况下再来./configure

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

说明环境没有问题了

6、make

这一步要点时间

7、make install

这一步没问题

如果 make install 出现下面错误:
/home/upload/subversion-1.6.6/subversion/svnversion/.libs/lt-svnversion: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
make: *** [revision-install] Error 127
解决办法:
        1、编辑/etc/ld.so.conf文件
             vi /etc/ld.so.conf
             添加下面一行代码
              /usr/local/lib
        2、保存后运行ldconfig:
              /sbin/ldconfig
               注:ld.so.conf和ldconfig用于维护系统动态链接库。
        3、然后再安装
              make install
测试是否安装成功

8、找到svn的安装目录,默认的./configure安装到了/usr/local/bin

svnserve --version

安装成功

svnserve, version 1.6.1 (r37116)
compiled Nov 6 2016, 06:07:24

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.

9、增加到环境变量中

vim /etc/profile

在最后面加上

SVNPATH=$PATH:/usr/local/
export SVNPATH

 

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

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

11,建个仓库

[zhangy@BlackGhost ~]$ mkdir -p /home/zhangy/www/repos

[zhangy@BlackGhost www]$ svnadmin create /home/zhangy/www/repos/

12,导入数据

[zhangy@BlackGhost ~]$ svn import ./svntest file:///home/zhangy/www/repos -m "Initial repository test"
Adding         svntest/test.php

Committed revision 1.

13,修改svnserve.conf

[root@BlackGhost conf]# vi svnserve.conf

[general]
anon-access = none
auth-access = write
password-db = passwd
authz-db = authz

14,目录控制文件authz

[root@BlackGhost conf]# vi authz
[groups]

admin= zhangy

[repos:/]
@admin = rw
* = r

15,修改用户密码文件passwd

[root@BlackGhost conf]# vi passwd

[users]
zhangy = root

 

16,启动svn

[root@BlackGhost www]# svnserve -d -r /home/zhangy/www

在这里特别的要注意,/home/zhangy/www是仓库的根目录,不要和[repos:/]目录重叠了。如果重叠是会提示你以下错误

[zhangy@BlackGhost checkout]$ svn co svn://127.0.0.1/
svn: Authorization failed

17,测试svn

checkout

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

<svn://127.0.0.1:3690> 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
'/home/zhangy/.subversion/servers'.
-----------------------------------------------------------------------
Store password unencrypted (yes/no)? yes
A    repos/test.php
Checked out revision 1.

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

vi /home/zhangy/.subversion/servers

找到以下内容,注释去掉并改成yes就行了

# store-plaintext-passwords = no

linux下安装svn(基于编码的方式)的更多相关文章

  1. linux下安装svn出现configure: error: We require OpenSSL; try --with-openssl

    linux下安装svn出现configure: error: We require OpenSSL; try --with-openssl http://blog.csdn.net/woshixion ...

  2. Linux下安装SVN,仓库创建,用户权限管理

    Exported from Notepad++           Linux下安装SVN,仓库创建,用户权限管理 1.SVN安装 Ubuntu系统下安装:sudoapt-getinstallsubv ...

  3. Linux下安装Apache并以mod_wsgi方式部署django站点

    源码编译方式安装Apache 首先下载Apache源码压缩包,地址为http://mirror.bit.edu.cn/apache/httpd/ 继续下载apr和apr-util压缩包,地址为http ...

  4. linux下安装svn

    linux下SVN服务器如何搭建和使用 | 浏览:12117 | 更新:2013-09-18 14:28 | 标签:linux linux下SVN服务器如何搭建和使用?说到SVN服务器,想必大家都知道 ...

  5. linux下安装svn服务器

    http://www.cnblogs.com/zhoulf/archive/2013/02/02/2889949.html 安装说明系统环境:CentOS-6.3安装方式:yum install (源 ...

  6. linux 下安装svn服务

    鉴于在搭建时,参考网上很多资料,网上资料在有用的同时,也坑了很多人 本文的目的,也就是想让后继之人在搭建svn服务器时不再犯错,不再被网上漫天的坑爹作品所坑害,故此总结 /******开始****** ...

  7. linux下安装svn服务

    环境centos6.8 64位: 1.安装svn yum install subversion yum install mod_dav_svn 2.创建svn仓库 mkdie /home/svn 3. ...

  8. Linux下安装SVN服务端小白教程

    安装 使用yum安装非常简单: yum install subversion 配置 创建仓库 我们这里在/home下建立一个名为svn的仓库(repository),以后所有代码都放在这个下面,创建成 ...

  9. Linux下安装SVN服务(CentOS7下)

    1. 安装 centos(我这里使用的是CentOS7)下yum命令即可方便的完成安装 测试安装是否成功: 2. 建立版本库 创建svn数据目录(subversion默认是把/var/svn作为数据根 ...

随机推荐

  1. 我记录综合系统学习研究之用户管理五(如何利用wojilu打造一个全新的SNS应用)

    wojilu框架特别适合快速开发多用户分享内容应用,比如知乎,digg这类应用. 对于博客等用户程序,要有4个入口:1)用户展示入口(展示自己的应用) 2)用户后台管理入口(管理自己的应用) 3)聚合 ...

  2. C#的类成员初始化顺序

    C#的类成员的定义和声明如下 using UnityEngine; using System.Collections; public class TestController : ECControll ...

  3. JavaScript高级程序设计36.pdf

    TreeWalker TreeWalker是NodeIterator的更高级的版本,除了包括nextNode()和previousNode()在内的相同功能外,这个类型还提供了用于不同方向上遍历DOM ...

  4. HTML5 UTF-8 中文乱码

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  5. rsync学习与实践

    1.介绍:开源的.快速的.多功能的可以实现全量和增量备份的工具:还能实现文件的删除等:可以根据文件大小的变化和修改时间的变化来同步数据(快速) 2.描述:支持特殊文件的拷贝,例如设备文件,链接等:可以 ...

  6. Java_Web 连接池

    对于共享资源,有一个很著名的设计模式:资源池(Resource Pool).该模式正是为了解决资源的频繁分配﹑释放所造成的问题.为解决我们的问题,可以采用数据库连接池技术.数据库连接池的基本思想就是为 ...

  7. macos下使用rvm管理ruby版本和rails版本

    1. 安装rvm curl -L https://get.rvm.io | bash -s stable 查看rvm 版本 2. 安装ruby rvm install 2.3.1 查看ruby 版本 ...

  8. Nginx介绍 分类: Nginx 服务器搭建 2015-07-13 10:50 19人阅读 评论(0) 收藏

    海量请求,高性能服务器. 对比Apache, Apache:稳定,开源,跨平台,重量级,不支持高度并发的web服务器. 由此,出现了Lighttpd与Nignx:轻量级,高性能. 发音:engine ...

  9. Win32下 Qt与Lua交互使用:配置Qt下Lua运行环境

    Lua与C++之间可以实现非常强的交互性.Lua中可以使用C++中的函数,C++中也可以使用Lua中的函数.由此可以引发出很多奇思妙想了. 简单来说,Lua动态的特性补充了C++的功能.当然,也看你具 ...

  10. GUI之CCControlExtension

    Introduction CCControl is inspired by the UIControl API class from the UIKit library of CocoaTouch. ...