源码编译安装
适用的软件版本 |
是否适配CentOS 7.6 |
是否适配CentOS 8.1 |
是否适配openEuler 20.03 (LTS-SP1) |
---|---|---|---|
Tengine 2.2.2 |
是 |
否 |
是 |
Tengine 2.2.3 |
否 |
是 |
否 |

下文命令中的x.x.x代表Tengine的版本号。
- 获取Tengine源码。
- 在本地浏览器下载源码。
- 将源码包上传到服务器“/home”目录下。若服务器可以访问网络,则通过wget命令直接下载源码。
1 2
cd /home wget https://tengine.taobao.org/download/tengine-x.x.x.tar.gz --no-check-certificate
- 解压Tengine安装包。
1
tar -xzvf tengine-x.x.x.tar.gz
- 进入源码目录。
1
cd tengine-x.x.x
- 配置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
- Tengine 2.2.2:
- 编译安装Tengine。
1
make -j60 && make install
- 如果提示“src/core/ngx_murmurhash.c:37:11: error: this statement may fall through [-Werror=implicit-fallthrough=]”,请参见执行编译安装Tengine命令时提示ngx_murmurhash.c的解决方法解决。
- 如果提示“src/os/unix/ngx_user.c:36:7: error: ‘struct crypt_data’ has no member named ‘current_salt’”,请参见执行编译安装Tengine命令时提示ngx_user.c的解决方法解决。
- 查看安装目录。
1
ll /usr/local/tengine-nginx
- 查看版本。
1
/usr/local/tengine-nginx/sbin/nginx -v
父主题: 安装