设为首页收藏本站
查看: 13509|回复: 0

SAMA5D3X-AppWeb服务器移植

[复制链接]

25

主题

9

回帖

280

积分

中级会员

积分
280
Willian.Mo 发表于 2015-7-13 11:17:17 | 显示全部楼层 |阅读模式
本帖最后由 Willian.Mo 于 2015-7-16 17:08 编辑

介绍:              
Appweb是一个嵌入式HTTP Web服务器,主要的设计思路是安全。这是直接集成到客户的应用和设备,便于开发和部署基于Web的应用程序和设备。它迅速( 每秒处理3500多要求)而紧凑 ,其中包括支持动态网页制作,服务器端嵌入式脚本过程中的CGI ,可加载模块的SSL ,摘要式身份验证,虚拟主机, Apache样式配置,日志记录,单和多线程应用程序。

移植:
1.下载appweb源码
https://embedthis.com/appweb/download.html
这里下载的是appweb-6.0.0。
2.解压源码:
[mw_shl_code=bash,true]$ tar -xf appweb-6.0.0.tar.tgz[/mw_shl_code]
3.下载附件中的openssl-1.0.1g.tar.gz(编译源码需要用到openssl库),解压到appweb-6.0.0目录:
[mw_shl_code=bash,true]$ tar -xf openssl-1.0.1g.tar.gz -C appweb-6.0.0[/mw_shl_code]
4.交叉编译:
[mw_shl_code=bash,true]$ make SHOW=1 -f projects/appweb-linux-default.mk \
        ARCH=arm \
        PROFILE=debug \
        CC=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-gcc \
        LD=/opt/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/arm-linux-gnueabihf-ld \
        ME_COM_OPENSSL=1 ME_COM_OPENSSL_PATH=./openssl-1.0.1g [/mw_shl_code]
编译成功后会在build/linux-arm-debug/目录下生成目标文件:
[mw_shl_code=bash,true]$ ls build/linux-arm-debug/
bin  inc  obj
[/mw_shl_code]

5.把build/linux-arm-debug/bin目录、src/server/web/目录拷贝到开发的/opt/appweb/目录。
6.拷贝src/server/sample.conf文件到/opt/appweb/web目录,重命名为appweb.conf。修改appweb.conf文件:
[mw_shl_code=bash,true]把Documents ./web 改为 Documents  /opt/appweb/web [/mw_shl_code]
7.测试
[mw_shl_code=bash,true]# /opt/appweb/bin/appweb -v --home /opt/appweb/web --config appweb.conf
Configuration for Embedthis Appweb
----------------------------------
Version:            6.0.0
BuildType:          Debug
CPU:                arm
OS:                 linux
Host:               buildroot
Configure:          me -d -q -platform linux-x86-default -configure . -with openssl -gen make
----------------------------------
Security risk /opt/appweb/web is writeable by others
Security risk, /opt/appweb/bin/appweb is writeable by others
Using config file appweb.conf
Started HTTP service on *:80
Started HTTPS service on *:443
Running as user "nobody" (99), group "nogroup" (99)[/mw_shl_code]
在pc机浏览器中输入开发板IP(如:192.168.1.100),如图所示:
appweb.jpg





 



openssl-1.0.1g.tar.gz

7.93 MB, 下载次数: 14115

回复

使用道具 举报

您需要登录后才可以回帖 登录

本版积分规则

Archiver|手机版|小黑屋|米尔科技论坛   

GMT+8, 2024-4-26 20:01 , Processed in 0.054477 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表