Package index update:

sudo apt-get update

Installing necessary packages:

sudo apt-get install build-essential manpages-dev

Creating directories:

mkdir -p /sms/{outgoing,checked,incoming}
mkdir /usr/local/bin/
mkdir -p /root/src/

Download smstools3 from the official website http://smstools3.kekekasvi.com/, as of the writing of this article, the current version is smstools3-3.1.21:

cd /root/src/
wget http://smstools3.kekekasvi.com/packages/smstools3-3.1.21.tar.gz
tar -zxvf smstools3-3.1.21.tar.gz
cd smstools3

Installing more than 64 devices (modems) in smstools

If you do not plan to have more than 64 devices in your system, skip this step.

Open the file for editing src/Makefile

nano src/Makefile

Find CFLAGS = -D NUMBER_OF_MODEMS=64 and change it to the desired number

Exit and save the file

Building smstools:

make
make install

Restart the daemon systemctl

systemctl daemon-reload

And start smstools

service sms3 start

Enjoy!)))

I will talk about the structure and logic of operation, as well as the configuration of smstools, in the following articles