[core] consolidate duplicated read-to-close code
[lighttpd.git] / INSTALL
blobf4aa8f7cb3fe7d3f26dddd3f9da25245acd11c03
2 ============
3 Installation
4 ============
6 :author: Jan Kneschke
7 :Date: $Date: $
8 :Revision: $Revision: $
10 Installation
11 ------------
13 Get the source from
15 http://www.lighttpd.net/download/
17 unpack it by ::
19   $ gzip -cd lighttpd-1.x.x.tar.gz | tar xf -
21 compile and install it with ::
23   $ cd lighttpd-1.x.x
24   $ ./configure
25   $ make
26   $ su -
27   # make install
28   # exit
30 take look at the configfile in ./doc/lighttpd.conf,
31 make your own copy of that file and modify it for your needs.
34 static build using SCons
35 ------------------------
37   $ scons -j 4 build_static=1 build_dynamic=0 prefix=/custom/inst/path install
39 build_dynamic is enabled by default in SConstruct and needs to be disabled for
40 the static build.  See also the BoolVariable() settings in SConstruct for other
41 configurable variables that might be set in a customized build.  build_static=1
42 can be replaced with build_fullstatic=1 to perform lighttpd static build with
43 modules *and* to link statically against external dependencies.
46 static build using make
47 -----------------------
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
54   $ LIGHTTPD_STATIC=yes ./configure -C --enable-static=yes
55   $ make
56   $ sudo make install
58 build 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
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...
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
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)