安装openssl nginx开启tsl1.3
yum install -y gcc gcc-c++ perl pcre-devel openssl openssl-develcd /soft/bakwget https://www.openssl.org/source/openssl-1.1.1g.tar.gztar zxvf openssl-1.1.1g.tar.gzmv openssl-1.1.1g /soft/opensslcd /soft/openssl./configmake && make installln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/openssl version
安装ngx_brotli
cd /softgit clone https://github.com/google/ngx_brotli.gitcd /soft/ngx_brotligit submodule update --init
安装nginx
官方安装方法
安装TSL1.3 泛域名证书
分别为每个域名手工生成证书certbot certonly --nginx --nginx-server-root=/soft/nginx/conf
尽量保证页面中全部连接使用https 例如js/css等 否则在监控台和地址栏证书位置可能会报错
-j2表示两个线程并行 提高编译效率 但是对makefile文件有要求 必须依赖关系明确 否则某一线程会找不到依赖
cd /soft/bakwget http://nginx.org/download/nginx-1.18.0.tar.gztar -zxvf nginx-1.18.0.tar.gzcd /soft/bak/nginx-1.18.0./configure --prefix=/soft/nginx \--with-http_gzip_static_module \--with-http_stub_status_module \--with-http_v2_module \--with-file-aio \--with-http_realip_module \--with-http_ssl_module \--with-openssl=/soft/openssl \--with-openssl-opt=enable-tls1_3 \--add-module=/soft/ngx_brotlimake -j2&& make installmv /www/conf.d /soft/nginx/web
vi /etc/profile
export PATH=$PATH:/soft/nginx/sbin
source /etc/profile
