参考连接0:http://www.programering.com/a/MDMzYDMwATg.html
参考连接1:http://www.zsythink.net/archives/1318
0.系统信息
系统版本:CentOS7.3 x86_64
1.安装依赖包

yum -y groupinstall "Development tools"
yum -y install expat-devel pcre pcre-devel openssl-devel

2.1安装apr-1.6.3

mkdir /usr/svnpackage
cd /usr/svnpackage
wget https://mirrors.aliyun.com/apache/apr/apr-1.6.3.tar.gz
tar zxf apr-1.6..tar.gz
cd apr-1.6.
./configure --prefix=/usr/apr
make && make install

2.2安装apr-util-1.6.1

wget https://mirrors.aliyun.com/apache/apr/apr-util-1.6.1.tar.gz
tar zx apr-util-1.6..tar.gz
cd apr-util-1.6.
./configure --prefix=/usr/apr-util --with-apr=/usr/apr/bin/apr
make && make install

2.3安装zlib-1.2.11

wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar zxf zlib-1.2..tar.gz
cd zlib-1.2.
./configure /*默认安装路径即可*/
make &&make install

2.4安装sqlite-autoconf-3210000

wget http://www.sqlite.com/2017/sqlite-autoconf-3210000.tar.gz
tar zxf sqlite-autoconf-.tar.gz
cd sqlite-autoconf-
./configure
make && make install

2.5安装openssl1.0.1u 

wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
wget https://www.openssl.org/source/old/1.0.2/openssl-1.0.2l.tar.gz
tar zxf openssl1..1u.tar.gz
cd openssl1..1u
./config --prefix=/usr/local/openssl -fPIC no-gost /*这里的参数一定要添加,不然后面编译http后会出现问题*/
make depend
make install

2.6安装scons-3.0.1

#编译安装
  wget https://nchc.dl.sourceforge.net/project/scons/scons/3.0.1/scons-3.0.1.tar.gz
  mkdir scons
  tar zxf scons-local-3.0..tar.gz -C /usr/svnpackage/scons
  cd scons
  python scons.py install
#rpm安装
  wget https://nchc.dl.sourceforge.net/project/scons/scons/3.0.0/scons-3.0.0-1.noarch.rpm
  rpm -ivh scons-3.0.-.noarch.rpm

2.7安装serf

wget https://mirrors.aliyun.com/apache/serf/serf-1.3.9.tar.bz2
tar jxf serf-1.3..tar.bz2
cd serf-1.3.
scons PREFIX=/usr/local/serlf APR=/usr/apr/bin/apr--config APU=/usr/apr-util/bin/apu--config OPENSSL=/usr/lcoal/openssl
/*巨坑:此处会提示报错 File "/usr/svnpackage/serf-1.3.9/SConstruct", line
print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
SyntaxError: invalid syntax
这里可以把/usr/svnpackage/serf-1.3./SConstruct内的185,186行注释掉,然后在安装*/
scons install
#安装完成后,将serf的lib库追加到动态链接库
echo "/usr/local/serf/lib" >> /etc/ld.so.conf
ldconfig -v

2.8安装httpd-2.4.28

wget https://mirrors.aliyun.com/apache/httpd/httpd-2.4.28.tar.gz
tar zxf httpd-2.4..tar.gz
cd httpd-2.4.
./configure --prefix=/usr/local/apache2 --with-apr=/usr/apr/bin/apr--config --with-apr-util=/usr/apr-util/bin/apu--config --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite --enable-ssl --with-ssl=/usr/local/openssl
make && make install
#设置http自启动
cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
vim /etc/init.d/httpd
#在#!/bin/sh的下面加入
#chkconfig:
#设置httpd开机自启动
chkconfig httpd on
#检查确认,2345级别为on
chkconfig --list httpd
#添加环境变量
vim /etc/profile.d/svn_path
export HTTPD_HOME=/usr/local/apache2/bin
export PATH=$HTTPD_HOME:$PATH
#设置生效:
source /etc/profile

2.9安装subversion-1.9.7

wget https://mirrors.aliyun.com/apache/subversion/subversion-1.9.7.tar.gz
./configure --prefix=/usr/local/svn --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/apr/bin/apr--config --with-apr-util=/usr/apr-util/bin/apu--config --with-zlib --enable-maintainer-mode --with-serf=/usr/local/serf
make && make install
#设置环境变量
vim /etc/profile.d/svn_path
export SVN_HOME=/usr/local/svn/bin
export PATH=$SVN_HOME:$PATH
#退出,设置生效:
source /etc/profile
#如果在编译过程中提示缺少*.h文件,可以找到对应的文件,软连接到/usr/include中,如果缺少库文件,如提示usr/bin/ld: cannot find -lxxx,可以到对应的安装文件的lib下,使用ln -s命令软连接到/usr/lib64目录下。
# 安装完成查看版本信息:svnserve --version
#创建svn根目录:
mkdir /data
#启动svn:
svnserve -d -r /data

3.http与svn的关联
  3.1.拷贝关联所需模块

cp /usr/local/svn/libexec/mod_authz_svn.so /usr/local/apache2/modules/
cp /usr/local/svn/libexec/mod_dav_svn.so /usr/local/apache2/modules/

  3.2.设置location,在/usr/local/apache2/conf/httpd.conf末尾添加如下内容

#for svn
#加载整合SVN所需的模块
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#设置对应的location,路径为/,
#设置SVNParentPath设置为svn的仓库总根目录,此处为/data,配合location /,可以直接浏览器中输入http:/IP/直接
访问至/data下的svn仓库目录
#AuthzSVNAccessFile设置SVN权限配置文件路径
#AuthUserFile设置svn用户名密码配置文件路径
<Location />
DAV svn
SVNParentPath /data
SVNListParentPath on
SVNAutoversioning on
SVNReposName "svn"
AuthzSVNAccessFile /data/authz.conf
AuthType Basic
AuthName "svn repo auth"
AuthUserFile /data/passwd.conf
Require valid-user
</Location>
#for svn

  3.3.配置daemon用户的访问权限

chown -R daemon /data
chown -R /data

  3.4.创建用户 

htpasswd -c /data/passwd.conf username  /*首次创建用户需添加-c选项来创建passwd.conf文件,后续不能再使用此选项*/

  3.5.配置权限控制文件

  vim /data/authz.conf

##################################################################
[groups]
#<groupname1>=<username1>,<username2>
admin=pengyang #[<versionLib>:projectName/directory]
#@<groupsname> = <authorities>
#<username> = <authorities> [/]
@admin = rw [test:/test1]
#指定用户xiaoming可以读写test仓库中test1目录的文件
pengyang = rw
xiaoming = rw ###################################################################

4.配置私钥证书

openssl genrsa  > /data/server.key
openssl req -new -key /data/server.key > /data/server.csr
Country Name=CN
State or Province Name=guangdong
Locality Name=shenzhen
Organization Name=hangsheng new engrgy
Common Name=svnserver
Email Address=<可省略>
A challenge password=<空,填写后启动httpd需输入密码>
An optionnal company name=可选公司名,不填
openssl req -x509 -days -key /data/server.key -in /data/server.csr > /data/server.crt
cp /data/server.key /usr/local/apache2/conf
cp /data/server.crt /usr/local/apache2/conf
#设置http的支持ssl
vim /usr/local/apache2/conf/httpd.conf
#去掉Include conf/extra/httpd-ssl.conf前的#号
#确定httpd-ssl.conf配置中的证书与私钥指定正确
vim /usr/local/apache2/conf/extra/httpd-ssl.conf
#存在以下两行:
SSLCertificateFile "/usr/local/apache2/conf/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
#修改svn对应的location
vim /usr/local/apache2/conf/httpd.conf
#添加"SSLRequireSSL"至DAV svn的下一行
#重启http服务器

至此,SVN安装完成,如有错误之处还请各位指正,以免误导大家!

CentOS7编译安装SVN(subversion1.9.7)的更多相关文章

  1. CentOS7编译安装Nginx-1.8.1和编译参数

    CentOS7编译安装Nginx-1.8.1和编译参数 Web服务器Nginx    LNMP是一组众所周知的Web网站服务器架构环境,即由Linux+Nginx+MySQL+PHP(MySQL有时也 ...

  2. CentOS7下安装SVN服务端

    CentOS7下安装SVN服务 1. yum命令即可方便的完成安装# sudo yum install subversion 测试安装是否成功:# svnserve --version 更改svn的默 ...

  3. centos7编译安装MySQL5.7.9

    title: centos7编译安装MySQL5.7.9 date: 2016-05-12 16:20:17 tags: --- Centos7编译安装mysql5.7.9 mysql5.7有更好的性 ...

  4. centos7 编译安装新版LNMP环境

    centos7 编译安装新版LNMP环境 环境版本如下: 1.系统环境:Centos 7 x86_64 2.NGINX:nginx-1.11.3.tar.gz 3.数据库:mariadb-10.0.2 ...

  5. CentOS7编译安装httpd-2.4.41 php7.3

    CentOS7编译安装httpd-2.4.41 php7.3 安装参考环境: CentOS Linux release 7.5.1804 (Core) 一.安装依赖包 httpd安装的依赖包 # yu ...

  6. Centos7 编译安装PHP7

    Centos7 编译安装PHP7 编译安装的方式可以让组件等设置更加合理,但需要你对PHP的代码及各种配置非常的熟悉,以下为大致的安装流程,大家可以参考 1.下载编译工具 yum groupinsta ...

  7. CentOS7编译安装php7.1配置教程详解

    这篇文章主要介绍CentOS7编译安装php7.1的过程和配置详解,亲测 ,需要的朋友可以参考. 1.首先安装依赖包: yum install libxml2 libxml2-devel openss ...

  8. 编译安装SVN不结合apache

    前言:独立SVN服务器不结合APACHE安装使用,连接独立SVN服务器也不是用HTTP协议.这是比较快捷的SVN服务器配置方法. 一.下载工具 1.subversion-1.6.17.tar.gz 2 ...

  9. Linux环境源码编译安装SVN

    zhoulf 2015/2/28 原创 安装说明 安装环境:Red Hat Enterprise Linux 安装方式:源码安装 软件:apr-1.5.0.tar.gz.apr-iconv-1.2.1 ...

随机推荐

  1. xls 编码 utf-8

    直接用 Excel 打开 UTF-8 编码的 CSV 文件会导致汉字部分出现乱码.原因是 Excel 以 ANSI 格式打开,不会做编码识别. ==打开 UTF-8 编码的 CSV 文件的方法:1) ...

  2. 字符串函数之Strtok()函数

    Strtok()函数详解:   该函数包含在"string.h"头文件中 函数原型: char* strtok (char* str,constchar* delimiters ) ...

  3. mac 配置 ssh 到git (Could not resolve hostname github.com, Failed to connect to github.com port 443 Operation timed out)

    1.进入终端命令行 (1)输入:cd .ssh/ 进入到.ssh后,输入ls,会输出“known_hosts”,如果没有创建过rsa的话 (2)输入:man ssh-add (3)输入:ssh-key ...

  4. 04-JQuery

    今日任务 使用JQuery完成页面定时弹出广告 定时器: ​    setInterval     clearInterval ​    setTimeout    clearTimeout 显示:  ...

  5. Java课程2019年3月开学测试

    一.登录界面 模板的验证方式已经写在了function里面,我们只需要在提交的过程中进行验证. 我们这里需要注意到的是在login文件夹中,有一个randcode的验证码生成文件,打开代码我们可以看到 ...

  6. PHP使用 strpos() 注意事项

    返回字符出现的第一个位置, 如果字符在被搜索字符串的开头, 则会返回 ‘0’ 因此, 在使用此函数判断 字符串是否包含 某一个字符时  使用: if(strpos('string','str') != ...

  7. 传统方式和插件方式 分别实现 分页 功能 pageHelper 插件

    实现分页  这里提供两种方式  一种是传统的分页方式  一种是基于pageHelper插件 实现的分类     推荐使用后者 前者是一般开发的方式   思路  先手动创建一个 pageUtil 工具 ...

  8. 剑指offer——python【第39题】平衡二叉树

    题目描述 输入一棵二叉树,判断该二叉树是否是平衡二叉树.   解题思路 平衡二叉树首先是二叉搜索树,且它每个节点的左子树和右子树高度差至多等于1:只要从根节点,依次递归判断每个节点是否满足如上条件即可 ...

  9. js滚动条滚动到底部触发事件

    $("#contain").scroll(function(){ var $this =$(this), viewH =$(this).height(),//可见高度 conten ...

  10. 模块化Javascript代码的两种方式

    1.将模块整体放在函数里 function buildMonthNameModule() { var names = ["January ", "February&quo ...