Apache 集成subversion
2015-12-27 18:39
483 查看
1.准备工作
系统版本为CentOS 6.5 32位所需安装包
apr-1.5.2 (http://archive.apache.org/dist/apr/)
apr-util-1.5.4(http://archive.apache.org/dist/apr/)
httpd-2.2.31(http://archive.apache.org/dist/httpd/)
sqlite-amalgamation-3.6.13(http://www.sqlite.org/sqlite-amalgamation-3.6.13.tar.gz)
scons-2.4.1-1.noarch.rpm(2.3及以上版本)
openssl-1.0.1q.tar.gz(http://www.openssl.org/source/)
serf-1.3.8
subversion-1.9.3(http://archive.apache.org/dist/subversion/)
2.安装步骤
2.1安装apr
./configure --prefix=/usr/local/aprmake&&make install
2.2安装apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/aprmake&&make install
2.3安装httpd
./configure --prefix=/usr/local/ httpd-2.2.31 --enable-dav --enable-so--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-included-aprmake && make install
2.4安装subversion
./configure--prefix=/usr/local/webserver/svn--with-apxs=/usr/local/webserver/httpd-2.2.19/bin/apxs--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr-util/bin/apu-1-config --with-ssl--with-zlib=/usr --enable-maintainer-modemake && make install
安装报错:
大致意思是缺少sqlite-amalgamation
2.5安装sqlite-amalgamation
到svn所在目录mkdir sqlite-amalgamation
cp rf sqlite-3.6.13/*/subversion-1.9.3/sqlite-amalgamation/
再次configure,
报错:
大致意思是缺少zlib
解决方法:
安装serf
2.6安装serf
Serf-1.3.8的安装需要由scons进行安装安装serf需要有https的支持
2.6.1所以先安装好openssl
./configure –with-prefix=/usr/local/opensslmake && make install
2.6.2安装scons
安装scons:rpm -ivh scons-2.4.1-1.noarch.rpm
2.6.3安装serf
进入serf目录scons PREFIX=/usr/local/serf APR=/usr/local/apr/bin/apr-1-configAPU=/usr/local/apr-util/bin/apu-1-config OPENSSL=/usr/local/openssl
sconsinstall
scons-c
2.7再次安装subversion
./configure --prefix=/usr/local/svn--with-apr=/usr/local/apr/bin/apr-1-config--with-apr-util=/usr/local/apr-util/bin/apu-1-config --enable-mod-activation--with-apache-libexecdir=/usr/local/httpd-2.2.31/modules--with-apxs=/usr/local/httpd-2.2.31/bin/apxs--with-serf=/usr/local/serf
如果出现
可以先清除一下编译残留 make clean
再次配置,编译运行
如果成功则会在/usr/local/httpd-2.2.31/modules/下新增两个so文件:
mod_authz_svn.so
mod_dav_svn.so
同时在/usr/local/httpd-2.2.31/conf/httpd.conf中新增
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
3.创建svn资料库
创建目录mkdir /data/svn
创建文件
touch svn-access-file
touch svn-auth-file
创建资料库
svnadmin create /data/svn/redwine
4.配置apache
3.1配置httpd.conf添加配置
修改listen8088(根据需要设定)
<Location /svn>
DAV svn
SVNListParentPath on
SVNParentPath /data/svn/
AuthType Basic
AuthName "Subversion repository"
AuthUserFile /data/svn/svn-auth-file
Require valid-user
AuthzSVNAccessFile /data/svn/svn-access-file
</Location>
<Directory /data>
AllowOverride none
Options MultiViews
orderallow,deny
Allow from all
</Directory>
添加用户及授权
htpasswd svn-auth-file redwine
输入两次密码后,提示成功
Adding password for user redwine
vi svn-access-file
[groups]
redwine_all = redwine
[/]
@redwine_all = rw
[/svn/redwine]
redwine = rw
* =
配置完毕
SVN报错:can't open file db/txn-current-lock:permission denied解决方法
修改/data/svn的权限chmod –R 777 /data/svn
也可以设置允许apache用户 chown-R <apache_account>:<apache_group> /data/svn
注:
从subversion1.7之后如果要获得编译依赖的包,则需要运行./get-deps.sh
如果要支持http方式需要在安装svn前安装serf
安装serf推荐用serf-1.2.1,安装是./configure;serf-1.3.0安装是用scons(yum -y install scons)方式
相关文章推荐
- About SVN
- CentOS 6.5搭建Apache整合SVN 1.8.5服务器(多版本库权限配置)
- CentOS下SVN服务器测试版安装记录
- Apache Isis 1.4.0 发布,领域驱动开发框架
- 如何在本机搭建SVN服务器
- Windows下搭建本地SVN服务器
- Linux快速构建apache web服务器
- Awstats处理多apache日志
- 安装perl模块小窍门
- PHP+Apache在Windows 9x下的安装和配置
- Apache服务器配置全攻略
- Apache Web让JSP“动”起来
- Linux Apache+MySQL+PHP
- 建立Apache+PHP+MySQL数据库驱动的动态网站
- apache 环境下 php 的配置注意事项
- 在RedHat下安装apache jserv 1.1.2方法
- windows8.1下Apache+Php+MySQL配置步骤
- windows中PHP5.2.14以及apache2.2.16安装配置方法第1/2页
- 在Windows XP下安装Apache+MySQL+PHP环境
- 解析阿里云ubuntu12.04环境下配置Apache+PHP+PHPmyadmin+MYsql