How To Install mod_qos on CentOS 8

mod_qos is Quality of service module for Apache

Introduction

In this tutorial we learn how to install mod_qos on CentOS 8.

What is mod_qos

The mod_qos module may be used to determine which requests should be served and which shouldn’t in order to avoid resource over-subscription. The module collects different attributes such as the request URL, HTTP request and response headers, the IP source address, the HTTP response code, history data (based on user session and source IP address), the number of concurrent requests to the server (total or requests having similar attributes), the number of concurrent TCP connections (total or from a single source IP), and so forth. Counteractive measures to enforce the defined rules are dynamic timeout adjustment, request delay, response throttling, and dropping of TCP connections.

We can use yum or dnf to install mod_qos on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install mod_qos.

Install mod_qos on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install mod_qos using dnf by running the following command:

sudo dnf -y install mod_qos

Install mod_qos on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install mod_qos using yum by running the following command:

sudo yum -y install mod_qos

How To Uninstall mod_qos on CentOS 8

To uninstall only the mod_qos package we can use the following command:

sudo dnf remove mod_qos

mod_qos Package Contents on CentOS 8

/etc/httpd/conf.modules.d/10-mod_qos.conf
/usr/bin/qscheck
/usr/bin/qsdt
/usr/bin/qsexec
/usr/bin/qsfilter2
/usr/bin/qsgeo
/usr/bin/qsgrep
/usr/bin/qshead
/usr/bin/qslog
/usr/bin/qslogger
/usr/bin/qspng
/usr/bin/qsre
/usr/bin/qsrespeed
/usr/bin/qsrotate
/usr/bin/qssign
/usr/bin/qstail
/usr/lib/.build-id
/usr/lib/.build-id/02
/usr/lib/.build-id/02/eb5aaf8858094a67dd2c444975a9f5b712669d
/usr/lib/.build-id/09
/usr/lib/.build-id/09/139fa353c2acb016431c97cabbcce8b34e6afd
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/4a0407f715d06e27acc169165f43c420a2d530
/usr/lib/.build-id/28
/usr/lib/.build-id/28/d51603dcc1a7dc660bfa5b6f9345bf2800dd8b
/usr/lib/.build-id/51
/usr/lib/.build-id/51/e9bc9da71235caad68774edb4dd2f649cd96b1
/usr/lib/.build-id/5b
/usr/lib/.build-id/5b/15df71efc46d5daf2d230f19e42011a9ab566c
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/51269525ea69f6329318ffff9d9250ba6dbb4e
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/da09b27916601d3c00b87cf9adfa6038ff79d5
/usr/lib/.build-id/86
/usr/lib/.build-id/86/790a1be64cc87b9072f6e0411349cb03895329
/usr/lib/.build-id/99
/usr/lib/.build-id/99/fe46d2f7ce9c88714c8259b13e6c3c836fd11d
/usr/lib/.build-id/9b
/usr/lib/.build-id/9b/f35549f17ec2bd927908dfcef4d02f9b675f6d
/usr/lib/.build-id/a3
/usr/lib/.build-id/a3/4dd7ff98d6f4ebd20e4bd0ae80244f06067d71
/usr/lib/.build-id/a3/5ba7b919ae04e89f51acadce8106c300ab88ef
/usr/lib/.build-id/b5
/usr/lib/.build-id/b5/9de4921da6136340b0024c03642fcd1d8d78f0
/usr/lib/.build-id/e0
/usr/lib/.build-id/e0/cd08231fe5f15e782826e4c8a1fd743cd8b7ee
/usr/lib/.build-id/f8
/usr/lib/.build-id/f8/161559cf5b6bac01dcf75cea6ed74e242acc7b
/usr/lib64/httpd/modules/mod_qos.so
/usr/share/doc/mod_qos
/usr/share/doc/mod_qos/README.TXT
/usr/share/doc/mod_qos/doc
/usr/share/doc/mod_qos/doc/CHANGES.txt
/usr/share/doc/mod_qos/doc/LICENSE.txt
/usr/share/doc/mod_qos/doc/MESSAGES.txt
/usr/share/doc/mod_qos/doc/favicon.ico
/usr/share/doc/mod_qos/doc/glossary.html
/usr/share/doc/mod_qos/doc/headerfilterrules.txt
/usr/share/doc/mod_qos/doc/images
/usr/share/doc/mod_qos/doc/images/ClientPrefer.png
/usr/share/doc/mod_qos/doc/images/ClosedLoop.png
/usr/share/doc/mod_qos/doc/images/Events.png
/usr/share/doc/mod_qos/doc/images/LimitCount.png
/usr/share/doc/mod_qos/doc/images/LimitCountExample.png
/usr/share/doc/mod_qos/doc/images/QS_ClientEventBlockCount.png
/usr/share/doc/mod_qos/doc/images/Rule.png
/usr/share/doc/mod_qos/doc/images/Serialization.png
/usr/share/doc/mod_qos/doc/images/SrvMinDataRate.png
/usr/share/doc/mod_qos/doc/images/UserTracking.png
/usr/share/doc/mod_qos/doc/images/directive_seq.gif
/usr/share/doc/mod_qos/doc/images/download.jpg
/usr/share/doc/mod_qos/doc/images/link.png
/usr/share/doc/mod_qos/doc/images/mod_qos.gif
/usr/share/doc/mod_qos/doc/images/qsloc.png
/usr/share/doc/mod_qos/doc/images/qsloc1.png
/usr/share/doc/mod_qos/doc/images/qsloc2.png
/usr/share/doc/mod_qos/doc/images/qsloc3.png
/usr/share/doc/mod_qos/doc/images/qslogFormat.png
/usr/share/doc/mod_qos/doc/images/qslog_spreadsheet_example.png
/usr/share/doc/mod_qos/doc/index.html
/usr/share/doc/mod_qos/doc/qsdt.1.html
/usr/share/doc/mod_qos/doc/qsexec.1.html
/usr/share/doc/mod_qos/doc/qsfilter2.1.html
/usr/share/doc/mod_qos/doc/qsfilter2_process.gif
/usr/share/doc/mod_qos/doc/qsgeo.1.html
/usr/share/doc/mod_qos/doc/qsgrep.1.html
/usr/share/doc/mod_qos/doc/qshead.1.html
/usr/share/doc/mod_qos/doc/qslog.1.html
/usr/share/doc/mod_qos/doc/qslogger.1.html
/usr/share/doc/mod_qos/doc/qspng.1.html
/usr/share/doc/mod_qos/doc/qsre.1.html
/usr/share/doc/mod_qos/doc/qsrespeed.1.html
/usr/share/doc/mod_qos/doc/qsrotate.1.html
/usr/share/doc/mod_qos/doc/qssign.1.html
/usr/share/doc/mod_qos/doc/qstail.1.html
/usr/share/man/man1/mod_qos.1.gz
/usr/share/man/man1/qsdt.1.gz
/usr/share/man/man1/qsexec.1.gz
/usr/share/man/man1/qsfilter2.1.gz
/usr/share/man/man1/qsgeo.1.gz
/usr/share/man/man1/qsgrep.1.gz
/usr/share/man/man1/qshead.1.gz
/usr/share/man/man1/qslog.1.gz
/usr/share/man/man1/qslogger.1.gz
/usr/share/man/man1/qspng.1.gz
/usr/share/man/man1/qsre.1.gz
/usr/share/man/man1/qsrespeed.1.gz
/usr/share/man/man1/qsrotate.1.gz
/usr/share/man/man1/qssign.1.gz
/usr/share/man/man1/qstail.1.gz

References

Summary

In this tutorial we learn how to install mod_qos on CentOS 8 using yum and dnf.