Install Tengine on Debian or Ubuntu: beginner's guide

2026-09-30

If you are starting fresh with Tengine, the setup is surprisingly small: install dependencies, compile (or grab a package), configure, start. This guide walks the whole thing and points out the three checks that trip up every first-timer — I made all three myself.

Step 1 — Install dependencies

sudo apt update
sudo apt install build-essential libpcre3-dev zlib1g-dev libssl-dev git

Step 2 — Build from source (recommended for latest)

git clone https://github.com/alibaba/tengine.git
cd tengine
./configure --with-http_ssl_module --with-http_v2_module
make -j$(nproc)
sudo make install

This installs to /usr/local/tengine, with the binary at /usr/local/tengine/sbin/nginx.

Step 3 — Start it

/usr/local/tengine/sbin/nginx

Check it is running: curl -I http://127.0.0.1/ should return headers with Server: Tengine.

The three beginner checks

Step 4 — Set up a systemd unit (optional but nice)

# /etc/systemd/system/tengine.service
[Unit]
Description=Tengine web server
After=network.target

[Service]
Type=forking
ExecStart=/usr/local/tengine/sbin/nginx
ExecReload=/usr/local/tengine/sbin/nginx -s reload
ExecStop=/usr/local/tengine/sbin/nginx -s quit
PIDFile=/usr/local/tengine/logs/nginx.pid

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now tengine

Summary

Dependencies, configure, make, start — Tengine is live. Avoid the Nginx conflict, edit the compiled config path, and reload instead of restarting. If your box is small, my 512MB VPS tuning guide is the natural next read.

Related articles