-
Notifications
You must be signed in to change notification settings - Fork 110
Install from Sources
Instructions below are describes compilation from sources on Ubuntu 22.04, which is the preferred build and execution environment for the moment. But with a bit of changes the instructions can be applied to other GNU/Linux distributions.
- 35-40 GB of free disk space.
- At least 2GB RAM.
- GNU Make 3.82 or higher with Flex and Bison.
- GCC and G++ compilers of versions 4.8 or higher (
g++package on Ubuntu) - Boost library of version 1.53 or higher (
libboost-all-devpackage on Debian-based systems). - OpenSSL development library
- bc
- fakeroot.
apt-get install make flex bison gcc g++ libboost-all-dev libssl-dev bc fakeroot dwarves libelf-devThe easiest way to install all the build dependencies for the Linux kernel is to use information from sources repository.
Make sure that the line
deb-src http://ru.archive.ubuntu.com/ubuntu focal main restrictedis present in /etc/apt/sources.list or add it if it missing.
Then all the build dependencies can be simply installed with single command:
apt-get update
apt-get build-dep linuxFor the build of 0.7 (current), get Linux kernel 5.10.35 with Tempesta-Tech patches:
git clone https://github.com/tempesta-tech/linux-5.10.35-tfwOr apply the patch set to 5.10.35 kernel sources.
Before build Linux Kernel must be configured. Recommended way is to reuse current kernel's configuration with TempestaFw-specific changes.
Ensure that the kernel tree is absolutely clean:
cd <path-to-tempesta-patched-kernel>
make clean && make mrproperCopy current kernel's configuration:
cp /boot/config-$(uname -r) .configComment the following lines in copied .config file in a text editor if set to "y" before proceed:
- CONFIG_SYSTEM_TRUSTED_KEYRING
- CONFIG_SYSTEM_TRUSTED_KEYS
Comment also the lines if you wish CONFIG_LSM option set with make olddefconfig automatically:
- all CONFIG_DEFAULT_SECURITY_* lines
- CONFIG_LSM line
Use default options:
make olddefconfigOr update the configuration to suit the sources interactively, this will ask about the differences:
make oldconfigOr
Use a text editor to manually set all that options to "y" in .config file:
- CONFIG_SLUB
- CONFIG_HUGETLB_PAGE
- CONFIG_SECURITY
- CONFIG_SECURITY_NETWORK
- CONFIG_SECURITY_TEMPESTA
- CONFIG_DEFAULT_SECURITY_TEMPESTA
- "tempesta" listed first in CONFIG_LSM, e.g.
CONFIG_LSM="tempesta,lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf"
For Linux kernel 5.10.35 and version 0.7 (current) the next config options should be set as well:
- CONFIG_SOCK_CGROUP_DATA (Needs CONFIG_NET, CONFIG_CGROUPS and CONFIG_CGROUP_NET_PRIO to be selected)
For integration of HTTP tables with iptables and nftables the next config options should be set as well (Tempesta works without these options):
- CONFIG_NF_TABLES_IPV4, CONFIG_NF_TABLES_IPV6 and CONFIG_NF_TABLES.
The recommended way is to compile the kernel and prepare packages to be installed via package manager:
make deb-pkg -j$(nproc)
dpkg -i ../linux-headers-* ../linux-image-*Traditional way is to compile the kernel and manually install modules and kernel image:
make -j$(nproc)
make modules_install
make installInstall build dependencies by calling the next command:
apt-get install build-essential libboost-dev libboost-program-options-devGet TempestaFW from Github repository:
git clone https://github.com/tempesta-tech/tempesta
cd tempestaTempestaFW is out-of-tree kernel module. It is recommended to reboot into
Tempesta's patched kernel and install kernel headers before building the module.
Simply run make to prepare the module:
makeIt is also possible to build the module against target kernel sources directory:
make KERNEL=<path-to-kernel>- Home
- Requirements
- Installation
-
Configuration
- Migration from Nginx
- On-the-fly reconfiguration
- Handling clients
- Backend servers
- Load Balancing
- Caching Responses
- Non-Idempotent Requests
- Modify HTTP Messages
- Virtual hosts and locations
- HTTP Session Management
- HTTP Tables
- HTTP(S) Security
- Header Via
- Health monitor
- TLS
- Virtual host confusion
- Traffic Filtering by Fingerprints
- Access Log Analytics
- Run & Stop
- Application Performance Monitoring
- Use cases
- Performance
- Bot Protection
- Contributing