WDCP V3 安装mod-cband 插件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WDCP V3 安装mod-cband 插件相关的知识,希望对你有一定的参考价值。
插件下载地址 http://down.51cto.com/data/2334352
本文讲述的是 在使用wdcp网站环境下, 如何安装mod-cband插件
软件版本号
wdcp
apache 2.4.23
cband
mod-cband-0.9.6.1
在安装前先介绍一下其他的
wdcp的apache 目录
/www/wdlinux/httpd-2.4.23
在安装插件时 需要用到一个组件“apxs”,目录为
/www/wdlinux/httpd-2.4.23/bin/apxs
————————————————————————————————————————
接下来我们安装插件
创建下载插件的目录
mkdir -p /usr/local/share/soft
cd /usr/local/share/soft
并将软件下载到当前目录(当然了,你也可以自己创建,随意)
安装软件
a.解压软件 tar -zxvf mod-cband-0.9.6.1.tgz -C /usr/local/share/soft/
b.进入目录 /usr/local/share/soft/mod-cband-0.9.6.1
c.配置 ./configure --with-apxs=/www/wdlinux/httpd-2.4.23/bin/apxs
d.编译 make 出现了错误,见下面
修改当前软件的mod-cband.c 将里面的配置文件修改一下
remote_ip 改为 client_ip
remote_addr 改为 client_addr
e.编译安装 make install
下面是编译时报的错误,
/www/wdlinux/httpd-2.4.23/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c /www/wdlinux/httpd-2.4.23/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/www/wdlinux/httpd-2.4.23/include -I/www/wdlinux/httpd-2.4.23/include -I/www/wdlinux/httpd-2.4.23/include -Wall -DDST_CLASS=3 -c -o src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo src/mod_cband.c: In function ‘mod_cband_set_random_pulse‘: src/mod_cband.c:416: warning: cast to pointer from integer of different size src/mod_cband.c: In function ‘mod_cband_set_limit‘: src/mod_cband.c:436: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_user_limit‘: src/mod_cband.c:651: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_class_limit‘: src/mod_cband.c:874: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_user_class_limit‘: src/mod_cband.c:899: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_create_traffic_size‘: src/mod_cband.c:1010: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1010: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1014: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1014: warning: comparison with string literal results in unspecified behavior src/mod_cband.c: In function ‘mod_cband_get_dst‘: src/mod_cband.c:1281: error: ‘conn_rec‘ has no member named ‘remote_ip‘ src/mod_cband.c: In function ‘mod_cband_get_remote_host‘: src/mod_cband.c:1310: error: ‘struct conn_rec‘ has no member named ‘remote_ip‘ src/mod_cband.c:1311: error: ‘struct conn_rec‘ has no member named ‘remote_ip‘ src/mod_cband.c:1313: error: ‘struct conn_rec‘ has no member named ‘remote_addr‘ src/mod_cband.c: In function ‘mod_cband_filter‘: src/mod_cband.c:3236: warning: passing argument 3 of ‘b->type->read‘ from incompatible pointer type src/mod_cband.c:3236: note: expected ‘apr_size_t *‘ but argument is of type ‘int *‘ apxs:Error: Command failed with rc=65536 . make: *** [src/.libs/mod_cband.so] 错误 1
修改后 make
/www/wdlinux/httpd-2.4.23/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -c src/mod_cband.c /www/wdlinux/httpd-2.4.23/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -DLINUX -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/www/wdlinux/httpd-2.4.23/include -I/www/wdlinux/httpd-2.4.23/include -I/www/wdlinux/httpd-2.4.23/include -Wall -DDST_CLASS=3 -c -o src/mod_cband.lo src/mod_cband.c && touch src/mod_cband.slo src/mod_cband.c: In function ‘mod_cband_set_random_pulse‘: src/mod_cband.c:416: warning: cast to pointer from integer of different size src/mod_cband.c: In function ‘mod_cband_set_limit‘: src/mod_cband.c:436: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_user_limit‘: src/mod_cband.c:651: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_class_limit‘: src/mod_cband.c:874: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_set_user_class_limit‘: src/mod_cband.c:899: warning: pointer targets in passing argument 2 of ‘mod_cband_conf_get_limit_kb‘ differ in signedness src/mod_cband.c:68: note: expected ‘int *‘ but argument is of type ‘unsigned int *‘ src/mod_cband.c: In function ‘mod_cband_create_traffic_size‘: src/mod_cband.c:1010: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1010: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1014: warning: comparison with string literal results in unspecified behavior src/mod_cband.c:1014: warning: comparison with string literal results in unspecified behavior src/mod_cband.c: In function ‘mod_cband_filter‘: src/mod_cband.c:3236: warning: passing argument 3 of ‘b->type->read‘ from incompatible pointer type src/mod_cband.c:3236: note: expected ‘apr_size_t *‘ but argument is of type ‘int *‘ /www/wdlinux/httpd-2.4.23/build/libtool --silent --mode=link gcc -std=gnu99 -o src/mod_cband.la -rpath /www/wdlinux/httpd-2.4.23/modules -module -avoid-version src/mod_cband.lo write "make install" to install module
编译安装 make install
/www/wdlinux/httpd-2.4.23/bin/apxs -Wc,-Wall -Wc,-DDST_CLASS=3 -i -a -n cband src/mod_cband.la /www/wdlinux/httpd-2.4.23/build/instdso.sh SH_LIBTOOL=‘/www/wdlinux/httpd-2.4.23/build/libtool‘ src/mod_cband.la /www/wdlinux/httpd-2.4.23/modules /www/wdlinux/httpd-2.4.23/build/libtool --mode=install install src/mod_cband.la /www/wdlinux/httpd-2.4.23/modules/ libtool: install: install src/.libs/mod_cband.so /www/wdlinux/httpd-2.4.23/modules/mod_cband.so libtool: install: install src/.libs/mod_cband.lai /www/wdlinux/httpd-2.4.23/modules/mod_cband.la libtool: install: install src/.libs/mod_cband.a /www/wdlinux/httpd-2.4.23/modules/mod_cband.a libtool: install: chmod 644 /www/wdlinux/httpd-2.4.23/modules/mod_cband.a libtool: install: ranlib /www/wdlinux/httpd-2.4.23/modules/mod_cband.a libtool: finish: PATH="/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/www/wdlinux/mysql/bin:/root/bin:/sbin" ldconfig -n /www/wdlinux/httpd-2.4.23/modules ---------------------------------------------------------------------- Libraries have been installed in: /www/wdlinux/httpd-2.4.23/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(8) manual pages. ---------------------------------------------------------------------- chmod 755 /www/wdlinux/httpd-2.4.23/modules/mod_cband.so [activating module `cband‘ in /www/wdlinux/httpd-2.4.23/conf/httpd.conf]
本文出自 “王亚林” 博客,请务必保留此出处http://remover.blog.51cto.com/10472846/1961357
以上是关于WDCP V3 安装mod-cband 插件的主要内容,如果未能解决你的问题,请参考以下文章
WDCP面板Web环境安装redis与phpredis扩展应用方法
Android 插件化VirtualApp 安装并启动资源中自带的 APK 插件 ( 添加依赖库 | 准备插件 APK | 启动插件引擎 | 拷贝 APK 插件 | 安装插件 | 启动插件 )(代码片
Android 插件化VirtualApp 安装并启动资源中自带的 APK 插件 ( 添加依赖库 | 准备插件 APK | 启动插件引擎 | 拷贝 APK 插件 | 安装插件 | 启动插件 )(代码片