1 2============ 3Installation 4============ 5 6:author: Jan Kneschke 7:Date: $Date: $ 8:Revision: $Revision: $ 9 10Installation 11------------ 12 13Get the source from 14 15https://www.lighttpd.net/download/ 16 17unpack it by :: 18 19 $ gzip -cd lighttpd-1.x.x.tar.gz | tar xf - 20 21compile and install it with :: 22 23 $ cd lighttpd-1.x.x 24 $ ./configure 25 $ make 26 $ su - 27 # make install 28 # exit 29 30take look at the configfile in ./doc/lighttpd.conf, 31make your own copy of that file and modify it for your needs. 32 33 34static build using SCons 35------------------------ 36 37 $ scons -j 4 build_static=1 build_dynamic=0 prefix=/custom/inst/path install 38 39build_dynamic is enabled by default in SConstruct and needs to be disabled for 40the static build. See also the BoolVariable() settings in SConstruct for other 41configurable variables that might be set in a customized build. build_static=1 42can be replaced with build_fullstatic=1 to perform lighttpd static build with 43modules *and* to link statically against external dependencies. 44 45 46static build using make 47----------------------- 48 49* edit src/Makefile.am and, in the section under 'if LIGHTTPD_STATIC', 50 update lighttpd_SOURCES with each module to be included in the static build 51* create src/plugin-static.h with list of modules as PLUGIN_INIT(mod_foo) 52 for each module 'mod_foo' to be included in the static build 53 54 $ LIGHTTPD_STATIC=yes ./configure -C --enable-static=yes 55 $ make 56 $ sudo make install 57 58build using CMake and Xcode on Mac OS X with MacPorts 59----------------------------------------------------- 60* upgrade to latest Mac OS X 61* install Xcode from Apple Store (requires latest Mac OS X) 62* install MacPorts from https://www.macports.org/install.php 63 64 $ xcodebuild --license 65 $ xcode-select --install 66 $ sudo port selfupdate 67 $ sudo port install autoconf automake cmake libtool m4 pcre pkgconfig zlib bzip2 openssl libxml sqlite3 openldap fcgi p5-cgi libunwind libunwind-headers mysql57 libev gdbm openldap ossp-uuid 68 # Note: some of the above require more fiddling to configure with CMake... 69 70 # cmake and build 71 # (all -DWITH_... flags below are optional) 72 $ cmake -Wno-dev -DWITH_OPENSSL=1 -DWITH_LUA=1 -DWITH_ZLIB=1 -DWITH_BZIP2=1 -DWITH_WEBDAV_PROPS=1 . 73 $ make -j 4 74 $ make test 75 76 # Note: many tests fail if not built with openssl 77 # lighttpd will not start up with tests/lighttpd.conf 78 # (mod_secdownload fails to configure hmac-sha1 and hmac-sha256) 79