嵌入式web服务器-thttpd
交叉编译thttpd
http://lakie.blog.163.com/blog/static/45185220201162910432330/
http://blog.csdn.net/21aspnet/article/details/7045845
启动thttpd
# /usr/local/thttpd/sbin/thttpd -C /usr/local/thttpd/conf/thttpd.conf
7. 在开发板上为thttpd创建一个独立的用户:httpd,并用此用户创建httpd服务的根目录html
最简单的测试方法不用配置文件,直接输入命令:
thttpd -p 80 -d /home/httpd/html -u root 启动
http://www.docin.com/p-457056503.html
thttpd配置
Thttpd manual
http://www.cnblogs.com/elect-fans/archive/2011/12/06/2408712.html(含有详细的thttpd的命令说明)
用thttpd做Web Server
http://www.oschina.net/question/234345_42631
嵌入式设备web服务器比较
http://blog.csdn.net/newnewman80/article/details/8809560
linux下,主要有三个web服务器:httpd,thttpd和boa。httpd是最简单的一个web服务器,功能也最弱,不支持认证、CGI。 thttpdWeb服务器和boaWeb服务器都支持认证、CGI等,功能都比较全。如果Web服务器仅需提供一些静态页面,例如系统介绍、简单的在线帮 助等,完全可以用静态服务器httpd来实现。但若需要与用户进行交互,例如数据查询、实时状态查询等,则必须使用动态Web技术,可以选用httpd或 是boa来实现。但是thttpd在运行过程中所需要的资源远远大于boa。为了实现动态Web技术,这里本文选择实现一个支持CGI的、非常适合于嵌入 式系统的web服务器boa。
httpd是busybox中自带的web server,功能弱,不支持认证和CGI。thttpd和boa都支持认证CGI,功能比较全,Boa是一个单任务的小型http服务器,设计的小型系统不要数据库操作,所以可以使用thttpd作为server.
1. 编译thttpd
yingc@yingc:~/gcyin/test/flickr/thttpd-2.25b$ CC=csky-linux-gcc LDFLAGS=-static ./configure --host=csky --prefix=/home/yingc/gcyin/test/flickr/gclib/thttpd
loading cache ./config.cache
checking host system type... csky-unknown-none
checking target system type... csky-unknown-none
checking build system type... csky-unknown-none
checking for gcc... (cached) csky-linux-gcc
checking whether the C compiler (csky-linux-gcc ) works... yes
checking whether the C compiler (csky-linux-gcc ) is a cross-compiler... yes
checking whether we are using GNU C... (cached) yes
checking whether csky-linux-gcc accepts -g... (cached) yes
yingc@yingc:~/gcyin/test/flickr/thttpd-2.25b$ sudo make install
mkdir -p /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin
/usr/bin/install -c -m 555 -o bin -g bin thttpd /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin
mkdir -p /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8
/usr/bin/install -c -m 444 -o bin -g bin thttpd.8 /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8
for i in cgi-src extras ; do ( \
cd $i ; \
pwd ; \
make \
WEBDIR=/home/yingc/gcyin/test/flickr/gclib/thttpd/www \
CGIBINDIR=/home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin \
MANDIR=/home/yingc/gcyin/test/flickr/gclib/thttpd/man \
WEBGROUP=www \
install \
) ; done
/home/yingc/gcyin/test/flickr/thttpd-2.25b/cgi-src
make[1]: Entering directory `/home/yingc/gcyin/test/flickr/thttpd-2.25b/cgi-src'
mkdir -p /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/redirect
cp redirect /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/redirect
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8/redirect.8
cp redirect.8 /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8/redirect.8
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/ssi
cp ssi /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/ssi
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8/ssi.8
cp ssi.8 /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man8/ssi.8
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/phf
cp phf /home/yingc/gcyin/test/flickr/gclib/thttpd/www/cgi-bin/phf
make[1]: Leaving directory `/home/yingc/gcyin/test/flickr/thttpd-2.25b/cgi-src'
/home/yingc/gcyin/test/flickr/thttpd-2.25b/extras
make[1]: Entering directory `/home/yingc/gcyin/test/flickr/thttpd-2.25b/extras'
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/makeweb /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/htpasswd /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/syslogtocern
cp makeweb /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/makeweb
chgrp www /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/makeweb
chmod 2755 /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/makeweb
cp htpasswd /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/htpasswd
cp syslogtocern /home/yingc/gcyin/test/flickr/gclib/thttpd/sbin/syslogtocern
rm -f /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man1/makeweb.1
cp makeweb.1 /home/yingc/gcyin/test/flickr/gclib/thttpd/man/man1/makeweb.1
cp: cannot create regular file `/home/yingc/gcyin/test/flickr/gclib/thttpd/man/man1/makeweb.1': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/yingc/gcyin/test/flickr/thttpd-2.25b/extras'
make: *** [installsubdirs] Error 2
注:make install时会出现一些权限类的错误。可以修改几个地方:
1:修改./Makefile.in
111 installthis:
112 -mkdir -p $(DESTDIR)$(BINDIR)
113 $(INSTALL) thttpd $(DESTDIR)$(BINDIR)
114 #$(INSTALL) -m 555 -o bin -g bin thttpd $(DESTDIR)$(BINDIR)
115
116 install-man:
117 -mkdir -p $(DESTDIR)$(MANDIR)/man8
118 $(INSTALL) thttpd.8 $(DESTDIR)$(MANDIR)/man8
119 #$(INSTALL) -m 444 -o bin -g bin thttpd.8 $(DESTDIR)$(MANDIR)/man8
2:修改./extras/Makefile.in
68 install: all
69 rm -f $(BINDIR)/makeweb $(BINDIR)/htpasswd $(BINDIR)/syslogtocern
70 cp makeweb $(BINDIR)/makeweb
71 #chgrp $(WEBGROUP) $(BINDIR)/makeweb
72 #chmod 2755 $(BINDIR)/makeweb
73 cp htpasswd $(BINDIR)/htpasswd
74 cp syslogtocern $(BINDIR)/syslogtocern
75 rm -f $(MANDIR)/man1/makeweb.1
76 mkdir -p $(MANDIR)/man1
77 cp makeweb.1 $(MANDIR)/man1/makeweb.1
78 rm -f $(MANDIR)/man1/htpasswd.1
79 cp htpasswd.1 $(MANDIR)/man1/htpasswd.1
80 rm -f $(MANDIR)/man8/syslogtocern.8
81 mkdir -p $(MANDIR)/man8
82 cp syslogtocern.8 $(MANDIR)/man8/syslogtocern.8
嵌入式web服务器-thttpd的更多相关文章
- 学号20145332 《信息安全系统设计基础》实验五 简单嵌入式WEB服务器实验
实验目的 掌握在 ARM 开发板实现一个简单 WEB 服务器的过程. 学习在 ARM 开发板上的 SOCKET 网络编程. 学习 Linux 下的 signal()函数的使用. 实验内容 学习使用 s ...
- 20145216 20145330 《信息安全系统设计基础》 实验五 简单嵌入式WEB 服务器实验
20145216 20145330 <信息安全系统设计基础> 实验五 简单嵌入式WEB 服务器实验 实验报告封面 实验步骤 1.阅读理解源码 进入/arm2410cl/exp/basic/ ...
- 20145208《信息安全系统设计基础》实验五 简单嵌入式WEB 服务器实验
20145208<信息安全系统设计基础>实验五 简单嵌入式WEB 服务器实验 20145208<信息安全系统设计基础>实验五 简单嵌入式WEB 服务器实验
- 20145210 20145226 《信息安全系统设计基础》实验五 简单嵌入式WEB服务器实验
20145210 20145226 <信息安全系统设计基础>实验五 简单嵌入式WEB服务器实验 结对伙伴:20145226 夏艺华 实验报告封面 实验目的与要求 · 掌握在ARM开发板实现 ...
- 20145221 《信息安全系统设计基础》实验五 简单嵌入式WEB服务器实验
20145221 <信息安全系统设计基础>实验五 简单嵌入式WEB服务器实验 实验报告 队友博客:20145326蔡馨熠 实验博客:<信息安全系统设计基础>实验五 简单嵌入式W ...
- 实验5 简单嵌入式WEB服务器实验 实验报告 20135303 20135326
北京电子科技学院(BESTI) 实 验 报 告 课程:信息安全系统设计基础 班级: 1353 姓名:20135303 魏昊卿 学号:2013532 ...
- 20145303 20145339 《信息安全系统设计基础》 实验五 简单嵌入式WEB服务器实验
20145303 20145339 <信息安全系统设计基础> 实验五 简单嵌入式WEB服务器实验 实验目的与要求 1.掌握在ARM开发板实现一个简单WEB服务器的过程 2.学习在ARM开发 ...
- 三种嵌入式web服务器(Boa / lighttpd / shttpd)的 linux移植笔记
一:移植Boa(web服务器)到嵌入式Linux系统 一.Boa程序的移植 1.下载Boa源码 下载地址: http://www.boa.org/ 目前最新发行版本: 0.94.13 ...
- Atitit.嵌入式web 服务器 java android最佳实践
Atitit.嵌入式web 服务器 java android最佳实践 1. Android4.4.21 2. 自己的webserver1 3. CyberHTTP for Java cybergar ...
随机推荐
- bzoj 1069
最开始想到的是枚举3个点,另一个点用卡壳的思想,但实际上可以只枚举两个点(对角线上的两个点),其余两个点用卡壳. /****************************************** ...
- HDU 4685 Prince and Princess 二分图匹配+tarjan
Prince and Princess 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4685 Description There are n pri ...
- ZOJ 3626 Treasure Hunt I 树上DP
E - Treasure Hunt I Time Limit:2000MS Memory Limit:65536KB Description Akiba is a dangerous country ...
- 关于clipboard插件的使用问题
概述: clipboard.js是一款轻量级的实现复制文本到剪贴板功能的JavaScript插件.通过该插件可以将输入框,文本域,DIV元素中的文本等文本内容复制到剪贴板中 clipboard.js ...
- Aptana studio 3配色方案的修改方法
http://www.weste.net/2013/1-29/88614.html Aptana studio 3的确是一个不错的IDE,但是默认的黑底白色代码样式看时间长了有点审美疲劳了,如何能够更 ...
- 成为Java GC专家
http://www.importnew.com/author/wangxiaojie
- %( $# > 1 %? if (tid() in trace) %) 是什么意思
http://blog.csdn.net/sunnybeike/article/details/7769663 http://blog.163.com/digoal@126/blog/static/1 ...
- Setup Factory打包winform程序
摘要 Setup Factory是一款软件安装工具.Setup Factory支持创建一个安装文件或一个单间的setup.exe文件,生成文件可以运行于任意版本的windows中. 步骤 1.安装Se ...
- Major GC 是清理老年代。 Full GC 是清理整个堆空间—包括年轻代和老年代。
Major GC 是清理老年代. Full GC 是清理整个堆空间—包括年轻代和老年代.
- Java遍历Map键、值。获取Map大小的方法
Map读取键值对,Java遍历Map的两种实现方法 第一种方法是根据map的keyset()方法来获取key的set集合,然后遍历map取得value的值 import java.util.HashM ...