V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
liuyinltemp
V2EX  ›  Linux

请问 debian 9 有无第三方源可以 apt 安装新版 openssl 的?

  •  
  •   liuyinltemp · 2019-06-28 09:38:38 +08:00 · 5823 次点击
    这是一个创建于 1756 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如题,openssl 有无类似 nginx 那种可以通过第三方源安装,我自己编译总是出错。openvz vps 因为无法升级内核无法升级到 debian 10。
    37 条回复    2021-02-18 22:56:35 +08:00
    wly19960911
        1
    wly19960911  
       2019-06-28 09:42:14 +08:00
    openssl 1.1.1 + nginx 编译报错? 上次碰到了,网上博客过时了,所以编译的时候会报 openssl 某个 so 找不到....
    emeab
        2
    emeab  
       2019-06-28 09:43:59 +08:00
    把编译错误贴上来 看看?
    iwtbauh
        3
    iwtbauh  
       2019-06-28 09:47:26 +08:00 via Android
    看看有没有 debian-backport。
    本地编译一个传上去。
    直接用 debian 10 的包。
    msg7086
        4
    msg7086  
       2019-06-28 10:06:31 +08:00
    msg7086
        5
    msg7086  
       2019-06-28 10:07:37 +08:00
    顺便问问为什么要编译新版的 OpenSSL。
    liuyinltemp
        6
    liuyinltemp  
    OP
       2019-06-28 10:48:05 +08:00
    @msg7086 想升级个人网站支持 tls1.3,反正个人用,直接只用 tls1.3
    liuyinltemp
        7
    liuyinltemp  
    OP
       2019-06-28 10:51:17 +08:00
    @msg7086 这个怎么用啊?个人比较小白,我看到 sury.org 源也是可以装最新 nginx 的。
    wget -O /etc/apt/trusted.gpg.d/nginx-mainline.gpg https://packages.sury.org/nginx-mainline/apt.gpg
    cat >> /etc/apt/sources.list.d/nginx.list << EOF
    deb https://packages.sury.org/nginx-mainline/ $(lsb_release -sc) main
    EOF
    apt update
    apt install -y nginx-extras
    Love4Taylor
        8
    Love4Taylor  
       2019-06-28 10:53:06 +08:00
    liuyinltemp
        9
    liuyinltemp  
    OP
       2019-06-28 10:55:06 +08:00
    @Love4Taylor 这个安装 nginx 直接安装新版 openssl 吗?
    Love4Taylor
        10
    Love4Taylor  
       2019-06-28 10:59:51 +08:00
    @liuyinltemp #9 不会. 但这个版本已经继承了一些常用模块. 也基本够你用了.

    π ~ ❯ nginx -V
    nginx version: nginx/1.17.1
    built with OpenSSL 1.1.1c 28 May 2019
    TLS SNI support enabled
    configure arguments: --with-cc-opt='-g -O2 -fdebug-prefix-map=/build/nginx=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fPIC' --with-openssl=/build/nginx/../openssl --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --modules-path=/usr/lib/nginx/modules --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_v2_module --with-http_dav_module --with-http_slice_module --with-threads --with-http_addition_module --with-http_flv_module --with-http_geoip_module=dynamic --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_secure_link_module --with-http_sub_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --add-dynamic-module=/build/nginx/sb-modules/ngx_http_geoip2_module --add-module=/build/nginx/sb-modules/ngx_brotli --add-dynamic-module=/build/nginx/debian/modules/http-headers-more-filter --add-dynamic-module=/build/nginx/debian/modules/http-auth-pam --add-dynamic-module=/build/nginx/debian/modules/http-cache-purge --add-dynamic-module=/build/nginx/debian/modules/http-dav-ext --add-dynamic-module=/build/nginx/debian/modules/http-ndk --add-dynamic-module=/build/nginx/debian/modules/http-echo --add-dynamic-module=/build/nginx/debian/modules/http-fancyindex --add-dynamic-module=/build/nginx/debian/modules/nchan --add-dynamic-module=/build/nginx/debian/modules/http-lua --add-dynamic-module=/build/nginx/debian/modules/rtmp --add-dynamic-module=/build/nginx/debian/modules/http-uploadprogress --add-dynamic-module=/build/nginx/debian/modules/http-upstream-fair --add-dynamic-module=/build/nginx/debian/modules/http-subs-filter
    msg7086
        11
    msg7086  
       2019-06-28 11:45:09 +08:00
    @liuyinltemp 你如果只是要装 nginx 的话,直接装我们 sb 的 nginx 就行了。
    OpenSSL 是静态编译的,新版本 nginx 发布的时候会自动打包带进最新的 OpenSSL 版本。
    现在带的是 1.1.1c ,比 sury 还新一点好像。
    chinesestudio
        12
    chinesestudio  
       2019-06-28 12:37:49 +08:00 via Android
    你直接可以添加 test 源 指定安装
    liuyinltemp
        13
    liuyinltemp  
    OP
       2019-06-28 13:21:25 +08:00
    @Love4Taylor 原来 apt 安装的时候 built with OpenSSL 1.1.1c 28 May 2019,已经编译在里面了,不需要再安装 openssl 啦,太谢谢啦!
    liuyinltemp
        14
    liuyinltemp  
    OP
       2019-06-28 13:22:17 +08:00
    @msg7086 我基本上就只用 nginx 部署一个小网站。
    msg7086
        15
    msg7086  
       2019-06-28 13:53:44 +08:00
    @liuyinltemp 是的,编译在里面了,每次更新 nginx 的时候都会自动更新 OpenSSL 的。
    liuyinltemp
        16
    liuyinltemp  
    OP
       2019-06-28 14:02:54 +08:00
    @msg7086 sb 的 nginx 怎么安装?
    msg7086
        17
    msg7086  
       2019-06-28 14:05:09 +08:00
    @liuyinltemp 8 楼的链接啊?
    liuyinltemp
        18
    liuyinltemp  
    OP
       2019-06-28 17:21:25 +08:00
    @msg7086 搞定了,使用的是 sb 的 nginx,确实不错。就是不知道大牛知不知道 nginx 启动 tls1.3,或者纯粹使用 TLS1.3 后,ssl_ciphers 怎么设置,想用 chacha20 算法。
    msg7086
        19
    msg7086  
       2019-06-28 22:22:26 +08:00
    @liuyinltemp ssl_ciphers TLS_CHACHA20_POLY1305_SHA256; 试试看。
    msg7086
        20
    msg7086  
       2019-06-28 22:23:51 +08:00
    TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384;
    这样可能好一点,可以 fallback。
    Hardrain
        21
    Hardrain  
       2019-06-29 01:40:15 +08:00   ❤️ 1
    @liuyinltemp
    @msg7086
    OpenSSL 1.1.1 用了一些新的 function 来设置 TLS 1.3 加密套件,导致不能通过 nginx 的 ssl_ciphers 设置。

    SSL_CTX_set_cipher_list()用于设置 TLS 1.2 及以前版本的加密套件
    SSL_CTX_set_ciphersuites()用于给 SSL context 设置 TLS 1.3 的加密套件

    ( https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_ciphersuites.html)


    你需要给 Nginx 或 OpenSSL 打 patch

    比如: https://github.com/Hardrain980/nginx-tls13-chacha20-patch (我撰写且正在使用的)

    patch 后通过 ssl_ciphers_tls13 设置 TLS 1.3 加密套件。
    msg7086
        22
    msg7086  
       2019-06-29 02:33:25 +08:00   ❤️ 1
    @Hardrain sb 的 nginx 早就打上我写的补丁了。
    liuyinltemp
        23
    liuyinltemp  
    OP
       2019-06-29 13:48:16 +08:00 via iPhone
    都是大牛啊,回来改一下
    liuyinltemp
        24
    liuyinltemp  
    OP
       2019-07-18 11:21:36 +08:00
    @msg7086 sb 的 nginx 支持 ngx_http_proxy_connect_module 吗?如果不行,自己怎么加进去?
    msg7086
        25
    msg7086  
       2019-07-18 13:13:46 +08:00
    @liuyinltemp 没有的,也加不进去。
    liuyinltemp
        26
    liuyinltemp  
    OP
       2019-07-31 17:22:22 +08:00
    @msg7086 ngx_http_proxy_connect_module 能加到官方源安装的 nginx 吗?怎么操作呀?
    msg7086
        27
    msg7086  
       2019-07-31 23:48:58 +08:00
    @liuyinltemp 我没有研究过。
    liuyinltemp
        28
    liuyinltemp  
    OP
       2019-08-09 13:31:22 +08:00
    @msg7086 今天 sb 源好像证书出问题啦!
    msg7086
        29
    msg7086  
       2019-08-09 13:52:09 +08:00
    @liuyinltemp 已督促大佬处理……
    liuyinltemp
        30
    liuyinltemp  
    OP
       2019-08-14 16:41:43 +08:00
    Fetched 10.2 kB in 3s (3294 B/s)
    W: Failed to fetch https://mirrors.xtom.com/sb/nginx/dists/jessie/InRelease Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    liuyinltemp
        31
    liuyinltemp  
    OP
       2019-08-14 17:27:17 +08:00
    @msg7086 debian 8 下安装出现上述提醒。但是也能装上去
    liuyinltemp
        32
    liuyinltemp  
    OP
       2019-08-14 17:37:43 +08:00
    @msg7086 安装没有问题,nginx -t 也是没有问题,但是反代出错了,奇怪!
    liuyinltemp
        33
    liuyinltemp  
    OP
       2020-06-14 21:52:29 +08:00
    @msg7086 curl: (7) Failed to connect to mirrors.xtom.com port 443: No route to host
    这个我的问题还是最近源出了故障?
    liuyinltemp
        34
    liuyinltemp  
    OP
       2020-10-29 17:22:10 +08:00
    @msg7086 大佬,sb 源不在支持 upstream 了吗?
    msg7086
        35
    msg7086  
       2020-10-30 08:46:16 +08:00
    @liuyinltemp 支持的吧,你遇到什么问题了?
    liuyinltemp
        36
    liuyinltemp  
    OP
       2020-10-30 11:34:21 +08:00
    亲测不支持了,需要 upstream 共用 443 端口
    liuyinltemp
        37
    liuyinltemp  
    OP
       2021-02-18 22:56:35 +08:00
    @msg7086 大佬,sb 源确实不支持 upstream,官方支持。不过 sb 源支持 brotli
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1256 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 23:29 · PVG 07:29 · LAX 16:29 · JFK 19:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.