CentOS 5/6下搭建Subversion+HTTPS+LDAP

简介:

CentOS 5/6下搭建Subversion+HTTPS+LDAP


  1. 软件安装


    准备环境

    yum –y install apr apr-util apr-devel apr-util-devel zlib zlib-devel libtool

    yum –y install httpd httpd-devel mod_ssl openssl openssl-devel openldap

    yum remove subversion

    wget http://www.sqlite.org/sqlite-autoconf-3071000.tar.gz

    wget http://apache.etoak.com/subversion/subversion-1.7.4.tar.gz

    注:关闭防火墙和selinux


    编译subversion

    tar zxvf subversion-1.7.4.tar.gz

    cd subversion-1.7.4

    mkdir sqlite-amalgamation

    cd ..

    tar zxvf sqlite-autoconf-3071000.tar.gz

    cd sqlite-autoconf-3071000

    cp sqlite3.c ../subversion-1.7.4/sqlite-amalgamation/

    cd ../subversion-1.7.4

    ./configure --prefix=/usr/local/subversion-1.7.4 --with-apxs=/usr/sbin/apxs --with-ssl --with-zlib --enable-maintainer-mode

    make && make install

    vim /etc/profile

    添加以下内容:


    PATH=/usr/local/subversion-1.7.4/bin:$PATH
    export LC_ALL=C


    source /etc/profile


    svnserve –version (显示版本说明安装成功)


svnserve, version 1.7.4 (r1295709)

compiled Apr 18 2012, 16:23:18

Copyright (C) 2012 The Apache Software Foundation.

This software consists of contributions made by many people; see the NOTICE

file for more information.

Subversion is open source software, see http://subversion.apache.org/


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.


  1. 配置


    创建版本库相关目录


    groupadd svn

    useradd -s /sbin/nologin svn -g svn

    mkdir -p /opt/test

    chown -R apache:svn /opt/test


    建立版本库


    svnadmin create /opt/test


    配置svn权限authz


    vim /opt/test/conf/authz


    [/]

    kcguo = rw

    kelton = rw


    配置svn账户密码passwd


    vim /opt/test/conf/passwd


    [users]

    kelton = 1qaz2wsxE


    配置svn配置文件svnserve.conf


    vim /opt/test/conf/svnserve.conf

    [general]

    anon-access = none

    auth-access = write

    password-db = passwd

    authz-db = authz


    配置Apache


    vim /etc/httpd/conf/httpd.conf


    查找LoadModule,在末尾加入:

    # for svn

    LoadModule dav_svn_module modules/mod_dav_svn.so

    LoadModule authz_svn_module modules/mod_authz_svn.so

    并在配置文件最后加入:

    # for svn

    Include conf.d/subversion.conf

    Apache配置文件subversion.conf


    vim /etc/httpd/conf.d/subversion.conf


    <Location /test>

    DAV svn

    SVNPath /opt/test

    AuthBasicProvider ldap

    AuthType Basic

    AuthzLDAPAuthoritative off

    AuthzSVNAccessFile /opt/test/conf/authz

    AuthName "AvePoint Subversion Server"

    AuthLDAPURL    此处填写LDAP配置信息

    AuthLDAPBindDN "CN=*,OU=**,DC=***,DC=***"

    AuthLDAPBindPassword "****"

    require valid-user

    SSLRequireSSL

    </Location>

    配置LDAP

    vim /etc/openldap/ldap.conf

    末尾添加 REFERRALS off

    启动SVN版本库

    svnserve -d --listen-port 3312 --config-file /opt/test/conf/svnserve.conf -r /opt/test/

    TortoiseSVN软件:svn://IP:3312/test/ 或https://IP/test

    在浏览器中输入:https://IP/test

test - Revision 0: /

042412_0837_1.png

Powered by Apache Subversion version 1.7.4 (r1295709).











本文转自 安安安安森  51CTO博客,原文链接:http://blog.51cto.com/smallc/1230680,如需转载请自行联系原作者
目录
相关文章
|
6月前
|
Linux
通过HTTP方式自建CentOS系列Yum源
通过HTTP方式自建CentOS系列Yum源
104 0
|
3月前
|
Linux
Linux/CentOS设置全局代理(http)
Linux/CentOS设置全局代理(http)
221 0
|
5月前
|
Linux PHP
CentOS7 下 ldap 部署
CentOS7 下 ldap 部署
86 0
|
7月前
|
应用服务中间件 Linux 网络安全
CentOS7自签名SSL证书并给nginx配置https
CentOS7自签名SSL证书并给nginx配置https
190 0
|
8月前
|
缓存 Linux 开发工具
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
centos 7 yum安装失败(HTTP Error 404 - Not Found)的解决方法
582 0
|
应用服务中间件 程序员 Linux
CentOS 上部署Nginx实现http301重定向https配置文件conf
CentOS 上部署Nginx实现http301重定向https配置文件conf
316 0
|
网络协议 小程序 关系型数据库
centos配置apache的https服务证书安装
centos配置apache的https服务证书安装
389 0
centos配置apache的https服务证书安装
|
监控 Linux
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(三)
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台
178 0
 CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(三)
|
监控 前端开发 Linux
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(二)
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台
117 0
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(二)
|
运维 自然语言处理 监控
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(一)
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台
155 0
CentOS手把手教你搭建Zabbix Server,Zabbix Proxy,Zabbix Agent企业级监控平台(一)