tengine二进制

简介: 详细

1.基础依赖包安装

install -y wget gcc pcre-devel perl libpcre3-dev zlib1g.dev

2.最新版本源代码的下载

mkdir -p /Users/bot/data/src

cd /Users/bot/data/src

wget https://ftp.openssl.org/source/openssl-1.1.1k.tar.gz

tar -xzf openssl-*.tar.gz

wget https://tengine.taobao.org/download/tengine-2.3.3.tar.gz

tar -xzf tengine-*.tar.gz

cd /Users/bot/data/src/tengine-2.3.3

3.编译

./configure --prefix=/data/nginx --with-http_ssl_module --with-openssl=/data/src/openssl-1.1.1k --user=nginx --group=nginx --add-module=modules/ngx_http_upstream_session_sticky_module


安装

make && make install


# 添加相应用户

useradd nginx -M -s /sbin/nologin

chown -R nginx:nginx /data/nginx


# 配置端口绑定能力,否则绑定低于1024的端口号时会报权限错误

setcap cap_net_bind_service=+eip /data/nginx/sbin/nginx


#编译配置信息,相关目录后面配置可能会用到

Configuration summary

 + using system PCRE library

 + using OpenSSL library: /data/src/openssl-1.1.1k

 + using system zlib library

 + jemalloc library is disabled


 nginx path prefix: "/data/nginx"

 nginx binary file: "/data/nginx/sbin/nginx"

 nginx modules path: "/data/nginx/modules"

 nginx configuration prefix: "/data/nginx/conf"

 nginx configuration file: "/data/nginx/conf/nginx.conf"

 nginx pid file: "/data/nginx/logs/nginx.pid"

 nginx error log file: "/data/nginx/logs/error.log"

 nginx http access log file: "/data/nginx/logs/access.log"

 nginx http client request body temporary files: "client_body_temp"

 nginx http proxy temporary files: "proxy_temp"

 nginx http fastcgi temporary files: "fastcgi_temp"

 nginx http uwsgi temporary files: "uwsgi_temp"

 nginx http scgi temporary files: "scgi_temp"


5.编写服务启动文件

vi /usr/lib/systemd/system/nginx.service

[Unit]

Description=The nginx HTTP and reverse proxy server

After=network.target


[Service]

Type=forking

User=nginx

Group=nginx

PIDFile=/data/nginx/logs/nginx.pid

ExecStartPre=/usr/bin/rm -f /data/nginx/logs/nginx.pid

ExecStartPre=/data/nginx/sbin/nginx -t

ExecStart=/data/nginx/sbin/nginx -c /data/nginx/conf/nginx.conf

ExecReload=/bin/kill -s HUP $MAINPID

KillSignal=SIGQUIT

TimeoutStopSec=5

KillMode=process

PrivateTmp=true


[Install]

WantedBy=multi-user.target


# 重启systemd守护进程

systemctl daemon-reload


# 启动tengine服务

systemctl start nginx

systemctl status nginx


systemctl enable nginx



6.编译参数说明

./configure --help


 --help                             print this message


 --prefix=PATH                      set installation prefix

 --sbin-path=PATH                   set nginx binary pathname

 --modules-path=PATH                set modules path

 --conf-path=PATH                   set nginx.conf pathname

 --error-log-path=PATH              set error log pathname

 --pid-path=PATH                    set nginx.pid pathname

 --lock-path=PATH                   set nginx.lock pathname


 --user=USER                        set non-privileged user for

                                    worker processes

 --group=GROUP                      set non-privileged group for

                                    worker processes


 --build=NAME                       set build name

 --builddir=DIR                     set build directory


 --with-select_module               enable select module

 --without-select_module            disable select module

 --with-poll_module                 enable poll module

 --without-poll_module              disable poll module


 --without-procs                    disable procs module


 --with-threads                     enable thread pool support


 --with-file-aio                    enable file AIO support


 --with-http_ssl_module             enable ngx_http_ssl_module

 --with-http_v2_module              enable ngx_http_v2_module

 --with-http_realip_module          enable ngx_http_realip_module

 --with-http_addition_module        enable ngx_http_addition_module

 --with-http_xslt_module            enable ngx_http_xslt_module

 --with-http_xslt_module=dynamic    enable dynamic ngx_http_xslt_module

 --with-http_image_filter_module    enable ngx_http_image_filter_module

 --with-http_image_filter_module=dynamic

                                    enable dynamic ngx_http_image_filter_module

 --with-http_geoip_module           enable ngx_http_geoip_module

 --with-http_geoip_module=dynamic   enable dynamic ngx_http_geoip_module

 --with-http_sub_module             enable ngx_http_sub_module

 --with-http_dav_module             enable ngx_http_dav_module

 --with-http_flv_module             enable ngx_http_flv_module

 --with-http_mp4_module             enable ngx_http_mp4_module

 --with-http_gunzip_module          enable ngx_http_gunzip_module

 --with-http_gzip_static_module     enable ngx_http_gzip_static_module

 --with-http_auth_request_module    enable ngx_http_auth_request_module

 --with-http_random_index_module    enable ngx_http_random_index_module

 --with-http_secure_link_module     enable ngx_http_secure_link_module

 --with-http_degradation_module     enable ngx_http_degradation_module

 --with-http_slice_module           enable ngx_http_slice_module

 --with-http_stub_status_module     enable ngx_http_stub_status_module


 --without-http_charset_module      disable ngx_http_charset_module

 --without-http_gzip_module         disable ngx_http_gzip_module

 --without-http_ssi_module          disable ngx_http_ssi_module

 --without-http_ssl_module          disable ngx_http_ssl_module

 --without-http_userid_module       disable ngx_http_userid_module

 --without-http_access_module       disable ngx_http_access_module

 --without-http_auth_basic_module   disable ngx_http_auth_basic_module

 --without-http_mirror_module       disable ngx_http_mirror_module

 --without-http_autoindex_module    disable ngx_http_autoindex_module

 --without-http_geo_module          disable ngx_http_geo_module

 --without-http_map_module          disable ngx_http_map_module

 --without-http_split_clients_module disable ngx_http_split_clients_module

 --without-http_referer_module      disable ngx_http_referer_module

 --without-http_rewrite_module      disable ngx_http_rewrite_module

 --without-http_proxy_module        disable ngx_http_proxy_module

 --without-http_fastcgi_module      disable ngx_http_fastcgi_module

 --without-http_uwsgi_module        disable ngx_http_uwsgi_module

 --without-http_scgi_module         disable ngx_http_scgi_module

 --without-http_grpc_module         disable ngx_http_grpc_module

 --without-http_memcached_module    disable ngx_http_memcached_module

 --without-http_limit_conn_module   disable ngx_http_limit_conn_module

 --without-http_limit_req_module    disable ngx_http_limit_req_module

 --without-http_empty_gif_module    disable ngx_http_empty_gif_module

 --without-http_browser_module      disable ngx_http_browser_module

 --without-http_stub_status_module  disable ngx_http_stub_status_module

 --without-http_upstream_hash_module

                                    disable ngx_http_upstream_hash_module

 --without-http_upstream_ip_hash_module

                                    disable ngx_http_upstream_ip_hash_module

 --without-http_upstream_least_conn_module

                                    disable ngx_http_upstream_least_conn_module

 --without-http_upstream_random_module

                                    disable ngx_http_upstream_random_module

 --without-http_upstream_keepalive_module

                                    disable ngx_http_upstream_keepalive_module

 --without-http_upstream_zone_module

                                    disable ngx_http_upstream_zone_module


 --with-http_perl_module            enable ngx_http_perl_module

 --with-http_perl_module=dynamic    enable dynamic ngx_http_perl_module

 --with-perl_modules_path=PATH      set Perl modules path

 --with-perl=PATH                   set perl binary pathname


 --without-http-upstream-rbtree     disable using rbtree for upstream lookup


 --with-http_lua_module             enable ngx_http_lua_module (will also enable --with-md5 and --with-sha1)

 --with-luajit-inc=PATH             set LuaJIT headers path (where lua.h/lauxlib.h/... are located)

 --with-luajit-lib=PATH             set LuaJIT library path (where libluajit-5.1.{a,so} are located)

 --with-lua-inc=PATH                set Lua headers path (where lua.h/lauxlib.h/... are located)

 --with-lua-lib=PATH                set Lua library path (where liblua.{a,so} are located, only support Lua-5.1.x)

 --http-log-path=PATH               set http access log pathname

 --http-client-body-temp-path=PATH  set path to store

                                    http client request body temporary files

 --http-proxy-temp-path=PATH        set path to store

                                    http proxy temporary files

 --http-fastcgi-temp-path=PATH      set path to store

                                    http fastcgi temporary files

 --http-uwsgi-temp-path=PATH        set path to store

                                    http uwsgi temporary files

 --http-scgi-temp-path=PATH         set path to store

                                    http scgi temporary files


 --without-http                     disable HTTP server

 --without-http-cache               disable HTTP cache


 --with-mail                        enable POP3/IMAP4/SMTP proxy module

 --with-mail=dynamic                enable dynamic POP3/IMAP4/SMTP proxy module

 --with-mail_ssl_module             enable ngx_mail_ssl_module

 --without-mail_pop3_module         disable ngx_mail_pop3_module

 --without-mail_imap_module         disable ngx_mail_imap_module

 --without-mail_smtp_module         disable ngx_mail_smtp_module


 --with-stream                      enable TCP/UDP proxy module

 --with-stream=dynamic              enable dynamic TCP/UDP proxy module

 --with-stream_ssl_module           enable ngx_stream_ssl_module

 --with-stream_realip_module        enable ngx_stream_realip_module

 --with-stream_geoip_module         enable ngx_stream_geoip_module

 --with-stream_geoip_module=dynamic enable dynamic ngx_stream_geoip_module

 --with-stream_ssl_preread_module   enable ngx_stream_ssl_preread_module

 --with-stream_sni                  enable dynamic server block

 --without-stream_limit_conn_module disable ngx_stream_limit_conn_module

 --without-stream_access_module     disable ngx_stream_access_module

 --without-stream_geo_module        disable ngx_stream_geo_module

 --without-stream_map_module        disable ngx_stream_map_module

 --without-stream_split_clients_module

                                    disable ngx_stream_split_clients_module

 --without-stream_return_module     disable ngx_stream_return_module

 --without-stream_upstream_hash_module

                                    disable ngx_stream_upstream_hash_module

 --without-stream_upstream_least_conn_module

                                    disable ngx_stream_upstream_least_conn_module

 --without-stream_upstream_random_module

                                    disable ngx_stream_upstream_random_module

 --without-stream_upstream_zone_module

                                    disable ngx_stream_upstream_zone_module


 --with-google_perftools_module     enable ngx_google_perftools_module

 --with-cpp_test_module             enable ngx_cpp_test_module


 --add-module=PATH                  enable external module

 --add-dynamic-module=PATH          enable dynamic external module


 --with-compat                      dynamic modules compatibility


 --with-cc=PATH                     set C compiler pathname

 --with-cpp=PATH                    set C preprocessor pathname

 --with-cc-opt=OPTIONS              set additional C compiler options

 --with-ld-opt=OPTIONS              set additional linker options

 --with-cpu-opt=CPU                 build for the specified CPU, valid values:

                                    pentium, pentiumpro, pentium3, pentium4,

                                    athlon, opteron, sparc32, sparc64, ppc64


 --without-pcre                     disable PCRE library usage

 --with-pcre                        force PCRE library usage

 --with-pcre=DIR                    set path to PCRE library sources

 --with-pcre-opt=OPTIONS            set additional build options for PCRE

 --with-pcre-jit                    build PCRE with JIT compilation support


 --with-zlib=DIR                    set path to zlib library sources

 --with-zlib-opt=OPTIONS            set additional build options for zlib

 --with-zlib-asm=CPU                use zlib assembler sources optimized

                                    for the specified CPU, valid values:

                                    pentium, pentiumpro


 --with-libatomic                   force libatomic_ops library usage

 --with-libatomic=DIR               set path to libatomic_ops library sources


 --with-jemalloc                    force jemalloc library usage

 --with-jemalloc=DIR                set path to jemalloc library files


 --with-openssl=DIR                 set path to OpenSSL library sources

 --with-openssl-opt=OPTIONS         set additional build options for OpenSSL


 --with-debug                       enable debug logging

相关文章
|
机器学习/深度学习 缓存 网络安全
服务器中的conda环境
服务器中的conda环境
1527 1
|
编解码 网络安全 CDN
使用cdn为github pages加速
第一次使用cdn
2358 0
|
时序数据库
influxDB时序数据库2.0FLUX查询语法使用记录
influxDB时序数据库2.0FLUX查询语法使用记录
|
4月前
|
JSON API 数据格式
京东商品评论API秘籍!轻松获取商品评论数据
京东商品评论API是京东开放平台提供的数据接口,支持按商品ID获取评论,具备分页、评分筛选、排序等功能,适用于电商数据分析与用户反馈收集。接口采用HTTPS请求,数据格式为JSON,具备高并发处理能力。附Python请求示例代码,便于开发者快速集成。
|
3月前
|
算法 API 数据安全/隐私保护
拼多多 item_search_best 接口深度分析及 Python 实现
拼多多开放平台 item_search_best 接口是用于精准商品搜索的核心接口,按商品销量、价格、评分及商家资质等多维度排序,适用于爆款挖掘、竞品分析与市场监控。本文详解其接口特性、参数配置、签名生成逻辑、返回结构及 Python 实现方案。
|
12月前
|
机器学习/深度学习 PyTorch 测试技术
TurboAttention:基于多项式近似和渐进式量化的高效注意力机制优化方案,降低LLM计算成本70%
**TurboAttention**提出了一种全新的LLM信息处理方法。该方法通过一系列优化手段替代了传统的二次复杂度注意力机制,包括稀疏多项式软最大值近似和高效量化技术。
503 5
TurboAttention:基于多项式近似和渐进式量化的高效注意力机制优化方案,降低LLM计算成本70%
|
安全 Shell 数据安全/隐私保护
CI/CD笔记.Gitlab系列:控制台强制修改root用户密码
CI/CD笔记.Gitlab系列:控制台强制修改root用户密码
894 2
|
前端开发 Java 程序员
springboot 学习十五:Spring Boot 优雅的集成Swagger2、Knife4j
这篇文章是关于如何在Spring Boot项目中集成Swagger2和Knife4j来生成和美化API接口文档的详细教程。
2119 1
|
Unix Shell 开发工具
环境搭建 | MuMu模拟器 - Window10/11 系列
环境搭建 | MuMu模拟器 - Window10/11 系列
|
开发框架 安全 .NET
不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 oveoverrideMode....
不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 oveoverrideMode....
1135 0
不能在此路径中使用此配置节。如果在父级别上锁定了该节,便会出现这种情况。锁定是默认设置的(overrideModeDefault="Deny"),或者是通过包含 oveoverrideMode....