How to Compile mod_bw for apache server 2.4.x on Linux Server.
1 ) Download the mod_bw package from
wget http://bwmod.sourceforge.net/files/mod_bw-0.7.tgz
tar -zxvf mod_bw-0.7.tgz
cd mod_bw
2 ) Open & edit C program file mod_bw.c
a ) Search “remote_addr” and replace to “client_addr”
b ) That will install the module correctly, but when you add the configuration option to your vhost configs you might get an error "undefined symbol: apr_atomic_cas". When that happens, open the file mod_bw.c and change the following:
Before:
/* Compatibility for ARP < 1 */
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif
AFTER : comment the block.
/* Compatibility for ARP < 1 */
/*
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif
*/
Save & exit.
3 ) Now use apache extension tool for compile mod_bw.c code.
apxs -i -a -c mod_bw.c
Check & verify your httpd.conf files.
4 ) restart Apache Server
1 ) Download the mod_bw package from
wget http://bwmod.sourceforge.net/files/mod_bw-0.7.tgz
tar -zxvf mod_bw-0.7.tgz
cd mod_bw
2 ) Open & edit C program file mod_bw.c
a ) Search “remote_addr” and replace to “client_addr”
b ) That will install the module correctly, but when you add the configuration option to your vhost configs you might get an error "undefined symbol: apr_atomic_cas". When that happens, open the file mod_bw.c and change the following:
Before:
/* Compatibility for ARP < 1 */
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif
AFTER : comment the block.
/* Compatibility for ARP < 1 */
/*
#if (APR_MAJOR_VERSION < 1)
#define apr_atomic_inc32 apr_atomic_inc
#define apr_atomic_dec32 apr_atomic_dec
#define apr_atomic_add32 apr_atomic_add
#define apr_atomic_cas32 apr_atomic_cas
#define apr_atomic_set32 apr_atomic_set
#endif
*/
Save & exit.
3 ) Now use apache extension tool for compile mod_bw.c code.
apxs -i -a -c mod_bw.c
Check & verify your httpd.conf files.
4 ) restart Apache Server
apachectl restart
No comments:
Post a Comment