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.

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