鲲鹏社区首页
中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

源码编译安装

适用的软件版本

是否适配CentOS 7.6

是否适配CentOS 8.1

是否适配openEuler 20.03 (LTS-SP1)

Tengine 2.2.2

Tengine 2.2.3

下文命令中的x.x.x代表Tengine的版本号。

  1. 获取Tengine源码。
    1. 在本地浏览器下载源码。

      下载地址:

    2. 将源码包上传到服务器“/home”目录下。
      若服务器可以访问网络,则通过wget命令直接下载源码。
      1
      2
      cd /home
      wget https://tengine.taobao.org/download/tengine-x.x.x.tar.gz  --no-check-certificate
      
  2. 解压Tengine安装包。
    1
    tar -xzvf tengine-x.x.x.tar.gz
    
  3. 进入源码目录。
    1
    cd tengine-x.x.x
    
  4. 配置Tengine。
    • Tengine 2.2.2:
      1
      ./configure --prefix=/usr/local/tengine-nginx --with-http_ssl_module --with-openssl-async --with-cc-opt="-DNGX_SECURE_MEM -I/usr/local/include -Wno-error=deprecated-declarations" --with-ld-opt="-Wl,-rpath=/usr/local/lib -L/usr/local/lib"
      
    • Tengine 2.2.3:(使用系统默认OpenSSL因此不需要指定OpenSSL路径。)
      1
      ./configure --prefix=/usr/local/tengine-nginx --with-http_ssl_module --with-openssl-async
      
  5. 编译安装Tengine。
    1
    make -j60 && make install
    
  6. 查看安装目录。
    1
    ll /usr/local/tengine-nginx
    
  7. 查看版本。
    1
    /usr/local/tengine-nginx/sbin/nginx -v