lighttpd 1.4.x https://www.lighttpd.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

196 lines
5.6 KiB

  1. ============
  2. Installation
  3. ============
  4. Quick Installation
  5. ------------------
  6. Get lighttpd source from
  7. https://www.lighttpd.net/download/
  8. unpack it by ::
  9. $ tar xvJf lighttpd-1.4.xx.tar.xz
  10. compile and install it with ::
  11. $ cd lighttpd-1.4.xx
  12. $ ./autogen.sh
  13. $ ./configure -C
  14. $ make check
  15. $ /usr/bin/sudo make install
  16. take look at the configfile in ./doc/lighttpd.conf,
  17. make your own copy of that file and modify it for your needs.
  18. Online documentation
  19. --------------------
  20. https://redmine.lighttpd.net/projects/lighttpd/wiki/Devel
  21. https://redmine.lighttpd.net/projects/lighttpd/wiki/DevelSubversion
  22. https://redmine.lighttpd.net/projects/lighttpd/wiki/InstallFromSource
  23. Custom Installation
  24. -------------------
  25. required packages ::
  26. autoconf
  27. automake
  28. libtool
  29. m4
  30. pcre
  31. pcre-devel
  32. pkg-config
  33. optional packages for optional features ::
  34. bzip2-devel # bzip2 ./configure --with-bzip2
  35. bzip2-libs
  36. cyrus-sasl # SASL ./configure --with-sasl
  37. cyrus-sasl-devel
  38. gdbm # GDBM ./configure --with-gdbm
  39. gdbm-devel
  40. GeoIP-devel # GeoIP ./configure --with-geoip
  41. GeoIP
  42. gnutls # GnuTLS ./configure --with-gnutls
  43. gnutls-devel
  44. krb5-devel # Kerberos5 ./configure --with-krb5
  45. krb5-libs
  46. libbrotli # brotli ./configure --with-brotli
  47. brotli-devel
  48. libdbi # DBI ./configure --with-dbi
  49. libdbi-devel
  50. libdbi-dbd-mysql
  51. libdbi-dbd-pgsql
  52. libdbi-dbd-sqlite
  53. libmaxminddb # MaxMindDB ./configure --with-maxminddb
  54. libmaxminddb-devel
  55. libmemcached-devel # Memcached ./configure --with-memcache
  56. libmemcached-libs
  57. libpq # Postgresql ./configure --with-pgsql
  58. libpq-devel
  59. libunwind # libunwind ./configure --with-libunwind
  60. libuuid # libuuid ./configure --with-webdav-locks
  61. libuuid-devel
  62. libxml2 # libxml2 ./configure --with-webdav-props
  63. libxml2-devel
  64. libxml2-static
  65. lua # Lua ./configure --with-lua
  66. lua-devel
  67. mariadb-devel # MariaDB ./configure --with-mysql
  68. mariadb-libs
  69. mbedtls # mbedTLS ./configure --with-mbedtls
  70. mbedtls-devel
  71. nettle # Nettle ./configure --with-nettle
  72. nettle-devel
  73. nss # NSS ./configure --with-nss
  74. nss-devel
  75. openldap # OpenLDAP ./configure --with-ldap
  76. openldap-devel
  77. openssl-devel # OpenSSL ./configure --with-openssl
  78. openssl-libs
  79. pam # PAM ./configure --with-pam
  80. pam-devel
  81. pcre # PCRE ./configure --with-pcre # (default)
  82. pcre-devel
  83. sqlite # SQLite ./configure --with-webdav-props
  84. sqlite-devel
  85. valgrind # valgrind ./configure --with-valgrind
  86. valgrind-devel
  87. wolfssl # wolfSSL ./configure --with-wolfssl
  88. wolfssl-devel
  89. zlib # zlib ./configure --with-zlib
  90. zlib-devel
  91. zstd # zstd ./configure --with-zstd
  92. libzstd-devel
  93. more options: ./configure --help
  94. re-run ./configure after installing packages
  95. compile and install it with ::
  96. $ cd lighttpd-1.4.xx
  97. $ ./autogen.sh # detect/use newer versions of autotools (if present)
  98. $ ./configure -C # add --with-xxxxx custom flags
  99. $ make
  100. # sudo make install
  101. Running Tests
  102. -------------
  103. required packages to run test harness ::
  104. (e.g. on Fedora 22, sudo dnf install ...)
  105. (e.g. on Arch Linux, sudo pacman ... (with lowercased package names))
  106. perl-CGI
  107. perl-Digest
  108. perl-Digest-MD5
  109. perl-Encode-Locale
  110. perl-HTML-Entities-Interpolate
  111. perl-HTML-Parser
  112. perl-HTML-Tagset
  113. perl-HTTP-Date
  114. perl-HTTP-Message
  115. perl-IO-HTML
  116. perl-LWP-MediaTypes
  117. perl-Tie-Function
  118. perl-TimeDate
  119. run test harness
  120. $ make check
  121. static build using SCons
  122. ------------------------
  123. $ scons -j 4 build_static=1 build_dynamic=0 prefix=/custom/inst/path install
  124. build_dynamic is enabled by default in SConstruct and needs to be disabled for
  125. the static build. See also the BoolVariable() settings in SConstruct for other
  126. configurable variables that might be set in a customized build. build_static=1
  127. can be replaced with build_fullstatic=1 to perform lighttpd static build with
  128. modules *and* to link statically against external dependencies.
  129. static build using make
  130. -----------------------
  131. * edit src/Makefile.am and, in the section under 'if LIGHTTPD_STATIC',
  132. update lighttpd_SOURCES with each module to be included in the static build
  133. * create src/plugin-static.h with list of modules as PLUGIN_INIT(mod_foo)
  134. for each module 'mod_foo' to be included in the static build
  135. $ LIGHTTPD_STATIC=yes ./configure -C --enable-static=yes
  136. $ make
  137. $ sudo make install
  138. build using CMake and Xcode on Mac OS X with MacPorts
  139. -----------------------------------------------------
  140. * upgrade to latest Mac OS X
  141. * install Xcode from Apple Store (requires latest Mac OS X)
  142. * install MacPorts from https://www.macports.org/install.php
  143. $ xcodebuild --license
  144. $ xcode-select --install
  145. $ sudo port selfupdate
  146. $ sudo port install autoconf automake cmake libtool m4 pcre pkgconfig zlib zstd brotli openssl libxml sqlite3 openldap libunwind libunwind-headers mysql57 libev gdbm openldap ossp-uuid
  147. # Note: some of the above require more fiddling to configure with CMake...
  148. # cmake and build
  149. # (all -DWITH_... flags below are optional)
  150. $ cmake -Wno-dev -DWITH_OPENSSL=1 -DWITH_LUA=1 -DWITH_ZLIB=1 -DWITH_ZSTD=1 -DWITH_BROTLI=1 -DWITH_WEBDAV_PROPS=1 .
  151. $ make -j 4
  152. $ make test
  153. # Note: many tests fail if not built with openssl
  154. # lighttpd will not start up with tests/lighttpd.conf
  155. # (mod_secdownload fails to configure hmac-sha1 and hmac-sha256)