How to Install Lighttpd On CentOS
How to Install Lighttpd On CentOS
Lighttpd is an open source and high performance web server. it’s very flexible web server and highly optimize. Also As per my experience Lighttpd utilize very low Memory and CPU than other web servers and YouTube and Wikimedia run Lighttpd servers, Also most of the streaming web sites are using Lighttpd for the video streaming. Lighttpd installation is very easy and you can install it with YUM.
Update your system.
#yum update
Add EPEL Repository
To install Lighttpd package you will have to install EPEL yum repository your machin.
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Install Lighttpd Server
Install Lighttpd using yum package manager. Following command will install lighttpd lighttpd-fastcgi packges on your server.
yum install lighttpd lighttpd-fastcgi
Loaded plugins: fastestmirror, refresh-packagekit, security Loading mirror speeds from cached hostfile * base: mirror.nbrc.ac.in * epel: mirrors.ispros.com.bd * extras: mirror.nbrc.ac.in * updates: mirror.nhanhoa.com Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package lighttpd.i686 0:1.4.35-1.el6 will be installed ---> Package lighttpd-fastcgi.i686 0:1.4.35-1.el6 will be installed --> Processing Dependency: spawn-fcgi for package: lighttpd-fastcgi-1.4.35-1.el6.i686 --> Running transaction check ---> Package spawn-fcgi.i686 0:1.6.3-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================== Package Arch Version Repository Size =================================================================================================== Installing: lighttpd i686 1.4.35-1.el6 epel 300 k lighttpd-fastcgi i686 1.4.35-1.el6 epel 45 k Installing for dependencies: spawn-fcgi i686 1.6.3-1.el6 epel 16 k Transaction Summary =================================================================================================== Install 3 Package(s) Total download size: 361 k Installed size: 818 k Is this ok [y/N]: y Downloading Packages: (1/3): lighttpd-1.4.35-1.el6.i686.rpm | 300 kB 00:00 (2/3): lighttpd-fastcgi-1.4.35-1.el6.i686.rpm | 45 kB 00:00 (3/3): spawn-fcgi-1.6.3-1.el6.i686.rpm | 16 kB 00:00 --------------------------------------------------------------------------------------------------- Total 206 kB/s | 361 kB 00:01 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : lighttpd-1.4.35-1.el6.i686 1/3 Installing : spawn-fcgi-1.6.3-1.el6.i686 2/3 Installing : lighttpd-fastcgi-1.4.35-1.el6.i686 3/3 Installed: lighttpd.i686 0:1.4.35-1.el6 lighttpd-fastcgi.i686 0:1.4.35-1.el6 Dependency Installed: spawn-fcgi.i686 0:1.6.3-1.el6 Complete!
Configure Lighttpd Server
Disabled selinux in your system.
getenforece
Try to disable selinux by updating /etc/sysconfig/selinux file with SELINUX=disabled
nano /etc/sysconfig/selinux
SELINUX=disabled
Edit /etc/lighttpd/lighttpd.conf file with the following value
server.use-ipv6 = "disable" server.max-fds = 2048
Start Lighttpd Service
# service lighttpd start # chkconfig lighttpd on
Testing Lighttpd:
To make sure everything installed correctly we will now test Lighttpd to ensure it is working properly.
http://localhost/ or http://your.ip.addr.ess
You will get the web page saying “Powered by lighttpd”, lighttpd’s default document root