Basic Prerequisites (Ubuntu 22.04 or Debian 12):
- git
- cmake
# install base requirements
apt-get install git cmake python3-pipThe following Boost Libraries libboost1.74-dev (Ubuntu 22.04) are used.
- Boost Unittest
- Boost Python
To install complete boost development files under Ubuntu 22.04 do:
# install all boost components
apt-get install libboost-all-devIf not done by Boost Python Library, the Python Interpreter Source Code is required for embedding.
# install python dev headers / source
apt-get install python3-devOn installation "testapp1.local" and "testapp2.local" with address 127.0.0.1 will
be added to /etc/hosts. A startup script for your Linux init system (systemd, OpenRC,
or SysVinit) will also be automatically installed to /etc/systemd/system/ or /etc/init.d/.
# compile / install
cmake .
make
make install# debug build
cmake -DDEBUG_BUILD=1 .
make
make install# java backend build
export JAVA_HOME=/usr/lib/jvm/jdk-24.0.2-oracle-x64/
cmake -DJAVA_BACKEND=1 .
make
make installAfter installation, the appropriate startup script is automatically installed for your init system. The startup script already includes ulimit settings for open files and kernel hugepages configuration.
Using systemd (Ubuntu 22.04+, Debian 12+):
# enable and start service
sudo systemctl daemon-reload
sudo systemctl enable falcon-as
sudo systemctl start falcon-as
# check status
sudo systemctl status falcon-asUsing OpenRC (Devuan, Gentoo, Alpine):
# enable and start service
sudo rc-update add falcon-as default
sudo rc-service falcon-as start
# check status
sudo rc-service falcon-as statusUsing SysVinit (Debian ≤11, older systems):
# enable and start service
sudo update-rc.d falcon-as defaults
sudo service falcon-as start
# check status
sudo service falcon-as statusManual start (without service):
# start server manually
. ./scripts/ulimit.sh
. ./scripts/set-transparent-hugepages.sh
/usr/local/bin/falcon-asStop server with signal SIGTERM (pkill falcon-as).
Open http://testapp1.local/index.html or http://testapp2.local/index.html in a local browser to check if setup is working correctly.
# test post request
wget --post-data='{"payload": 123}' --header='Content-Type: application/json' http://testapp1.local/backend/# test translated get to post request
wget "http://testapp2.local/backend/endpoint2?param1=test1¶m2=test2"