Install Lighttpd Web Server on CentOS/RHEL 6/5 using Yum

Install Lighttpd Web Server on CentOS/RHEL 6/5 using Yum

Install Lighttpd Web Server on CentOS/RHEL 6/5 using Yum:

Lighttpd is high performance web server created suitable for running on production environment. It is highly optimize, secure and very flexible web server. Lighttpd utilize very low Memory and CPU than other web servers. Its event-driven architecture is optimized for a large number of parallel connections (keep-alive)

Lighttpd powers several popular Web 2.0 sites. It provides high speed io-infrastructure which allows them to scale several times better with the same hardware. This is developed with keeping future web in mind like:

    • Faster FastCGI
    • COMET meets mod_mailbox
    • Async IO

Follow the steps below to install Lighttpd on RHEL based systems.

Step 1: Add EPEL Repository

At the time of writing article EPEL yum repository have the latest package of Lighttpd, First add EPEL yum repository your system.

# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Step 2: Install Lighttpd Server

Install Lighttpd using yum package manager

# 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.
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
google-chrome-stable-34.0.1847.116-1.i386 has missing requires of libnss3.so(NSS_3.14.3)
  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!

Step 3: Configure Lighttpd Server

Before starting Lighttpd configuration, make sure you have selinux disabled in your system.

# getenforece

Now edit Lighttpd configuration file /etc/lighttpd/lighttpd.conf and

server.use-ipv6 = "disable"
server.max-fds = 2048

server.use-ipv6: Set this value ot ‘diable’ will allow server to listen on IPv6 connections and disabled IPv6 connection.

server.max-fds Lighttpd is single-threaded server, its main resource limit is the number of file descriptors, which is set to 1024 by default (on most systems). To handle high traffic site set this to 2048.

Step 4: Start Lighttpd Server

Finally start Lighttpd service using following command.

# service lighttpd start

To stop or restart server use following command.

# service lighttpd stop
# service lighttpd restart

Make Lighttpd to start on server boot

# chkconfig lighttpd on
 
Enjoyed this video?
Install Lighttpd Web Server on CentOS/RHEL 6/5 using Yum
"No Thanks. Please Close This Box!"