Nginx("Engine X")作为世界第三大Web服务器,如果能应用到嵌入式系统中是多么美好的事情,如下将告诉你实现的可能, 实现(通过验证)硬件配置(720Mhz ARMv7,256MB内存)。 1. 交叉编译PCRE库,Nginx对PCRE库有依赖,PCRE(Perl Compatible Regular Expressions)是一个Perl库,包括Perl
兼容的正则表达式库。这些在执行正规表达式模式匹配时用与Perl 5同样的语法和语义是很有用的。 下载:
pcre-8.30.tar.bz2 (参考放置路劲:/home/fqheda/XT-linux/LXT6/Eweb/eweb-v3.0.3/) tar -jxvf pcre-8.30.tar.bz2 chmod -Rf 777 pcre-8.30 cd pcre-8.30 ./configure CC=arm-arago-linux-gnueabi-gcc --host=arm-arago-linux-gnueabi --prefix=/home/nginx make make install 2. 交叉编译Nginx,Nginx不多做解释,假设"你懂的"。
下载:
nginx-1.0.15.tar.gz (参考放置路劲:/home/fqheda/XT-linux/LXT6/Eweb/eweb-v3.0.3/) tar -zxvf nginx-1.0.15.tar.gz chmod -Rf 777 nginx-1.0.15 cd nginx-1.0.15 打补丁: 补丁a:nginx-1.0.15autoccconf case $NGX_CC_NAME in
arm-arago-linux-gnueabi-gcc)
# Modify By XinTinG
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2 补丁b-1:nginx-1.0.15auto ypessizeof ----------------------------------------
checking for $ngx_type size
END
## Modify By XinTinG
ngx_size=4 补丁b-2:nginx-1.0.15auto ypessizeof ## Modify By XinTinG
##ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS
ngx_test="gcc $CC_TEST_FLAGS $CC_AUX_FLAGS
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
##eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
##if [ -x $NGX_AUTOTEST ]; then
## ngx_size= `$NGX_AUTOTEST`
## echo " $ngx_size bytes"
##fi 补丁c:nginx-1.0.15autofeature
yes)
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
##if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
echo " found"
ngx_found=yes
if test -n "$ngx_feature_name"; then
have=$ngx_have_feature . auto/have
fi
## Modify By XinTinG
##else
## echo " found but is not working"
##fi
;; 补丁d:nginx-1.0.15configure if test -z "$NGX_PLATFORM"; then
echo "checking for OS"