suse11 安装 apache 记录

环境:SUSE 11 SP1

软件包:httpd-2.2.25.tar.gz、tomcat-connectors-1.2.31-src.tar.gz 

步骤

1.创建apache2目录

2.将以上2个tar.gz包上传至apache2目录,解压

cd apache2
tar -zvxf httpd-2.2.25.tar.gz
cd $HOME/apache2/httpd-2.2.25

3.configure

./configure --prefix=$HOME/apache2 --enable-so --enable-mods-shared=most --enable-deflate --enable-expires --enable-headers;
环境上报错如下:

checking for zlib library... not found
checking whether to enable mod_deflate... configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
google结果显示zlib没安装,不过是装了的,如下

NDMC122:/home/ndsc/apache2 # rpm -qa|grep zlib
zlib-1.2.3-106.34
zlib-32bit-1.2.3-106.34

实际上这里去掉--enable-deflate也可以configure成功,但是迟早要装上的,不如彻底解决。

于是决定手动安装zlib,照样是./configure,make,make install,不过在make编译httpd时报错如下:

/home/ndsc/apache2/httpd-2.2.25/srclib/apr/libtool --silent --mode=link gcc -g -O2 -pthread    -L/usr/local/lib      -o mod_deflate.la -rpath /home/ndsc/apache2/modules -module -avoid-version  mod_deflate.lo -lz
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_deflate.la] Error 1
参考 http://www.cnblogs.com/qq78292959/archive/2012/05/30/2526761.html ,在./configure前加上CFLAGS="-O3 -fPIC",再make,make install,解决。

4.make、make install

5.安装tomcat-connector

tar -zvxf tomcat-connectors-1.2.31-src.tar.gz
cd $HOME/apache2/tomcat-connectors-1.2.31-src/native/
./configure --with-apxs=$HOME/apache2/bin/apxs;
6.配置tomcat-connector
修改conf/workers.properties



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值