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 install lighttpd
The above command will install the latest version of the Lighttpd server. You can check the installed version using the command:
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 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 update
Next, install the Lighttpd server under /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 /etc/init.d/lighttpd start
CentOS/REHL
On REHL family, use the command:
FreeBSD
If you are on FreeBSD, enter the command:
Stopping Lighttpd server
Debian/Ubuntu
On Debian based distributions, use the commands:
$ sudo /etc/init.d/lighttpd stop
CentOS/REHL
REHL family, use systemctl as:
FreeBSD
On BSD, enter the command:
Restarting Lighttpd Server
Debian/Ubuntu
sudo /etc/init.d/lighttpd restart
CentOS/REHL
On REHL family:
FreeBSD
Conclusion
This guide discussed how you could install the Lighttpd server on various systems and manage the services.