Updated 如何安装 (markdown)

master
xzeu 2024-07-04 09:16:06 +08:00
parent e75e256eca
commit ee1cc8a93f
1 changed files with 39 additions and 41 deletions

@ -1,48 +1,46 @@
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`安装:
```bash
curl https://raw.githubusercontent.com/acmesh-official/acme.sh/master/acme.sh | sh -s -- --install-online -m my@example.com
```
or:
```
或者使用`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 \
@ -55,20 +53,20 @@ cd acme.sh
--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证书的详细步骤和说明。