| [tekkamanninja@Tekkaman-Ninja source]$ tar -xvzf thttpd-2.25b.tar.gz |
| [tekkamanninja@Tekkaman-Ninja source]$ cd thttpd-2.25b [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ CC=/home/tekkamanninja/working/gcc4.1.1/gcc-4.1.1-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-gcc ./configure –host=arm-9tdmi-linux-gnu [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ make |
| [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ cp thttpd /home/tekkamanninja/working/nfs/rootfs/usr/sbin/ |
| [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ cp contrib/RedHat-rpm/thttpd.conf /home/tekkamanninja/working/nfs/rootfs/etc/ |
| [root@/root]#adduser httpd Changing password for httpd Enter the new password (minimum of 5, maximum of 8 characters) Please use a combination of upper and lower case letters and numbers. Enter new password: Bad password: too short. Warning: weak password (continuing). Re-enter new password: passwd[786]: password for `httpd" changed by user `root" Password changed. [root@/root]#exit process "-/bin/login" (pid 787) exited. Scheduling it for restart. starting pid 790, tty "": "/bin/login" 192.168.1.2 login: httpd Password: Processing /etc/profile... Set search library path in /etc/profile Set user path in /etc/profile Set PS1 in /etc/profile Done [httpd@/home/httpd]$mkdir html |
| [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ cp index.html /home/tekkamanninja/working/nfs/rootfs/home/httpd/html/ |
| [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ /home/tekkamanninja/working/gcc4.1.1/gcc-4.1.1-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-readelf -d thttpd Dynamic section at offset 0x12014 contains 21 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [libcrypt.so.1] 0x00000001 (NEEDED) Shared library: [libc.so.6] 0x0000000c (INIT) 0x9548 0x0000000d (FINI) 0x16564 0x00000004 (HASH) 0x8128 0x00000005 (STRTAB) 0x8c14 0x00000006 (SYMTAB) 0x8494 0x0000000a (STRSZ) 1066 (bytes) 0x0000000b (SYMENT) 16 (bytes) 0x00000015 (DEBUG) 0x0 0x00000003 (PLTGOT) 0x220e4 0x00000002 (PLTRELSZ) 872 (bytes) 0x00000014 (PLTREL) REL 0x00000017 (JMPREL) 0x91e0 0x00000011 (REL) 0x91a0 0x00000012 (RELSZ) 64 (bytes) 0x00000013 (RELENT) 8 (bytes) 0x6ffffffe (VERNEED) 0x9130 0x6fffffff (VERNEEDNUM) 2 0x6ffffff0 (VERSYM) 0x903e 0x00000000 (NULL) 0x0 |
| [tekkamanninja@Tekkaman-Ninja thttpd-2.25b]$ cp -d /home/tekkamanninja/working/gcc4.1.1/gcc-4.1.1-glibc-2.3.2/arm-9tdmi-linux-gnu/arm-9tdmi-linux-gnu/lib/libnss_files* /home/tekkamanninja/working/nfs/rootfs/lib/ |
| # This section overrides defaults dir=/home/httpd/html #chroot #屏蔽chroot是为了运行动态编译的CGI user=httpd# default = nobody logfile=/var/log/thttpd.log pidfile=/var/run/thttpd.pid # This section _documents_ defaults in effect port=81 #port参数用于更改端口号(可不改,若还运行了别的WEB服务器,则需用不同端口) # nosymlink# default = !chroot #symlinks # novhost cgipat=/cgi-bin/* #声明CGI程序的目录,是以dir为根目录的路径 # nothrottles # host=0.0.0.0 # charset=iso-8859-1 |