search
HomeOperation and MaintenanceLinux Operation and MaintenanceHow to install Lighttpd web server on CentOS and RHEL using Yum

Lighttpd is a high-performance web server suitable for running in production environments. It is a highly optimized, secure and very flexible web server; LightTPD uses very low memory and CPU compared to other web servers. Its event-driven architecture is optimized for large numbers of parallel connections (keep-alive)

How to install Lighttpd web server on CentOS and RHEL using Yum

Lighttpd powers some popular Web 2.0 sites. It provides high-speed IO infrastructure that enables them to scale many times on the same hardware. This was developed with future networks in mind, such as faster FastCGI, COMET compliant mod_mailbox, and asynchronous IO.

You can follow the steps below to install Lighttpd on a RHEL-based system.

Step 1: Add EPEL repository

EPEL yum repository has the latest Lighttpd package, first add EPEL yum repository in your system.

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

Step 2: Install LightTPD server

Use yum package manager to install lighttpd

# 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 the lighttpd configuration, make sure selinux is disabled in the system.

# getenforece

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

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

server.use-ipv6: Setting this value to "diable" will allow the server to listen for IPv6 connections and disable IPv6 connect.

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

Step 4: Start the LightTPD server

Finally use the following command to start the lighttpd service

# service lighttpd start

To stop or restart the server, use the following command.

# service lighttpd stop
# service lighttpd restart

Make lighttpd start when the server starts

# chkconfig lighttpd on

[Related recommendations: Linux video tutorial]

The above is the detailed content of How to install Lighttpd web server on CentOS and RHEL using Yum. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Tutorial on finding keywords for common Linux commandsTutorial on finding keywords for common Linux commandsMar 05, 2025 am 11:45 AM

This tutorial demonstrates efficient keyword searching in Linux using the grep command family and related tools. It covers basic and advanced techniques, including regular expressions, recursive searches, and combining commands like awk, sed, and xa

Work content of Linux operation and maintenance engineers What does Linux operation and maintenance engineers do?Work content of Linux operation and maintenance engineers What does Linux operation and maintenance engineers do?Mar 05, 2025 am 11:37 AM

This article details the multifaceted role of a Linux system administrator, encompassing system maintenance, troubleshooting, security, and collaboration. It highlights essential technical and soft skills, salary expectations, and diverse career pr

How do I configure SELinux or AppArmor to enhance security in Linux?How do I configure SELinux or AppArmor to enhance security in Linux?Mar 12, 2025 pm 06:59 PM

This article compares SELinux and AppArmor, Linux kernel security modules providing mandatory access control. It details their configuration, highlighting the differences in approach (policy-based vs. profile-based) and potential performance impacts

How do I back up and restore a Linux system?How do I back up and restore a Linux system?Mar 12, 2025 pm 07:01 PM

This article details Linux system backup and restoration methods. It compares full system image backups with incremental backups, discusses optimal backup strategies (regularity, multiple locations, versioning, testing, security, rotation), and da

How do I use regular expressions (regex) in Linux for pattern matching?How do I use regular expressions (regex) in Linux for pattern matching?Mar 17, 2025 pm 05:25 PM

The article explains how to use regular expressions (regex) in Linux for pattern matching, file searching, and text manipulation, detailing syntax, commands, and tools like grep, sed, and awk.

How do I monitor system performance in Linux using tools like top, htop, and vmstat?How do I monitor system performance in Linux using tools like top, htop, and vmstat?Mar 17, 2025 pm 05:28 PM

The article discusses using top, htop, and vmstat for monitoring Linux system performance, detailing their unique features and customization options for effective system management.

How do I implement two-factor authentication (2FA) for SSH in Linux?How do I implement two-factor authentication (2FA) for SSH in Linux?Mar 17, 2025 pm 05:31 PM

The article provides a guide on setting up two-factor authentication (2FA) for SSH on Linux using Google Authenticator, detailing installation, configuration, and troubleshooting steps. It highlights the security benefits of 2FA, such as enhanced sec

Methods for uploading files for common Linux commandsMethods for uploading files for common Linux commandsMar 05, 2025 am 11:42 AM

This article compares Linux commands (scp, sftp, rsync, ftp) for uploading files. It emphasizes security (favoring SSH-based methods) and efficiency, highlighting rsync's delta transfer capabilities for large files. The choice depends on file size,

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft