Lighttpd is a slim different to the Apache web server for Unix, Linux and Home windows server working techniques. Its major goal is to ship web content material in a quick, safe method.
The Lighttpd web server is helpful, particularly for those who want to ship content material on the web on Linux however don’t essentially have a formidable quantity of CPU and RAM.
Organising the Lighthttpd web server isn’t very like establishing Apache or Nginx on Linux. There are not any packages accessible on the improvement web site. As a substitute, if you need to use it, you will need to obtain a package deal, and install it manually. Right here’s how to do it.
Obtain Lighttpd RPM package deal
Some time in the past, there was a Lighttpd RPM package deal for CentOS/RedHat Enterprise Linux. Nonetheless, plainly the builders of the web server don’t distribute these anymore. So, should you’d like to use Lighttpd, the supply code is required.
Get wget
To obtain the supply code, you will have the wget downloading device. As most server working techniques don’t all the time embody this program, set up is required.
Ubuntu
sudo apt install wget
Debian
sudo apt-get install wget
Arch Linux
sudo pacman -S wget
CentOS
sudo yum install wget
Fedora
sudo dnf install wget
OpenSUSE
sudo zypper install wget
When you’ve acquired the wget downloading device up a d working on your Linux server (or Desktop you’re utilizing as a server,) use the CD command and transfer the terminal session to the /tmp listing.
Doing the downloading in the /tmp (aka momentary) listing will make sure that as soon as the software program is up and working, it doesn’t litter your file system.
cd /tmp
Supply code
Now that the terminal is in the momentary listing invoke wget and seize the supply code launch of lighttpd.
wget
Alternatively, in case you have points with the TarGZ launch, the builders have a TarXZ launch accessible.
wget
The lighttpd web server package deal ought to take a few seconds to obtain, relying on your web connection. When the course of is full, transfer on to the subsequent part of this tutorial.
Extract supply code
With the code now finished downloading on Linux server system inside the momentary listing (/tmp), it’s now time to extract the code from its archive. Extracting the Lighttpd code information on Linux is completed with the tar command.
In a terminal, write tar with the “zxvf” switches. This may enable you to extract and think about the contents of the TarGZ archive.
tar zxvf lighttpd-1.4.52.tar.gz
Alternatively, should you downloaded the TarXZ archive as a substitute of the TarGZ, you will have to use the tar command with a unique set of switches. Particularly, the “xvJf” ones.
tar xvJf lighttpd-1.4.52.tar.xz
With the code extracted, run the CD command and transfer the terminal into the new folder.
cd lighttpd-*
From there, use ls and think about the contents of the listing.
ls
Compile Lighttpd on Linux
Constructing the Lighttpd web server has a number of steps. It’s not overly difficult, and it begins by putting in the required dependencies.
Ubuntu
sudo apt install libpcre3-dev libbz2-dev zlib1g-dev
Debian
sudo apt-get install libpcre3-dev libbz2-dev zlib1g-dev
Arch Linux
sudo pacman -S pcre-8 zlib bzip2
Fedora
sudo dnf install pcre-devel zlib-devel libbz2-devel
OpenSUSE
sudo zypper install pcre-devel zlibary-devel libbz2-devel
With the dependencies put in, it’s time to scan your system and create the make information on the system. Make information are created with the “Configure” script.
./configure
Let the script run. It could take a number of occasions of working and re-running the script, particularly if it determines your system is lacking dependency information.
In our information, we do our greatest to make it easier to install the dependencies that the script wants to generate the Make information accurately. Nonetheless, it might not all the time work. In case you have points, verify the documentation.
As soon as Configure is completed, it’s time to construct the set up utilizing the Make command.
make sudo make install
When the whole lot is completed putting in, will want to configure the server. To do that, head over to the official website.
Distribution-specific packages
For the most half, Lighttpd doesn’t exit of its approach to preserve distro-specific packages for his or her web server. For that reason, we’ve lined how one can compile and construct the supply code. Moreover, downloading the supply code is an efficient approach to guarantee that you may get the newest launch of the software program, no matter what your Linux OS is. With that stated, some distributions could have a Lighttpd web server package deal of their major software program sources.
To seek out out extra, head over to pkgs.org. On the web page, you’ll see details about listed for a number of Lighttpd packages. Although, understand that should you install the distribution-specific releases, it will not be up to date as usually as getting it straight from the builders.