首先去下载 lighttpd 1.4.22 记得这个版本,最新到28到版本我编译有问题

编写一个shell

#!/bin/sh

# 预先安装libc6-dev,libpcre3-dev,zlib1g-dev,libbz2-dev


cd 
/usr/local/src

if [ -d lighttpd-1.4.22 ] ; then
  echo 
"lighttpd directory is already"
else
  tar zxvf lighttpd
-1.4.22.tar.gz
fi

cd lighttpd
-1.4.22

if [ -/opt/lighttpd1.4.22 ] ; then
  make clean
fi

export CC
=arm-linux-gcc
export AR
=arm-linux-ar
export LD
=arm-linux-ld
export RANLIB
=arm-linux-ranlib
export STRIP
=arm-linux-strip

if [ -/opt/lighttpd1.4.22 ] ; then
  echo 
"lighttpd is installed"
else
  
./configure -host=arm-linux -prefix=/opt/lighttpd1.4.22 --disable-FEUTARE --disable-ipv6 --disable-lfs --without-bzip2
fi

if [ -f Makefile ] ; then
  make
  make install
fi

相关文章: