Transplant thttpd Web server

download

From http://www.acme.com/software/thttpd/ thttpd downloaded to the / tmp directory which, and unzip it.

 

Compile thttpd

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

Specified statically linked binaries

LDFLAGS =         ­static

 

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

 

Configuration

 

Copy thttpd binary executable file to the root file system / usr / sbin / directory

[arm@localhost thttpd­2.25b]$ cp thttpd /home/arm/dev_home/rootfs/my_rootfs/usr/sbin/

 

Modify thttpd profile

[arm@localhost thttpd­2.25b]$ vi contrib/redhat­rpm/thttpd.conf

# This section overrides defaults

dir = / etc / thttpd / html # WebServer specified storage path of the root page chroot

user = root # Run as root thttpd

logfile = / etc / thttpd / log / thttpd.log # log file path pidfile = / etc / thttpd / run / thttpd.pid #pid file path

 

Mnt copy thttpd.conf configuration file to the root file system's / etc / directory, the system is loaded, linuxrc script will automatically copy all the files mnt / etc / in the / etc directory.

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

 

Transfer to the root file system directory, create a corresponding file

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

 

Create a directory thttpd

[Arm @ localhost etc] $ mkdir thttpd [arm @ localhost etc] directory structure under $ cd thttpd thttpd directory

|­­ html

| Default HTML files under the `index.html Web Server web root directory

|­­ log

| `Thttpd.log can create an empty file

`­­ run

`Thttpd.pid can create an empty file

 

index.html file in the html directory contents as follows:

 

<html>

<head>

 

</head>

<body>


 

 

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

 

 

<marquee>

<font color=red>

Welcome to here^^!!!

 

 

 

</body>

</html>

 

</font>

</marquee>

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11105678.html