How To Install darkhttpd on Fedora 34
Introduction
In this tutorial we learn how to install darkhttpd
on Fedora 34.
What is darkhttpd
darkhttpd is a secure, lightweight, fast and single-threaded HTTP/1.1 server. Features * Simple to set up * Single binary, no other files. * Standalone, doesn’t need inetd or ucspi-tcp. * No messing around with config files. * Written in C - efficient and portable. * Small memory footprint. * Event loop, single threaded - no fork() or pthreads. * Generates directory listings. * Supports HTTP GET and HEAD requests. * Supports Range / partial content. * Supports If-Modified-Since. * Supports Keep-Alive connections. * Can serve 301 redirects based on Host header. * Uses sendfile(). Security * Can log accesses, including Referer and User-Agent. * Can chroot. * Can drop privileges. * Impervious to /../ sniffing. * Times out idle connections. * Drops overly long requests. Limitations * This server only serves static content - NO CGI supported!
We can use yum
or dnf
to install darkhttpd
on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install darkhttpd.
Install darkhttpd on Fedora 34 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
After updating yum database, We can install darkhttpd
using dnf
by running the following command:
sudo dnf -y install darkhttpd
Install darkhttpd on Fedora 34 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
After updating yum database, We can install darkhttpd
using yum
by running the following command:
sudo yum -y install darkhttpd
How To Uninstall darkhttpd on Fedora 34
To uninstall only the darkhttpd
package we can use the following command:
sudo dnf remove darkhttpd
darkhttpd Package Contents on Fedora 34
/etc/sysconfig/darkhttpd
/usr/lib/.build-id
/usr/lib/.build-id/93
/usr/lib/.build-id/93/010250e45e8e5d4d38a7b95514611a23026bf8
/usr/lib/systemd/system/darkhttpd.service
/usr/sbin/darkhttpd
/usr/share/doc/darkhttpd
/usr/share/doc/darkhttpd/README.md
References
Summary
In this tutorial we learn how to install darkhttpd
on Fedora 34 using yum and dnf.