From ee1cc8a93facfed5e35894a0687a3f578437501c Mon Sep 17 00:00:00 2001 From: xzeu Date: Thu, 4 Jul 2024 09:16:06 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20=E5=A6=82=E4=BD=95=E5=AE=89=E8=A3=85?= =?UTF-8?q?=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 如何安装.md | 80 ++++++++++++++++++++++++++--------------------------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/如何安装.md b/如何安装.md index 7932840..aba7219 100644 --- a/如何安装.md +++ b/如何安装.md @@ -1,74 +1,72 @@ -Update the Linux/BSD system with latest CA bundle and patches from System Update otherwise some issues may occur when generating your free SSL certificates. -生成免费SSL证书前,请使用Linux/BSD 更新工具更新CA包和系统补丁,否则在生成免费SSL证书时可能会出现一些不可预料的问题,完成更新后请按以下步骤进行安装。 -Once completed begin with the install procedure below. -- CentOs: `yum update ca-certificates` -- Debian: `apt update ; apt install ca-certificates` (updates package if already installed) \ - also applies to Debian-based distros like Ubuntu, LinuxMint, etc. +生成免费SSL证书前,请使用Linux/BSD系统更新工具更新CA包和系统补丁,以避免在生成证书过程中出现未预料到的问题。完成更新后,可以按照以下步骤进行安装。 -## 1. Install from web: https://get.acme.sh +### 步骤1: 安装 acme.sh -Install https://github.com/acmesh-official/acme.sh +#### 在线安装方式:https://get.acme.sh -``` +使用 `curl` 安装: + +```bash curl https://get.acme.sh | sh -s email=my@example.com ``` -or +或者使用 `wget` 安装: -``` +```bash wget -O - https://get.acme.sh | sh -s email=my@example.com ``` -## 2. Or, install from GitHub: +#### 使用 GitHub 安装: -``` -curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online -m my@example.com +使用`curl`安装: + +```bash +curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online -m my@example.com ``` -or: -``` -wget -O - https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online -m my@example.com +或者使用`wget`安装: + +```bash +wget -O - https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online -m my@example.com ``` +### 步骤2: 使用 git 克隆并安装 -## 3. Or, git clone and install: - -``` +```bash git clone --depth 1 https://github.com/acmesh-official/acme.sh.git cd acme.sh ./acme.sh --install -m my@example.com ``` +### 步骤3: 高级安装选项 -## 4. Advanced installation - -``` +```bash git clone --depth 1 https://github.com/acmesh-official/acme.sh.git cd acme.sh -./acme.sh --install \ +./acme.sh --install \ --home ~/myacme \ --config-home ~/myacme/data \ ---cert-home ~/mycerts \ ---accountemail "my@example.com" \ ---accountkey ~/myaccount.key \ +--cert-home ~/mycerts \ +--accountemail "my@example.com" \ +--accountkey ~/myaccount.key \ --accountconf ~/myaccount.conf \ ---useragent "this is my client." +--useragent "this is my client." ``` -You don't need to set them all, just set those ones you care about. +你不需要设置所有选项,只需设置你关心的那些选项即可。这些选项的详细说明如下: -Explanations : +- `--home` 是安装 `acme.sh` 的自定义目录,默认安装在 `~/.acme.sh` 中。 +- `--config-home` 是一个可写文件夹,`acme.sh` 将所有文件(包括证书/密钥、配置文件)写入其中,默认为 `--home` 中。 +- `--cert-home` 是用于保存你发行的证书的自定义目录,默认保存在 `--config-home` 中。 +- `--accountemail` 是用于注册到 Let's Encrypt 的电子邮件地址,你将在此处接收到更新通知邮件。 +- `--accountkey` 是保存你的账户私钥的文件。默认保存在 `--config-home` 中。 +- `--useragent` 是发送给 Let's Encrypt 的用户代理标头值。 +- `--nocron` 安装 `acme.sh` 时不安装 cron 作业。 -- `--home` is a customized dir to install `acme.sh` in. By default, it installs into `~/.acme.sh` -- `--config-home` is a writable folder, acme.sh will write all the files(including cert/keys, configs) there. By default, it's in `--home` -- `--cert-home` is a customized dir to save the certs you issue. By default, it's saved in `--config-home`. -- `--accountemail` is the email used to register an account to Let's Encrypt, you will receive a renewal notice email here. -- `--accountkey` is the file saving your account private key. By default, it's saved in `--config-home`. -- `--useragent` is the user-agent header value used to send to Let's Encrypt. -- `--nocron` install acme.sh without cronjob +### 特殊情况: 从 certbot 转换 LE 账户数据到 acme.sh -## 5. Special case: Converting LE account data from certbot to acme.sh -If already using certbot, then there is the possiblity to convert its LE account data to acme.sh format. -See https://github.com/maddes-b/linux-stuff/tree/main/acme.sh . +如果已经使用 certbot,并希望转换其 LE 账户数据到 acme.sh 格式,请参考以下链接进行转换:https://github.com/maddes-b/linux-stuff/tree/main/acme.sh 。 -If re-using the LE account created from certbot, then it is recommended **not** to specify `-m/--email` during installation. +如果要重新使用从 certbot 创建的 LE 账户,请在安装过程中**不要**指定 `-m/--email`。 + +以上是安装和配置 acme.sh 以生成免费SSL证书的详细步骤和说明。 \ No newline at end of file