Monday, October 6, 2008

How to compile Lighttpd on CentOS

It's very easy and very fast to compile Lighty to your Linux box on default settings. Here's and example how to compile Lighttpd 1.4.20 on CentOS 5.1.

1) Download latest version of lighty from http://www.lighttpd.net/download.

2) Extract the contents to your template directory.

3) Run .configure. I want to install application to place other than default, therefore I use --prefix -option:

[root@cluster1 lighttpd-1.4.20]# ./configure --prefix=/opt/lighttpd-1.4.20

4) After configuring you receive list of which modules and features are enabled:

enabled:
mod_access
mod_accesslog
mod_alias
mod_auth
mod_cgi
mod_compress
mod_dirlisting
mod_evhost
mod_expire
mod_extforward
mod_fastcgi
mod_flv_streaming
mod_indexfiles
mod_proxy
mod_redirect
mod_rewrite
mod_rrdtool
mod_scgi
mod_secdownload
mod_setenv
mod_simple_vhost
mod_ssi
mod_staticfile
mod_status
mod_trigger_b4_dl
mod_userdir
mod_usertrack
mod_webdav
disabled:
mod_cml
mod_magnet
mod_mysql_vhost

Features:

enabled:
auth-crypt
compress-bzip2
compress-deflate
compress-gzip
large-files
network-ipv6
regex-conditionals
disabled:
auth-ldap
network-openssl
stat-cache-fam
storage-gdbm
storage-memcache
webdav-locks
webdav-properties

5) Run mtake and after that run make install

6) If you use another prefix instead of default, you have to copy lighttpd.conf manually. After that you have to make default directories (htdocs & log directory) manually.

7) Start lighty with option -f to define configuration directory:

[root@cluster1 man1]# ./lighttpd -f /etc/lighhtpd/lighttpd.conf

8) Connect localhost:80 with our web browser!

No comments: