How To Install Siege Benchmarking Tool on Ubuntu 20.04 LTS

Install Siege Benchmarking Tool on Ubuntu 20.04

In this tutorial, we will show you how to install Siege Benchmarking Tool on Ubuntu 20.04 LTS. For those of you who didn’t know, Siege is one of the popular HTTP load testings and benchmarking utility tools to measure the performance of web servers under stress. You can perform a stress test using a single URL with a specific number of users or you can put all URLs in files and stress them simultaneously. Siege reports the total number of hits recorded, bytes transferred, response time, concurrency, and return status. Siege supports HTTP/1.0 and 1.1 protocols, the GET and POST directives, cookies, transaction logging, and basic authentication.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Siege open-source regression test and benchmark utility on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Install Siege Benchmarking Tool on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade
sudo apt install build-essential

Step 2. Installing Siege Benchmarking Tool on Ubuntu 20.04.

By default, Siege is available in the Ubuntu 20.04 base repository. Now we install Siege using the following command below:

sudo apt install siege

After Siege is installed, you can verify it as follows:

siege --version

Output:

SIEGE 4.0.4
Copyright (C) 2017 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

Step 3. Configure Siege.

Now, it’s time to configure Siege on Ubuntu 20.04. You can find the siege configuration file under /etc/siege/ the directory:

nano /etc/siege/siegerc

Uncomment the following line:

logfile = $(HOME)/var/log/siege.log

After performing the above action, save and exit the file.

Step 4. Using Siege Benchmarking Tool.

  • Test Single Websites with Siege.

You can use Single command by specifying any website to test the load as shown below:

siege idroot.us
  • Test Multiple Websites with Siege.

You can also test multiple websites by adding your website URLs in the file /etc/siege/urls.txt:

nano /etc/siege/urls.txt

Add the following file:

http://idroot.us
www.cookies.my.id
192.168.77.21

To save the file (CTRL+O) then (CTRL+X) to exit. To execute the multiple website stress test execute the following:

siege -f /etc/siege/urls.txt

Siege has various command-line options which you can view using the command below:

siege --help

Congratulations! You have successfully installed Siege. Thanks for using this tutorial for installing Siege Benchmarking Tool on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official Siege website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!