Lighttpd

Restart Lighttpd

Starting and stopping services is a fundamental skill for any system administrator. Using this quick article, you will discover how to manage the Lighttpd service on various Debian, REHL, and FreeBSD systems.

Installing Lighttpd server

Before starting and stopping the services, we need to ensure the server is installed on our system.

Debian/Ubuntu

For Debian and other Debian-based systems, you can use the apt package manager to handle the installation.

sudo apt update

sudo apt install lighttpd

The above command will install the latest version of the Lighttpd server. You can check the installed version using the command:

$ lighttpd -v

lighttpd/1.4.59 (ssl) - a light <strong>and</strong> fast webserver

CentOS/RedHat/Fedora

For systems in the REHL family, use the yum package manager as:

sudo yum update

sudo yum install epel-release

sudo yum update

sudo yum install lighttpd

The above commands should install the epel-release repository and install the Lighttpd server.

FreeBSD.

On FreeBSD, start by updating your port tree as:

portsnap fetch

portsnap update

Next, install the Lighttpd server under /usr/ports/www/lighttpd

cd /usr/ports/www/lighttpd

Install:

make

make install

make clean

Starting Lighttpd server

Debian/Ubuntu

On Debian based systems, you can start the Lighttpd server using the command:

$ sudo systemctl start lighttpd.service

$ sudo /etc/init.d/lighttpd start

CentOS/REHL

On REHL family, use the command:

$ sudo systemctl start lighttpd.service

FreeBSD

If you are on FreeBSD, enter the command:

$ /usr/local/etc/rc.d/lighttpd start

Stopping Lighttpd server

Debian/Ubuntu

On Debian based distributions, use the commands:

$ sudo systemctl stop lighttpd.service

$ sudo /etc/init.d/lighttpd stop

CentOS/REHL

REHL family, use systemctl as:

$ sudo systemctl stop lighttpd.service

FreeBSD

On BSD, enter the command:

$ /usr/local/etc/rc.d/lighttpd stop

Restarting Lighttpd Server

Debian/Ubuntu

sudo systemctl restart lighttpd.service

sudo /etc/init.d/lighttpd restart

CentOS/REHL

On REHL family:

sudo systemctl restart lighttpd.service

FreeBSD

/usr/local/etc/rc.d/lighttpd restart

Conclusion

This guide discussed how you could install the Lighttpd server on various systems and manage the services.

About the author

John Otieno

My name is John and am a fellow geek like you. I am passionate about all things computers from Hardware, Operating systems to Programming. My dream is to share my knowledge with the world and help out fellow geeks. Follow my content by subscribing to LinuxHint mailing list