pcre、openssl、jemalloc、zlib等可以从softwares下载
openssl报错:vi auto/lib/openssl/conf,修改include、libssl.a、libcrypt.a路径
nginx: [emerg] getpwnam(“nginx”) failed:useradd -s /sbin/nologin -M nginx,创建nginx用户
curl /usr/local/src wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz tar zxvf tengine-2.3.2.tar.gz && cd tengine-2.3.2 ./configure --prefix=/usr/local/tengine \ --user=nginx \ --group=nginx \ --with-pcre=/usr/local/src/pcre-8.42 \ --with-openssl=/usr/local/src/openssl-1.1.0h \ --with-jemalloc=/usr/local/src/jemalloc-5.2.1 \ --with-zlib=/usr/local/src/zlib-1.2.11 \ --add-module=modules/mod_dubbo \ --add-module=modules/ngx_backtrace_module \ --add-module=modules/ngx_http_concat_module \ --add-module=modules/ngx_http_footer_filter_module \ --add-module=modules/ngx_http_proxy_connect_module \ --add-module=modules/ngx_http_reqstat_module \ --add-module=modules/ngx_http_sysguard_module \ --add-module=modules/ngx_http_trim_filter_module \ --add-module=modules/ngx_http_upstream_dynamic_module \ --add-module=modules/ngx_http_upstream_check_module \ --add-module=modules/ngx_http_user_agent_module \ --add-module=modules/ngx_multi_upstream_module \ --add-module=modules/ngx_slab_stat \ --with-threads \ --with-file-aio \ --with-http_ssl_module \ --with-http_v2_module \ --with-http_realip_module \ --with-http_addition_module \ --with-http_flv_module \ --with-http_mp4_module \ --with-http_gunzip_module \ --with-http_gzip_static_module \ --with-http_auth_request_module \ --with-http_random_index_module \ --with-http_secure_link_module \ --with-http_slice_module \ --with-http_stub_status_module \ --with-mail \ --with-stream
server { listen 443 ssl http2; #ssl on; ssl_certificate /soft/cert/xlongwei.pem; ssl_certificate_key /soft/cert/xlongwei.key; }
./configure --enable-app --prefix=/usr/local/nghttp2 \ OPENSSL_CFLAGS="-I/usr/local/src/openssl-1.1.0h/include" OPENSSL_LIBS="-L/usr/local/src/openssl-1.1.0h" \ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH //源码编译失败,尝试使用docker镜像 docker pull svagi/h2load docker run --rm -t svagi/h2load https://hub.docker.com/ docker run --rm -it --entrypoint="sh" svagi/h2load -n 请求总数,默认1 -c 并发client,默认1 -m 并发stream,默认1 --duration=10 --warm-up-time=5 预热5秒,测试10秒,忽略-c请求总数 -t 线程数,默认1 --h1 使用http/1.1