In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Using apxs compilation to add apache Module in windows Environment
Introduction: this article uses the mod_limitipconn module as an example.
Environment:
Windows7 x86 system
Apache 2.4.18
Goal:
In the windows environment, use mod_limitipconn0.24 source code, apxs to add mod_limitipconn module for apache2.4.18.
Analysis:
The latest version of the limitipconn module already supports apache2.4. But there is no compiled corresponding version. So you need to compile the module yourself. To achieve this goal under windows, you need to install the following software: apxs (windows version), perl (windows version, this is so that you can install apxs), vc++6.0 (to install the version). This is used by apxs compiler c source module calls. Other software can also be used.
Download address:
Apxs
Http://www.apachelounge.com/download/additional/
Perl (ActivePerl)
Http://www.activestate.com/activeperl/downloads
Vc++6.0
To install the version. An error occurred while compiling the green version.
Steps:
Install perl (ActivePerl) and install it directly by default. When the installation is complete, please make sure that the path of the windows environment variable adds the text location of perl. It is not automatically added, please add it manually. As shown in the figure:
Install vc++6.0, which must use the installation version, otherwise an error will be reported during compilation. My installation directory: d:\ Program Files\ Microsoft Visual Studio, confirm that the installation is complete, D:\ Program Files\ Microsoft Visual Studio\ VC98\ Bin\ cl.exe, double-click to see if there is an error. If you report an error, please fix it according to the error message. My error: the mspdb60.dll file is missing. Download the file and put it in the directory where cl.exe is located. And add "D:\ Program Files\ Microsoft Visual Studio\ VC98\ Bin\" to the environment variable path. As shown in the figure:
Install apxs:
First of all, the apache installation directory: d:\ wamp\ bin\ apache\ apache2.4.18\
Run the command prompt for windows (that is, cmd) and go to the location where the apxs installation package file is located. Run the following command: "perl Configure.pl-with-apache2=D:\ wamp\ bin\ apache\ apache2.4.18\-- with-apache-prog=httpd.exe". As shown in the figure:
Note: the D:\ wamp\ bin\ apache\ apache2.4.18\ build\ config_vars.mk file and the D:\ wamp\ bin\ apache\ apache2.4.18\ bin\ apxs.bat file are generated.
Modify D:\ wamp\ bin\ apache\ apache2.4.18\ build\ config_vars.mk, and the effect is as follows:
CC = cl
LD = link
CPP = cl-nologo-E
LDFLAGS = kernel32.lib ws2_32.lib apr-1.lib aprutil-1.lib libapr-1.lib libapriconv-1.lib libaprutil-1.lib libhttpd.lib mod_dav.lib xml.lib / nologo / subsystem:windows / dll / machine:I386 / libpath: "D:\ wamp\ bin\ apache\ APACHE~1.18\ lib"
Note: cl and link are cl.exe and link.exe under D:\ Program Files\ Microsoft Visual Studio\ VC98\ Bin\. Where LDFLAGS=... "D:\ wamp\ bin\ apache\ APACHE~1.18\ lib" can be used by default ("D:\ wamp\ bin\ apache\ APACHE~1.18\ lib" is my default. It is actually the directory of the lib folder under the apache installation directory. If the LDFLAGS project does not change the compilation module, it will report an error.
From the command prompt, run "VCVARS32", as shown:
In the windows environment variable, path, append D:\ wamp\ bin\ apache\ apache2.4.18\ bin\, as shown below:
From a command prompt, go to the directory where the mod_limipiconn source code is located and run the following command:
Apxs-I-c-a mod_limitipconn.c
As shown in the figure:
Important note:
The mod_limitipconn.lib file is generated at D:\ wamp\ bin\ apache\ apache2.4.18\ lib\.
The mod_limitipconn.so file is generated at D:\ wamp\ bin\ apache\ apache2.4.18\ modules\.
Each time you append the contents under the windows environment variable path, you need to rerun the command prompt to take effect (or apply it at the command prompt).
If you are prompted with "windows.h" related errors when compiling, please check whether the LDFLAGS in the file D:\ wamp\ bin\ apache\ apache2.4.18\ build\ config_vars.mk has been modified, and if so, use the installed version of vc++6.0.
The file locations involved are listed as follows:
Apache2.4.18 installation location: d:\ wamp\ bin\ apache\ apache2.4.18,
Vc++6.0 installation location: d:\ Program Files\ Microsoft Visual Studio
Location of cl.exe, link.exe and VCVARS32 .bat: d:\ Program Files\ Microsoft Visual Studio\ VC98\ Bin\
The location of apxs after installation: d:\ wamp\ bin\ apache\ apache2.4.18\ bin\
Config_vars.mk location: d:\ wamp\ bin\ apache\ apache2.4.18\ build\ config_vars.mk
Perl installation location: C:\ Perl\
Location of mod_limitipconn source code: d:\ mod_limitipconn\
Attachment: http://down.51cto.com/data/2366438
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.