日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

移植 thttpd Web服务器

發(fā)布時間:2023/11/27 生活经验 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 移植 thttpd Web服务器 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

從http://www.acme.com/software/thttpd/ 下載thttpd 到/tmp 目錄當(dāng)中,并解壓.



編譯thttpd



[arm@localhost thttpd-2.25b]$ CC=arm-linux-gcc ./configure --host=arm-linux

[arm@localhost thttpd-2.25b]$ vi Makefile

指定靜態(tài)鏈接二進制文件

LDFLAGS =?????? -static



[arm@localhost thttpd-2.25b]$ make LDFLAGS="-static"



配置



拷貝 thttpd二進制可執(zhí)行文件到根文件系統(tǒng)/ 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 存放網(wǎng)頁的根目錄路徑

chroot

user=root?????????????????????? # 以root 身份運?????? thttpd

logfile=/etc/thttpd/log/thttpd.log # 日志文件路徑

pidfile=/etc/thttpd/run/thttpd.pid #pid 文件路徑



拷貝thttpd.conf 配置文件到根文件系統(tǒng)的mnt/etc/ 目錄,

系統(tǒng)加載后,linuxrc 腳本會自動將mnt/etc/下的所有文件拷貝到/etc 目錄中。

[arm@localhost thttpd-2.25b]$ cp contrib/redhat-rpm/thttpd.conf /home/arm/dev_home/rootfs/my_rootfs/mnt/etc/



轉(zhuǎn)移到根文件系統(tǒng)目錄,創(chuàng)建相應(yīng)的文件



[arm@localhost etc]$ cd /home/arm/dev_home/rootfs/my_rootfs

[arm@localhost my_rootfs]$ cd mnt/etc/



創(chuàng)建thttpd 目錄

[arm@localhost etc]$ mkdir thttpd

[arm@localhost etc]$ cd thttpd

thttpd 目錄下的目錄結(jié)構(gòu)

|-- html

| `-- index.html Web Server 網(wǎng)頁根目錄下的默認HTML 文件

|-- log

| `-- thttpd.log 創(chuàng)建一個空文件就可

`-- run

??? `-- thttpd.pid 創(chuàng)建一個空文件就可


html 目錄下的index.html 文件內(nèi)容如下:


<html>

<head>

??????? <title> Welcome to here^^ </title>

</head>

<body>

??????? <marquee>

??????????????? <font color=red>

??????????????????????? Welcome to here^^!!!

??????????????? </font>

??????? </marquee>

</body>

</html>

總結(jié)

以上是生活随笔為你收集整理的移植 thttpd Web服务器的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。