How to Install Thumbor on Fedora Server Latest

Thumbor is an open-source photo thumbnail service, that is designed to serve your dynamic image needs. It is written in Python and has a built-in HTTP server with support for load balancing, caching, and transformation of image on fly. In this tutorial, we will learn how to install Thumbor on a Fedora Server Latest system.

Prerequisites

Before proceeding further, ensure that you have the following prerequisites set up on your Fedora server:

Step 1: Install Dependencies

First, we need to install all the required dependencies in our system. Open your terminal and use the following command to install the required packages:

sudo dnf install -y gcc-c++ python3-devel python3-setuptools python3-pillow python3-openssl python3-magic

Step 2: Installing Thumbor

Once all dependencies are installed in your system, next we need to install Thumbor. You can install Thumbor either by using pip or by cloning its source code from the GitHub repository.

Option 1: Installing Thumbor using pip

Thumbor can be installed easily using pip. Use the following command to install Thumbor:

sudo pip3 install thumbor

Option 2: Installing Thumbor from GitHub

Alternatively, you can also download the Thumbor source code from GitHub and install it locally. Use the following commands to clone the source code and install it:

git clone https://github.com/thumbor/thumbor.git
cd thumbor
sudo python3 setup.py install

Step 3: Configuring and Running Thumbor

Finally, we need to configure and start Thumbor.

Create a Self-Signed SSL Certificate

Thumbor requires SSL/TLS encryption to secure the images served. If you don't already have an SSL certificate, you can create a self-signed certificate using the following command:

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/thumbor.key -out /etc/ssl/certs/thumbor.crt

Configure Thumbor

The configuration file for Thumbor is located at /etc/thumbor.conf. You can modify this file as per your requirements.

sudo vi /etc/thumbor.conf

Start Thumbor

After configuring Thumbor, we can start the service using the following command:

sudo thumbor -c /etc/thumbor.conf -l debug

The -l option is used to specify the logging level, and it can be set to debug, info, warning, or error.

Step 4: Enable Firewall

Finally, we need to enable the firewall on our system to block all incoming traffic except for HTTP/HTTPS ports.

sudo firewall-cmd --zone=public --add-service=http --permanent
sudo firewall-cmd --zone=public --add-service=https --permanent
sudo firewall-cmd --reload

Conclusion

In this guide, we have learned how to install and configure Thumbor on a Fedora Server Latest system. With Thumbor, you can easily provide fast and secure image processing and delivery to your application.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!