`
crabdave
  • 浏览: 1276560 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

SVN安装过程 on Linux

 
阅读更多

SVN安装过程 on Linux

 

subversion-1.6.12

 

http://subversion.tigris.org/downloads/subversion-1.6.12.tar.gz

 

./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-openssl=/usr/local/ssl --with-zlib=/usr/local/zlib --enable-maintainer-mode 

 

 

错误

configure: error: no XML parser was found: expat or libxml 2.x required

解决方法:

这个时候 rpm -qa expat2 检查是否安装 expat2

如果没有请在

https://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download

下载 expat2.tar.gz

 

 tar -xvf  expat2.tar.gz

cd expat-2.0.1

./configure

make,make install

 

 

 

安装openssl

http://www.openssl.org/source/

 

./config -fPIC --prefix=/usr/local/ssl/ enable-shared

 

 

/usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

 

/usr/local/lib/libz.a: could not read symbols: Bad value

一般是64 位 电脑才会出现。

 

解决方法如下:

cd zlib-1.2.3 //进入zlib目录

 

CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译

 

make clean

 

make

 

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 && make install

测试是否安装成功

1

/usr/local/subversion/bin/svnserve --version

(也可以试试 svn help命令)

如果显示如下,svn安装成功:

 

subversion/bin/svnserve --version

svnserve, version 1.6.12 (r955767)

   compiled Jul 11 2015, 08:15:46

 

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.

 ---------------------------------------------------

 

/usr/local/subversion/bin

bash-3.2$ svnadmin create /lab/svn-repository/svn-test

 

配置apache支持svn

#vi /usr/local/apache/conf/httpd.conf

在文件末尾添加

 

<Location /subversion>

DAV svn

# (此处配置你的版本库根目录)

SVNParentPath /lab/svn-repository/

# (连接类型设置 基本验证)

AuthType Basic

#(此处字符串内容修改为提示对话框标题)

AuthName "Welcome to my svn-repository!" 

# (此处修改为访问版本库用户的文件,用apache 的htpasswd命令生成)

AuthUserFile /lab/svn-repository/passwd

# (此处修改为访问版本库权限的文件)

AuthzSVNAccessFile /lab/svn-repository/auth.conf

# ("Require valid-user"告诉apache在authfile中所有的用户都可以访问。如果没有它,则只能第一个用户可以访问新建库)

Require valid-user

</location>

保存文件退出!

重新启动apache

apachectl restart

 

试试看能访问不

#curl http://192.168.1.104/subversion/svn-test/

 

配置svn权限管理(即authz.conf的配置)

添加用户:

#cd /usr/local/apache2/bin

# ./htpasswd –c /lab/svn-repository/passwd user1

第一次设置用户时使用-c表示新建一个用户文件。回车后输入用户密码,完成对用户的增加

第二次添加用户不需要带 –c 参数 如:

#cd /usr/local/apache2/bin

#./htpasswd /lab/svn-repository/passwd user2

权限分配:

#vi /lab/svn-repository/auth.conf

#这个表示群组设置

[groups]

#这个表示admin群组里的成员 user1,user2

Admin=user1,user2

#这个表示Develop群组里的成员 u1,u2

Develop=u1,u2

#这表示,仓库svn-test的根目录下的访问权限 

[svn-test:/]

#svn-test仓库user1用户具有读和写权限

user1=rw

#svn-test仓库user2用户具只有读权限

user2=r

#这表示 群 develop的成员都具有读写权限

@develop=rw 

#这个表示在所有仓库的根目录下

#[/]

#这个表示对所有的用户都具有读权限

*=r

 

 

注意:在编辑authz.conf文件时,所有行都必须要顶头写,不能有缩行出现,否则会报错:"Access denied: 'user1' ",里面的内容可以根据自己的需要自行添加,不必与我上面所写的相同!

 

#apachectl restart

 

就可以通过 http://127.0.0.1/subversion/svn-test 这个URL来访问仓库了,当然,受权限的限制,必须是合法用户才能访问且具有相应的权限

最后启动svn

#/usr/local/subversion/bin/svnserve -d -r /lab/svn-repository/

-d 表示以 daemon 方式(后台运行)运行

-r /svn/project 指定根目录是/svn/project

检查服务器是否启动正常:

#ps –ef|grep svnserve

修改权限

chown -R   user1    /lab/svn-repository/svn-test/

chmod 777 -R /lab/svn-repository/svn-test/

分享到:
评论

相关推荐

    SVN usage on Linux

    详细介绍了在Linux下SVN命令的使用方法

    SVN server config

    config files of SVN server on LINUX OS with shell script for service start,stop and restart

    SVN_Installation_Guide

    1. How to install the SVN on Linux. 2. How to create users and repository. 3. Configure the Apache Httpd file. 4. Configure the virtual hosts at the Apache Http Server. 5. Open the 3690 port from ...

    svn-server-web-interface:Linux 中的 svn-server-web-interface

    svn 服务器 Web 界面是一个简单的 Web 应用程序,使用 AngularJS、Bootstrap、Node.js、Restfull Api 和 shell 命令构建 安装并运行 $ npm install -g svn-server-web-interface $ svn-server-web-interface 用法 $ ...

    Eclipse的SVN插件1.65

    In addition, if you are on Linux, your distribution might only support a specific version of Subversion and JavaHL. So you might want to stick with a specific version of Subclipse for that client

    [其他类别]GoogleCode.com SVN online browse! [中文]_svn_071221.rar

    包括STM32、ESP8266、PHP、QT、Linux、iOS、C++、Java、python、web、C#、EDA、proteus、RTOS等项目的源码。【项目质量】:所有源码都经过严格测试,可以直接运行。功能在确认正常工作后才上传。【适用人群】:适用...

    linux发行版支持的硬件兼容性列表大全

    Linux Hardware Components - The manufacturers and distributors listed on this site sell hardware and peripherals that are Linux-friendly. If you're looking for drivers or need to know if your hardware...

    CodeTyphonIns2.30

    -ADD pl_BGRAcontrols ,Visual Components for pl_BGRAbitmap library (Win32, Win64, Linux32, Linux64, WinCE) -ADD pl_pl_ZenGLD3D ,ZenGL library for DirectX (Win32, Win64) -Rename/Update pl_mooncomp ...

    SmartGit安装软件及破解bat文件

    官网介绍:SmartGit is a graphical Git client with support for SVN and Pull Requests for GitHub and Bitbucket. SmartGit runs on Windows, macOS and Linux. SmartGit安装软件及破解bat文件

    softap_ap6212a0_tinav2.1_验证通过_旧版本的系统_20170915_1223没有外层目录.7z

    You're building on Linux Lunch menu... pick a combo: 1. tulip_d1-tina 2. tulip_d1-dragonboard 3. octopus_sch-tina 4. octopus_sch-dragonboard 5. azalea_perf2-tina 6. azalea_perf2-...

    Learning ROS for Robotics Programming

    The book will take an easy-to-follow and engaging ... It is also advisable to have some background on version control systems, like svn or git, which are often used to share the code by the community.

    bochs user manual 单html文件+pdf 英文原版

    3.4.14. Building an RPM on Linux 3.4.15. Compile Problems 4. Setup 4.1. What does Bochs need? 4.2. ROM images 4.3. The configuration file bochsrc 4.3.1. plugin_ctrl 4.3.2. config_interface 4.3.3. ...

    UE(官方下载)

    Did you know that you can not only change what is on UltraEdit's toolbars, you can also change the icon used, as well as create your own custom toolbars and tools? File tabs Understand how file tabs ...

    Online-Banking-Website

    欢迎使用您的教程资料库! 了解如何通过SourceTree(最好的Git客户端之一)或通过命令行使用Git来使用Git和Bitbucket。 无论您选择哪种方式,都将学习如何设置Git,在本地克隆此存储库。...下载,安装和配置SourceT

    crtmpserver源码

    * SVN * libdl, libssl, libcrypto (make sure you have the "devel" packages of libdl, ssl and crypto installed prior to compiling) In order to get the source code, issue the following command: svn co ...

    mingw-get-inst-20111118

    所以,使用 MinGW 我们就可以像在 Linux 下一样使用 GNU 程序开发工具。 GCC 就是 MinGW 的核心所在,GCC 是一套支持众多计算机程序语言的编译系统,而且在语言标准的实现上是最接近于标准的。并且 GCC 几乎可以...

Global site tag (gtag.js) - Google Analytics