2 min read

Installing Tengine on Alibaba Cloud ECS: A Comprehensive Guide

Tengine is a web server project primarily based on the Nginx HTTP server, with enhanced features designed for high concurrency, high performance, and low memory usage. It was created by Taobao, which is part of the Alibaba Group.
Installing Tengine on Alibaba Cloud ECS: A Comprehensive Guide
Photo by fabio / Unsplash

Introduction to Tengine and Alibaba Cloud ECS

Tengine is a robust web server developed by Taobao. It's based on Nginx but enhanced for better performance, high concurrency, and low memory usage. Its adoption by major websites, including those within the Alibaba Group, speaks to its efficiency and reliability.

Alibaba Cloud ECS (Elastic Compute Service) offers scalable, high-performance cloud servers. It's a perfect match for Tengine, providing a stable and flexible environment for hosting web services, especially for businesses looking to expand their online presence in the Asian market.


Before starting, ensure you have:

  • An Alibaba Cloud account.
  • An ECS instance set up (Ubuntu).
  • Basic knowledge of SSH and command-line operations.

Step-by-Step Installation Guide

Step 1: Log into Your Alibaba Cloud ECS Instance

Access your ECS instance using SSH. You can use a command like ssh [your_username]@[your_ecs_ip_address].

Step 2: Update the System Packages

sudo apt update This step ensures you have the latest packages.

Step 3: Install Dependencies for Tengine

Tengine requires certain dependencies. Install them using:

  • sudo apt install build-essential zlib1g-dev libpcre3 libpcre3-dev libssl-dev wget

Step 4: Download and Extract Tengine

Download Tengine from its official website or GitHub repository. Then extract it using tar -zxvf tengine.tar.gz.

Step 5: Configure and Compile Tengine

Navigate to the Tengine directory and run:

  • ./configure to configure Tengine.
  • make to compile the source code.

Step 6: Install Tengine

Install Tengine on your system using make install.

Step 7: Configure Tengine

Edit the configuration file located at /usr/local/nginx/conf/nginx.conf to suit your needs.

Step 8: Start Tengine Server

Start Tengine with /usr/local/nginx/sbin/nginx. To ensure it runs on boot, add it to your system's startup scripts.

Testing the Installation

Verify Tengine's operation by accessing your server's IP in a web browser. A successful load of the Tengine welcome page indicates a correct setup.



Following these steps, you should now have a running instance of Tengine on your Alibaba Cloud ECS. As next steps, consider securing your Tengine server or integrating it with other Alibaba Cloud services for an optimized web hosting environment.

Additional Resources and Troubleshooting

For more detailed information and troubleshooting, visit the Tengine documentation and the Alibaba Cloud ECS resources.