AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1278936
Accepted
Orange Juice Jones
Orange Juice Jones
Asked: 2020-10-01 08:47:26 +0800 CST2020-10-01 08:47:26 +0800 CST 2020-10-01 08:47:26 +0800 CST

在 ubuntu 20.04 上安装 Certbot

  • 772

我一直在关注一些教程来将 ssl 添加到我的服务器(节点应用程序)。

我尝试在 Ubuntu 20.04 服务器上使用以下行安装 Certbot:

sudo add-apt-repository ppa:certbot/certbot

但收到警告但没有安装:

This is the PPA for packages prepared by Debian Let's Encrypt Team and backported for Ubuntu.                                                                         
Note: Packages are only provided for currently supported Ubuntu releases.
More info: https://launchpad.net/~certbot/+archive/ubuntu/certbot
Press [ENTER] to continue or Ctrl-c to cancel adding it.*

在网上搜索后,提到不使用 PPA,而是使用早期的独立版本 - 也提到使用 snap - 但我找不到具体的答案。我使用的是 Express 而不是 nginX。

有人可以建议如何安装吗?

更新

冉sudo snap install certbot。

结果:

error: This revision of snap "certbot" was published using classic confinement and thus may perform
   arbitrary system changes outside of the security sandbox that snaps are usually confined to,
   which may put your system at risk.
   If you understand and want to proceed repeat the command including --classic.
certificates 20.04
  • 3 3 个回答
  • 18938 Views

3 个回答

  • Voted
  1. Best Answer
    Nate
    2020-10-01T09:10:38+08:002020-10-01T09:10:38+08:00

    他们已经摆脱了现在的状态snap install certbot --classic

    • 10
  2. B. Shea
    2021-09-30T15:28:59+08:002021-09-30T15:28:59+08:00

    您可以使用 APT、PIP 或 SNAP 在 Focal / Ubuntu 20.04 上安装

    (APT 有效——至少目前如此。)

    但是,不要使用一种以上的安装方法,或者混合使用它们。

    听起来您可能有混合安装方法。
    您可能需要清除所有内容并重新开始?

    首先运行这些以清理和删除 Certbot。
    如果您已经创建了证书,则需要重新创建它们。
    警告:以下行将完全删除 certbot 和文件!

     sudo apt remove certbot* --purge  
     sudo apt-add-repository --remove ppa:certbot/certbot  
     sudo apt update  
     sudo snap remove certbot  
     sudo -H pip3 uninstall certbot*  
     pip3 uninstall certbot*  
     sudo rm -rf /etc/letsencrypt
    

    只需忽略任何错误(未找到)。
    这应该涵盖所有基础 - 系统范围和仅限用户。

    现在决定如何安装它。
    只选一个。不要混合安装方法。

    折断

    安装快照很容易,但我个人不喜欢使用它。我更喜欢使用 python pip(截至目前)。Snap 将是我的第二选择。

    Certbot 站点上的 Ubuntu Focal已作为默认安装方法详细记录了 Snap。

    点

    如果您选择 pip,则需要执行此操作(用于系统范围/root 用户):

     sudo apt install python3-pip
     sudo -H pip3 install certbot
    

    这将创建/etc/letsencrypt/文件夹结构和默认文件。

    Certbot 可执行文件将在/usr/local/bin/certbot- 确保它在您的路径中。
    您可能还需要设置自动更新并可能添加插件。
    这里有更详细的说明。

    易于

    sudo apt show certbot

    包:certbot
    版本:0.40.0-1ubuntu0.1
    优先级:extra
    部分:universe/web
    来源:python-certbot
    来源:Ubuntu

    (https://packages.ubuntu.com/focal/certbot)

    APT版本一直落后很多版本。
    这也不例外。
    当前的 APT 版本为 v0.40.0 ->(2019 年 11 月 5 日发布)。
    当前的 PIP 和 SNAP 版本是 v1.19.0(截至 2021 年 10 月 1 日)。

    我建议使用比 APT 提供的更新的东西。由于 Certbot 处理安​​全/SSL,有时 LetsEncrypt/Certbot 人员会进行更改,您肯定希望立即更新。如果您使用 APT 版本,您可能无法做到这一点。据我所知,您也不能将 Certbot PPA 用于 Ubuntu Focal/20。

    因此,请坚持使用pip -or- snap作为您的安装方法。

    • 6
  3. Stan S.
    2021-09-23T21:57:59+08:002021-09-23T21:57:59+08:00

    要在 Ubuntu 20.04 上安装最新版本的github certbot

    sudo curl -o- https://raw.githubusercontent.com/vinyll/certbot-install/master/install.sh | bash
    

    快乐编码!

    • 2

相关问题

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve