apache2 安装mod_bw-0.6 限流出流问题

apache2 安装mod_bw-0.6 限流出流问题

执行 apxs -i -a -c bw_mod-0.6.c

提示 bw_mod-0.6.so 没有被复制到 /usr/local/apache/modules 中


----------------------------------------------------------------------
Warning!  dlname not found in /usr/local/apache/modules/bw_mod-0.6.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/bw_mod-0.6.so
chmod: failed to get attributes of `/usr/local/apache/modules/bw_mod-0.6.so': No such file or directory
apxs:Error: Command failed with rc=65536
执行全过程


[root@mylinux bw_mod-0.6]# apxs -i -a -c bw_mod-0.6.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/usr/local/apache/include  -I/usr/local/apache/include   -I/usr/local/apache/include   -c -o bw_mod-0.6.lo bw_mod-0.6.c && touch bw_mod-0.6.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o bw_mod-0.6.la  -rpath /usr/local/apache/modules -module -avoid-version    bw_mod-0.6.lo
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' bw_mod-0.6.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp bw_mod-0.6.la /usr/local/apache/modules/
cp .libs/bw_mod-0.6.lai /usr/local/apache/modules/bw_mod-0.6.la
cp .libs/bw_mod-0.6.a /usr/local/apache/modules/bw_mod-0.6.a
ranlib /usr/local/apache/modules/bw_mod-0.6.a
chmod 644 /usr/local/apache/modules/bw_mod-0.6.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so( manual pages.
----------------------------------------------------------------------
Warning!  dlname not found in /usr/local/apache/modules/bw_mod-0.6.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/bw_mod-0.6.so
chmod: failed to get attributes of `/usr/local/apache/modules/bw_mod-0.6.so': No such file or directory
apxs:Error: Command failed with rc=65536
编译apache的时候加了 --enable-so 了么
到网上查了资料是因为libtool版本太低造成的!按下列操作就好了!
深感自己不会英文使用linux带来的不便,很多官方的文档都看不懂!

安装 mod_bw 出现错误 提示
Warning!  dlname not found in /usr/local/apache/modules/bw_mod-0.6.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/bw_mod-0.6.so
chmod: failed to get attributes of `/usr/local/apache/modules/bw_mod-0.6.so': No such file or directory
apxs:Error: Command failed with rc=65536

那是因为libtool版本太低,需下载最新版libtool,并对libtool做软链接

下载libtool-1.5.6.tar.gz
[root@linux tomcat]#wget http://ftp.gnu.org/gnu/libtool/libtool-1.5.6.tar.gz
解压缩安装
[root@linux tomcat]# chmod +x *
[root@linux tomcat]# tar xfz libtool-1.5.6.tar.gz
[root@linux tomcat]# cd libtool-1.5.6
[root@linux libtool-1.5.6]# ./configure
[root@linux libtool-1.5.6]# make
[root@linux libtool-1.5.6]# make install
删除原来的/usr/local/httpd2/build/libtool  
[root@linux libtool-1.5.6]# rm –rf /usr/local/httpd2/build/libtool  
建立新的libtool 软连接
[root@linux libtool-1.5.6]# ln -s /usr/local/bin/libtool /usr/local/httpd2/build/libtool