码迷,mamicode.com
首页 > Web开发 > 详细

apache+svn配置过程

时间:2016-03-16 01:40:55      阅读:279      评论:0      收藏:0      [点我收藏+]

标签:浏览器   linux   软件包   客户端   历史   

svn安装指南

建议:源码安装

环境:Centos6.2_X64+apache2.2.22+subversion1.6.9

历史:1.已经安装过一次,浏览器和SVN客户端可以正常使用;但在eclipse下载时报错。

      2.安装时碰到zlib问题,系统显示已经安装,但是subversion在编译时无法识别。另外源码安装后编译通过

subversion for linux的安装(SVN+apache+linux)

准备的软件包如下:

httpd-2.2.22tar.gz

subversion-1.4.5.tar.gz

1、安装APR和APR-util(httpd-2.2.22.tar.bz2包中有这两个包)

[root@localhost soft]# tar zxvf apr-1.2.7.tar.gz

[root@localhost soft]# cd apr-1.2.7

[root@localhost soft]# ./configure

[root@localhost soft]# make

[root@localhost soft]# make install

[root@localhost soft]# tar zxvf apr-util-1.2.7.tar.gz

[root@localhost soft]# cd apr-util-1.2.7

[root@localhost soft]# ./configure --with-apr=/usr/local/apr/

[root@localhost soft]# make

[root@localhost soft]# make install

2、编译安装APACHE

[root@localhost soft]# tar zxvf httpd-2.2.22.tar.bz2

[root@localhost soft]# cd httpd-2.2.22

[root@localhost soft]# ./configure --prefix=/chroot/apache --enable-so --enable-dav=share --enable-dav-fs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/bin/

[root@localhost soft]# make

[root@localhost soft]# make install

[root@localhost soft]# /usr/local/apache/bin/apachectl start

3、安装subversion-1.6.9(configure时是否需加入java的路径)

[root@localhost soft]# tar zxvf subversion-1.6.9.tar.gz

[root@localhost soft]# cd subversion-1.6.9

[root@localhost soft]# ./configure --prefix=/usr/local/svn --with-apxs=/chroot/apache/bin/apxs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/bin  --with-jdk=/usr/java/jdk1.7.0_01/

[root@localhost soft]# make

[root@localhost soft]# make install

4、查看subversion两个动态库有没有安装成功

[root@localhost soft]# vi /usr/local/apache/conf/httpd.conf

看到下面两个模块说明安装成功

LoadModule dav_svn_module     modules/mod_dav_svn.so

LoadModule authz_svn_module   modules/mod_authz_svn.so

5、配置SVN

//////配置用户可自己更改密码功能,可不配置

# This make the user can change the password by itsself

[root@localhost soft]# vi /usr/local/apache/conf/httpd.conf

Alias /changpasswd/ "/usr/local/apache/htdocs/changepasswd"

<Directory "/usr/local/apache/htdocs/">

Require valid-user

# how to authenticate a user

AuthType Basic

AuthName "Subversion Tools"

AuthUserFile /svndata/svn/passwd

</Directory>

///////配置用户可自己更改密码功能,可不配置

<Location /svn/>

        DAV svn

        SVNParentPath /chroot/svndata

        SVNListParentPath on

#       SVNIndexXSLT "/svnindex.xsl"  用于配置SVN的WEB页面,建议不使用!

        AuthType Basic

        AuthName "Subversion repository"

        AuthUserFile /usr/local/svn/passwd

        AuthzSVNAccessFile /usr/local/svn/authz

        Require valid-user

</Location>

6、建立SVN存储仓库

[root@localhost soft]# mkdir -p /chroot/svndata

[root@localhost soft]# svnadmin create /svndata/svn/rds/rds/

备份以前的SVN库

[root@localhost soft]# svnadmin dump /svndata/svn/rds/rds/ > /home/rds

把备份出来的数据恢复到本地

[root@localhost soft]# svnadmin load /svndata/svn/rds/rds/ < /home/rds

7、建立本地访问控制文件

[root@localhost ~]# cd /svndata/svn/

[root@localhost svn]# /usr/local/apache/bin/htpasswd passwd test123

New password:

提示你输入密码,默认是MD5加密

8、建立本地项目控制文件

[root@localhost svn]# vi auth

我的文件内容为:

[groups]

admin = ryanwu

rdc_admin = wangning

user = shanweimin,wuweimin,wangning

rdc_user = wangning,dengby,cjing,wangl,denby,gaowei,hzming,lxcan,qnhui,zhzg,yuhuan,ltfei,lyli,wfpeng,zqbing,lcyun,daili,wliang,lfeng

,qqchuang,asqiao,lsna,wangpf,gjia

product_user = lgang,chxx,zlli,qqqiong,speng,zyang,lguang,cbfen

[/]

@admin = rw

wangning = rw

mobohan = rw

lgang = rw

[/RDC]

@rdc_admin = rw

@rdc_user = rw

wangfp = rw

[/PC]

cbfen = rw

[/ShareDoc]

* = rw

[/RDC/weekrpt]

@rdc_user = rw

zhzg = rw

lyli = rw

[/RDC/reference]

* = rw

[/RDC/ShareDoc]

* = rw

[/software]

@user = r

shanweimin = rw

* =

[reference]

* = rw

[/RDC/GDAS]

@rdc_user = rw

dengby = rw

daili = rw

yuhuan = rw

9、安装客户端,访问服务器

http://192.168.1.208/svn/

10、到此安装基本结束

修改一下/svndata/svn/rds/rds属性,否则会导致文件上传失败;

[root@localhost svn]# cd /svndata/svn

[root@localhost svn]# chmod -R svnadmin.svnadmin *

[root@localhost svn]# cd rds

[root@localhost svn]# chmod -R svnadmin.svnadmin rds

附:可能出现的问题

Can‘t locate ExtUtils/Embed.pm in @INC (@INC contains

------

#yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

#yum install cpan

#cpan install ExtUtils::Install

#perl -MCPAN -e shell

#install CGI(可有可无)

#yum install perl-ExtUtils-Embed

#perl -MCGI -e ‘print "CGI.pm version $CGI::VERSION\n";‘

#find / -name CGI.pm -print 2>/dev/null

solve!!

apache+svn配置过程

标签:浏览器   linux   软件包   客户端   历史   

原文地址:http://gtlinux.blog.51cto.com/1047916/1751403

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!