此文在dglwx 大侠的基础上完成,在此对dglwx大侠的共享精神表示由衷的感谢。对于
Appweb的介绍我就不说了吧,总之是一种很好的高效的web服务器。具体的了解请
仔细研读一番。废话不说,说说该怎么移植这个好东东:
1:下载源代码,这里是用的2.4.1版本
appweb-src-2.4.1-0.tar.gz,官网现在更新到2.4.2版本,这里为了保持一致,给出下载地址:
2:解压: tar –zxvf
appweb-src-2.4.1-0.tar.gz
3:开始修改一些个东东了:
①edit
appweb-src-2.4.1/build/make/make.gcc: line 101 修改为:
_CFLAGS
+= -D$(BLD_OS) $(_MT) -Wl,-elf2flt='-s 20480'
②edit
appweb-src-2.4.1/
appweb/Makefile: 从118行开始修改为:
#
#
Link standard
appweb program. Linked with shared libraries supporting
#
dynamic loading of modules.
#
$(BLD_BIN_DIR)/$(BLD_PRODUCT)$(BLD_EXE):
/usr/local/arm_tools_3.3.4/bin/arm-elf-g++
-o ../bin/arm-winbond-linux/
appweb -Wall -Wl,-elf2flt='-s 409600'
-L../lib/arm-winbond-linux ../obj/arm-winbond-linux/
appweb.o \
../obj/arm-winbond-linux/romFiles.o
../obj/arm-winbond-linux/appwebStaticLink.o
\
../lib/arm-winbond-linux/libappwebStatic.a
@echo " cp $(BLD_BIN_DIR)/$(BLD_PRODUCT)$(BLD_EXE)
$(BLD_PRODUCT)$(BLD_EXE)"
@cp $(BLD_BIN_DIR)/$(BLD_PRODUCT)$(BLD_EXE)
$(BLD_PRODUCT)$(BLD_EXE)
#
# Test
appweb program. Linked with shared
libraries using dynamic
#
loading for all modules.
#
③export
the environment variable,such as CC, LD, AR, RANLIB...
the export.sh script is:
export
CC="/usr/local/arm_tools_3.3.4/bin/arm-elf-gcc"
export
CXX="/usr/local/arm_tools_3.3.4/bin/arm-elf-g++"
export
AR="/usr/local/arm_tools_3.3.4/bin/arm-elf-ar"
export
LD="/usr/local/arm_tools_3.3.4/bin/arm-elf-ld"
export
STRIP="/usr/local/arm_tools_3.3.4/bin/arm-elf-strip"
then do: #source export.sh
or # . export.sh
④configure:
./configure
--host=arm-winbond-linux --build=i386-PC-linux --port=80 --type=RELEASE \
--disable-floating-point --disable-legacy-api --enable-log --disable-samples \
--disable-multi-thread --disable-shared --disable-shared-libc --enable-static \
--disable-access-log --disable-c-api-client --disable-digest-auth
--disable-test \
--enable-ejs --disable-ipv6 --disable-modules --disable-rom-fs --without-cgi \
--enable-session --with-admin=builtin --with-put=builtin
--without-egi \
--with-aspnet=builtin --without-auth
--with-c-api=builtin --with-esp=builtin \
--with-dir=builtin --with-copy=builtin --without-gacompat --with-upload=builtin
\
--without-ssl --without-matrixssl --without-php5
my comment here:
must --disable-rom-fs, or it can not read
appweb.conf &
mime.typs
must --disable-multi-thread, or when compile daemon.cpp it will
throw some error, havn't
deal with it now.
⑤, make
以上五步重要的步骤可到
http://www.mcuos.com/viewthread.php?tid=1534&extra=page%3D1
获得。
4:make 之后获得
appweb二进制文件,这时候就要修改
appweb.conf文件了,把
appweb/目录下的
appweb.conf复制过来,编辑这个文件,这里我只需要修改两个地方,一个是
ErrorLog
"/tmp/error.log" 这里记住/tmp要是可写的文件夹哦
另一个由于我之前没有配置用户,所以就把user 跟group两行给删掉了。
5:这个时候就大功告成了,把
appweb
,
appweb.conf,mime.types复制到/etc目录下,然后在当前目录下建立web文件夹,把html文件复制到该文件夹中。
这时候是不是已经可以看到你的主页了呢?接下来的任务就是配置asp或者是esp了,这个我还在研究当中呢。
阅读(1250) | 评论(0) | 转发(0) |