linux下apache与subversion的安装


注:这里写的是我在安装过程及在安装中遇到的错误,写下来以供参考。


一、安装环境


Linux.5.5.for.x86.rhel-server-5.5-i386


二、安装包


apr-1.4.6.tar.gz

apr-util-1.4.1.tar.gz

httpd-2.4.2.tar.gz

subversion-1.7.4.tar.gz

pcre-8.30.tar.gz

sqlite-autoconf-3071100.tar.gz


上面的都是目前最新的,红色标记的是必须要的,没标记的是我在安装过程中遇到问题时下的,这些都可以去官网下载,也可以下载我已经下好的,地址

http://download.csdn.net/detail/yanhang1589/4276227


三、Apache安装


按下面的顺序安装。


1、apr安装

#tar -zxvf apr-1.4.6.tar.gz

#cd apr-1.4.6

#./configure --prefix=/usr/local/apr 

#make

#make install


2、apr-util安装

#tar -zxvf apr-util-1.4.1.tar.gz

#cd apr-util-1.4.1

#./configure --with-apr=/usr/local/apr--prefix=/usr/local/apr 

#make

#make install


3、httpd安装

#tar -zxvf httpd-2.4.2.tar.gz

#cd httpd-2.4.2

#

#./configure --enable-dav --enable-so --pfefix=/usr/local/apache2


问题:
checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.

解决:在配置中指定APR-util 路径


# ./configure --enable-dav --enable-so --with-apr-util=/usr/local/apr-util/ --prefix=/usr/local/apache2

问题:
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

解决:没有找到 pcre-config,下载并安装
# tar -zxvf pcre-8.30.tar.gz
# cd pcre-8.30
# ./configure --prefix=/usr/local/pcre-8.30

pcre安装好,继续httpd安装。

#./configure --enable-module=most --enable-shared=most --enable-dav --enable-so --enable-maintainer-mode --enable-rewrite --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre-8.30/ --prefix=/usr/local/apache2

#make

#make install

现在apache已经安装好了,开启apache服务器:

#cd /usr/local/apache2/bin

#./apachctl start

由于目前没有设置什么,从浏览中输出http://IP

会显示"It works",表明安装成功了。

停止apache服务器:

#./apachctl stop


四、Subversion安装

#tar -zxvf subversion-1.7.4.tar.gz

#cd subversion-1.7.4

# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-ssl --enable-maintainer-mode --without-berkeley-db --enable-dav --enable-so --prefix=/usr/local/subversion


错误:

checking sqlite library version (via header)... unsupported SQLite version
checking sqlite library version (via pkg-config)... none or unsupported 3.3
no

An appropriate version of sqlite could not be found.  We recommmend
3.7.6.3, but require at least 3.6.18.
Please either install a newer sqlite on this system

or

get the sqlite 3.7.6.3 amalgamation from:
    http://www.sqlite.org/sqlite-amalgamation-3.7.6.3.tar.gz
unpack the archive using tar/gunzip and copy sqlite3.c from the
resulting directory to:
/usr/....../SVN/source/subversion-1.7.4/sqlite-amalgamation/sqlite3.c

configure: error: Subversion requires SQLite

解决:按提示到 http://www.sqlite.org下载SQLite,

解压sqlite-autoconf-3071100.tar.gz,找到sqlite3.c,将其复制到Your-Path/subversion-1.7.4/sqlite-amalgamation/sqlite3.c

如果没有sqlite-amalgamation目录,则自己创建。

# ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-ssl --enable-maintainer-mode --without-berkeley-db --enable-dav --enable-so --prefix=/usr/local/subversion

#make

错误:

subversion/mod_dav_svn/util.c: In function 'dav_svn__log_err':

subversion/mod_dav_svn/util.c:630: error: 'dav_error' has no member named 'save_errno'
subversion/mod_dav_svn/util.c:631: error: 'dav_error' has no member named 'save_errno'
make: *** [subversion/mod_dav_svn/util.lo] 错误 1


解决
vi Your-Path/subversion-1.7.4/subversion/mod_dav_svn/util.c

找到这段代码:
if (errscan->save_errno != 0) {
errno = errscan->save_errno;

修改为:

if (errscan->aprerr != 0) {
errno = errscan->aprerr;


#make clean

#make

#make install


五、配置

关于SVN与apache的配置,下面这篇文章写得很好,可以参考下。

https://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值