Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92355727
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类:

2008-03-26 19:10:39

Subversion是一个免费的、开放源码的版本控制系统。但是没有在openserver下的二进制包。本文介绍如何在openserver下编译apache和Subversion,仅限于编译,配置方面我也不是很熟悉,可以参考或是
    
环境:sco openserver 5.06, 已装好开发系统,
 安装补丁RS506A,OSS651B(可不装), OSS646C(必须装,因为装gcc必须得装)
 以上补丁可以在ftp://ftp.sco.com/pub/openserver5 中找到
    
所需要用到的工具:
 gwxlibs-1.3.1Ba,这是装gcc必要的,下载地址:ftp://ftp.sco.com/pub/openserver5/opensrc/gwxlibs-1.3.1Ba/
 gcc, 在ftp://ftp.sco.com/pub/openserver5/opensrc/gnutools-5.0.7Kj/ 去下载
 bzip2、unzip,gzip, 解压工具, 可以在ftp://ftp2.sco.com/pub/skunkware/osr5/vols下载
               
环境变量:请把/usr/gnu/bin添加到PATH变量中,因为gcc就是装在这里的,请先用gcc编译一个程序试下,看gcc是否工作正常,如果正常的话,就进行下一步的工作


1、编译Berkeley DB
 在网站下载db-4.4.20.tar.gz,上传到/tmp目录下
  cd /tmp
  gunzip -d db-4.4.20.tar.gz
  tar xf db-4.4.20.tar
  cd db-4.4.20/build_unix
  ../dist/configure --prefix=/usr/local  --disable-largefile
  make
  make install

2、编译Apache 2.0
 Apache 2.0引入了Apache Portable Runtime (APR)组件, Subversion也建立在这一可移植层上,apache2和subversion也是因为这个东西而无法直接编译,必须要修改,
 从下载httpd-2.0.55.tar.bz2, 传到/tmp
  cd /tmp
  bunzip2 httpd-2.0.55.tar.bz2
  tar xf httpd-2.0.55.tar 
  cd httpd-2.0.55
  ./configure --prefix=/usr/local --enable-dav --enable-so --disable-nls  --disable-ipv6
 此时要修改一个文件,否则无法编译
  vi srclib/apr/include/arch/unix/apr_private.h
 找到包含HAVE_GETADDRINFO的一行,删除,存盘退出,开始编译
  gmake
  gmake install

 修改apachectl文件
  vi /usr/local/bin/apachectl
 将第一行#!/bin/sh改为#!/bin/ksh

 修改httpd.conf
  vi /usr/local/conf/httpd.conf
 将User nobody改为User nouser
 将Group #-1改为Group nogroup

3、编译subversion
   从下载subversion-1.3.0,传到/tmp
  cd /tmp
  bzip2 -d subversion-1.3.0.tar.bz2
  tar xvf subversion-1.3.0.tar
  cd subversion-1.3.0
 修改一个文件,要不然无法编译
  vi neon/configure
   在第26448行之后插入一行
  ne_enable_gai=no
 存盘退出,进行编译
  ./configure --prefix=/usr/local  --with-apxs=/usr/local/bin/apxs  --disable-nls --with-apr=/usr/local --with-apr-util=/usr/local 
  gmake
  gmake install 


编译及编译安装可能会出现的问题及解决的办法:
1.iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_ISO8859-1
编辑:apr-util/include/private/apu_config.h and apr-util/include/apu.h ,将
HAVE_ICONV
APU_HAVE_APR_ICONV
APU_HAVE_ICONV 
都注释掉。

2.apr/network_io/unix/sockaddr.c:518: `h_errno'
undeclared (first use in this function)
在sockaddr.c 文件前面加上 "extern int h_errno;" 

我是在5.0.5下面编译运行的,运行时还出现dynamic linking error:
要安装补丁包oss499a

 
 
阅读(481) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~