从http://www.acme.com/software/thttpd/ 下载thttpd 到/tmp 目录当中,并解压.
编译thttpd
[arm@localhost thttpd-2.25b]$ CC=arm-linux-gcc ./configure --host=arm-linux
[arm@localhost thttpd-2.25b]$ vi Makefile
指定静态链接二进制文件
LDFLAGS = -static
[arm@localhost thttpd-2.25b]$ make LDFLAGS="-static"
配置
拷贝 thttpd二进制可执行文件到根文件系统/ usr/sbin/ 目录中
[arm@localhost thttpd-2.25b]$ cp thttpd /home/arm/dev_home/rootfs/my_rootfs/usr/sbin/
修改 thttpd配置文件
[arm@localhost thttpd-2.25b]$ vi contrib/redhat-rpm/thttpd.conf
# This section overrides defaults
dir=/etc/thttpd/html #指明WebServer 存放网页的根目录路径
chroot
user=root # 以root 身份运 thttpd
logfile=/etc/thttpd/log/thttpd.log # 日志文件路径
pidfile=/etc/thttpd/run/thttpd.pid #pid 文件路径
拷贝thttpd.conf 配置文件到根文件系统的mnt/etc/ 目录,
系统加载后,linuxrc 脚本会自动将mnt/etc/下的所有文件拷贝到/etc 目录中。
[arm@localhost thttpd-2.25b]$ cp contrib/redhat-rpm/thttpd.conf /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/
转移到根文件系统目录,创建相应的文件
[arm@localhost etc]$ cd /home/arm/dev_home/rootfs/my_rootfs
[arm@localhost my_rootfs]$ cd mnt/etc/
创建thttpd 目录
[arm@localhost etc]$ mkdir thttpd
[arm@localhost etc]$ cd thttpd
thttpd 目录下的目录结构
|-- html
| `-- index.html Web Server 网页根目录下的默认HTML 文件
|-- log
| `-- thttpd.log 创建一个空文件就可
`-- run
`-- thttpd.pid 创建一个空文件就可
html 目录下的index.html 文件内容如下:
<html>
<head>
<title> Welcome to here^^ </title>
</head>
<body>
<marquee>
<font color=red>
Welcome to here^^!!!
</font>
</marquee>
</body>
</html>
分享到:
相关推荐
嵌入式Linux下的thttpd web服务器的移植.pdf
2.3.1 tftp服务器的配置.......................................................................................................10 2.4 工具使用...............................................................
简单: ... 好吧,也许比最低限度多一点。 小巧: 请参阅比较图表。 它还具有非常小的运行时大小,因为它不会分叉和 对内存分配非常谨慎。...它不遗余力地保护 Web 服务器计算机免受 来自其他站点的攻击和入侵。
第4篇从嵌入式产品角度出发,介绍了GUI、Qtopia、嵌入式数据库Berkeley DB和SQLite、嵌入式Web服务器BOA和Thttpd、JVM虚拟机的移植及目前流行的VoIP技术和相关协议。, 《Linux系统移植》适合嵌入式Linux系统入门人员...
第4篇从嵌入式产品角度出发,介绍了gui、qtopia、嵌入式数据库berkeley db和sqlite、嵌入式web服务器boa和thttpd、jvm虚拟机的移植及目前流行的voip技术和相关协议。 本书适合嵌入式linux系统入门人员、linux系统...
第4篇从嵌入式产品角度出发,介绍了gui、qtopia、嵌入式数据库berkeley db和sqlite、嵌入式web服务器boa和thttpd、jvm虚拟机的移植及目前流行的voip技术和相关协议。 本书适合嵌入式linux系统入门人员、linux系统...
第4篇从嵌入式产品角度出发,介绍了GUI、Qtopia、嵌入式数据库BerkeleyDB和SQLite、嵌入式Web服务器BOA和Thttpd、JVM虚拟机的移植及目前流行的VoIP技术和相关协议。 《Linux系统移植(第2版)》适合嵌入式Linux...
本书第1篇介绍Linux内核和嵌入式Linux系统开发环境搭建;第2篇介绍Bootloader移植、...第4篇介绍GUI、Qtopia、嵌入式数据库BerkeleyDB和SQLite、嵌入式Web服务器BOA和Thttpd、JVM虚拟机的移植及VoIP技术和相关协议。
2.3.1 tftp服务器的配置.......................................................................................................10 2.4 工具使用.............................................................
2.3.1 tftp 服务器的配置.......................................................................................................10 2.4 工具使用............................................................