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
The Building Blocks of Linux: Key Components ExplainedThe Building Blocks of Linux: Key Components ExplainedApr 30, 2025 am 12:26 AM

The core components of the Linux system include the kernel, file system, and user space. 1. The kernel manages hardware resources and provides basic services. 2. The file system is responsible for data storage and organization. 3. Run user programs and services in the user space.

Using Maintenance Mode: Troubleshooting and Repairing LinuxUsing Maintenance Mode: Troubleshooting and Repairing LinuxApr 29, 2025 am 12:28 AM

Maintenance mode is a special operating level entered in Linux systems through single-user mode or rescue mode, and is used for system maintenance and repair. 1. Enter maintenance mode and use the command "sudosystemctlisolaterscue.target". 2. In maintenance mode, you can check and repair the file system and use the command "fsck/dev/sda1". 3. Advanced usage includes resetting the root user password, mounting the file system in read and write mode and editing the password file.

Linux Maintenance Mode: Understanding the PurposeLinux Maintenance Mode: Understanding the PurposeApr 28, 2025 am 12:01 AM

Maintenance mode is used for system maintenance and repair, allowing administrators to work in a simplified environment. 1. System Repair: Repair corrupt file system and boot loader. 2. Password reset: reset the root user password. 3. Package management: Install, update or delete software packages. By modifying the GRUB configuration or entering maintenance mode with specific keys, you can safely exit after performing maintenance tasks.

Linux Operations: Networking and Network ConfigurationLinux Operations: Networking and Network ConfigurationApr 27, 2025 am 12:09 AM

Linux network configuration can be completed through the following steps: 1. Configure the network interface, use the ip command to temporarily set or edit the configuration file persistence settings. 2. Set up a static IP, suitable for devices that require a fixed IP. 3. Manage the firewall and use the iptables or firewalld tools to control network traffic.

Maintenance Mode in Linux: A System Administrator's GuideMaintenance Mode in Linux: A System Administrator's GuideApr 26, 2025 am 12:20 AM

Maintenance mode plays a key role in Linux system management, helping to repair, upgrade and configuration changes. 1. Enter maintenance mode. You can select it through the GRUB menu or use the command "sudosystemctlisolaterscue.target". 2. In maintenance mode, you can perform file system repair and system update operations. 3. Advanced usage includes tasks such as resetting the root password. 4. Common errors such as not being able to enter maintenance mode or mount the file system, can be fixed by checking the GRUB configuration and using the fsck command.

Maintenance Mode in Linux: When and Why to Use ItMaintenance Mode in Linux: When and Why to Use ItApr 25, 2025 am 12:15 AM

The timing and reasons for using Linux maintenance mode: 1) When the system starts up, 2) When performing major system updates or upgrades, 3) When performing file system maintenance. Maintenance mode provides a safe and controlled environment, ensuring operational safety and efficiency, reducing impact on users, and enhancing system security.

Linux: Essential Commands and OperationsLinux: Essential Commands and OperationsApr 24, 2025 am 12:20 AM

Indispensable commands in Linux include: 1.ls: list directory contents; 2.cd: change working directory; 3.mkdir: create a new directory; 4.rm: delete file or directory; 5.cp: copy file or directory; 6.mv: move or rename file or directory. These commands help users manage files and systems efficiently by interacting with the kernel.

Linux Operations: Managing Files, Directories, and PermissionsLinux Operations: Managing Files, Directories, and PermissionsApr 23, 2025 am 12:19 AM

In Linux, file and directory management uses ls, cd, mkdir, rm, cp, mv commands, and permission management uses chmod, chown, and chgrp commands. 1. File and directory management commands such as ls-l list detailed information, mkdir-p recursively create directories. 2. Permission management commands such as chmod755file set file permissions, chownuserfile changes file owner, and chgrpgroupfile changes file group. These commands are based on file system structure and user and group systems, and operate and control through system calls and metadata.

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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