「Acme.sh」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(新規作成)
 
 
(同じ利用者による、間の9版が非表示)
3行目: 3行目:
 
[[Category:暗号化]]
 
[[Category:暗号化]]
 
[[Category:コマンド]]
 
[[Category:コマンド]]
  +
[[en:Acme.sh]]
[https://github.com/acmesh-official/acme.sh acme.sh] is an [[ACME]] client written purely in [[シェル]] script. It implements the full ACME protocol and supports, for example, IPv6 and wildcard certificates.
 
  +
[https://github.com/acmesh-official/acme.sh acme.sh] [[シェル]]スクリプトだけで書かれた ACME クライアントです。ACME プロトコルを完全に実装しており、例えば IPv6 やワイルドカード証明書などをサポートしています。
   
== Installation ==
+
== インストール ==
   
[[インストール]] the {{Pkg|acme.sh}} package, and {{Pkg|socat}} if you want to use the standalone mode.
+
{{Pkg|acme.sh}} パッケージを[[インストール]]します。スタンドアロンモードを使用する場合は、{{Pkg|socat}} をインストールします。
   
== Usage ==
+
== 使用方法 ==
   
The package does not provide man pages, but a [https://github.com/acmesh-official/acme.sh/wiki/ wiki] for usage. Executing {{ic|acme.sh --help}} outputs a long list of commands and parameters.
+
このパッケージは man ページを提供しませんが、使い方は [https://github.com/acmesh-official/acme.sh/wiki/ wiki] に書いてあります。{{ic|acme.sh --help}} を実行すると、コマンドとパラメータの長いリストが出力されます。
   
  +
基本的には 3 つのステップがあります。
There are three basic steps involved:
 
   
  +
# 証明書の発行を依頼する。
# Requesting a certificate to be issued.
 
  +
# 発行された証明書をインストールし、使えるようにする。
# Installing the issued certificate, to make it useful.
 
  +
# 証明書を長期的に維持する。
# Maintaining the certificate over time.
 
   
  +
以下の例で説明します。
as covered with below examples.
 
   
=== Issuing a new cert ===
+
=== 新しい証明書を発行 ===
   
  +
{{ic|-d}} オプションで任意のドメインを指定することができます。
You can specify any domain with the {{ic|-d}} option.
 
   
{{Tip|You might want to [https://community.letsencrypt.org/t/the-acme-sh-will-change-default-ca-to-zerossl-on-august-1st-2021/144052 specify] LetsEncrypt as your default CA, as acme.sh uses ZeroSSL as its default CA effective from August 1st, 2021.}}
+
{{Tip|acme.sh は2021年8月1日から ZeroSSL をデフォルト CA として使用しているため、LetsEncrypt をデフォルト CA として[https://community.letsencrypt.org/t/the-acme-sh-will-change-default-ca-to-zerossl-on-august-1st-2021/144052 指定]するとよいでしょう。}}
   
  +
{{ic|acme.sh}} スクリプトは、さまざまなモードをサポートしています。指定するモードとオプションの例は次のとおりです。
The {{ic|acme.sh}} script support different modes. Examples for modes and options to be specified are:
 
   
* Webroot mode:
+
* Webroot モード:
   
 
:{{ic|$ acme.sh --issue -d example.com -d www.example.com -d cp.example.com -d '*.example.com' -w /home/wwwroot/example.com}}
 
:{{ic|$ acme.sh --issue -d example.com -d www.example.com -d cp.example.com -d '*.example.com' -w /home/wwwroot/example.com}}
   
  +
* スタンドアロンモード。ウェブサーバーが動作していない場合は {{ic|--standalone}} をつけてスタンドアロンモードにします:
* Standalone mode, by adding {{ic|--standalone}} if no web server is running (requires {{Pkg|socat}} installed):
 
   
 
:{{ic|$ acme.sh --issue --standalone -d example.com -d www.example.com -d cp.example.com}}
 
:{{ic|$ acme.sh --issue --standalone -d example.com -d www.example.com -d cp.example.com}}
   
* Nginx mode:
+
* Nginx モード:
   
 
:{{ic|$ acme.sh --issue --nginx -d example.com -d www.example.com -d cp.example.com}}
 
:{{ic|$ acme.sh --issue --nginx -d example.com -d www.example.com -d cp.example.com}}
   
* DNS mode (see [https://github.com/acmesh-official/acme.sh/wiki/dnsapi official wiki] for further information):
+
* DNS モード (詳しくは [https://github.com/acmesh-official/acme.sh/wiki/dnsapi official wiki] を参照してください):
   
 
:{{ic|$ acme.sh --issue -d example.com -d '*.example.com' --dns dns_he}}
 
:{{ic|$ acme.sh --issue -d example.com -d '*.example.com' --dns dns_he}}
   
The project's wiki lists [https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert more examples].
+
プロジェクトの wiki には [https://github.com/acmesh-official/acme.sh/wiki/How-to-issue-a-cert さらに多くの例]が掲載されています。
   
=== Install the cert to Apache/Nginx etc ===
+
=== Apache/Nginx などに証明書をインストールする ===
   
 
Nginx:
 
Nginx:
57行目: 58行目:
 
$ acme.sh --install-cert -d example.com --cert-file '/path/to/certfile/in/apache/example.cer' --key-file '/path/to/keyfile/in/apache/example.key' --fullchain-file '/path/to/fullchain/certfile/apache/example.fullchain.cer' --reloadcmd "systemctl force-reload nginx apache2"
 
$ acme.sh --install-cert -d example.com --cert-file '/path/to/certfile/in/apache/example.cer' --key-file '/path/to/keyfile/in/apache/example.key' --fullchain-file '/path/to/fullchain/certfile/apache/example.fullchain.cer' --reloadcmd "systemctl force-reload nginx apache2"
   
=== Maintaining a cert ===
+
=== 証明書の維持 ===
   
The certs will be renewed every 60 days. To run {{ic|acme.sh}} regularly, a [https://github.com/acmesh-official/acme.sh/wiki/Using-systemd-units-instead-of-cron systemd timer] may be set up.
+
証明書は 60 日ごとに更新されます。{{ic|acme.sh}} を定期的に実行するために、[https://github.com/acmesh-official/acme.sh/wiki/Using-systemd-units-instead-of-cron systemd timer] を設定することができます。
   
== See also ==
+
== 参照 ==
   
* [https://github.com/acmesh-official/acme.sh Project homepage] and [https://github.com/acmesh-official/acme.sh/wiki/ wiki] for its documentation.
+
* ドキュメントは、[https://github.com/acmesh-official/acme.sh Project homepage] [https://github.com/acmesh-official/acme.sh/wiki/ wiki] があります。
* [https://github.com/diafygi/ acme-tiny] offers several related utilities, as well as additional general ACME documentation.
+
* [https://github.com/diafygi/ acme-tiny] はいくつかの関連するユーティリティと、その他の一般的な ACME ドキュメントを提供します。
* [https://git.guilhem.org/lacme/about/ lacme] is a small ACME client written with process isolation and minimal privileges in mind.
+
* [https://git.guilhem.org/lacme/about/ lacme] は小さな ACME クライアントで、プロセスの分離と最小限の特権を念頭に置いて書かれています。
  +
  +
{{TranslationStatus|Acme.sh|2022-07-07|730355}}

2022年7月7日 (木) 10:21時点における最新版

acme.sh シェルスクリプトだけで書かれた ACME クライアントです。ACME プロトコルを完全に実装しており、例えば IPv6 やワイルドカード証明書などをサポートしています。

インストール

acme.sh パッケージをインストールします。スタンドアロンモードを使用する場合は、socat をインストールします。

使用方法

このパッケージは man ページを提供しませんが、使い方は wiki に書いてあります。acme.sh --help を実行すると、コマンドとパラメータの長いリストが出力されます。

基本的には 3 つのステップがあります。

  1. 証明書の発行を依頼する。
  2. 発行された証明書をインストールし、使えるようにする。
  3. 証明書を長期的に維持する。

以下の例で説明します。

新しい証明書を発行

-d オプションで任意のドメインを指定することができます。

ヒント: acme.sh は2021年8月1日から ZeroSSL をデフォルト CA として使用しているため、LetsEncrypt をデフォルト CA として指定するとよいでしょう。

acme.sh スクリプトは、さまざまなモードをサポートしています。指定するモードとオプションの例は次のとおりです。

  • Webroot モード:
$ acme.sh --issue -d example.com -d www.example.com -d cp.example.com -d '*.example.com' -w /home/wwwroot/example.com
  • スタンドアロンモード。ウェブサーバーが動作していない場合は --standalone をつけてスタンドアロンモードにします:
$ acme.sh --issue --standalone -d example.com -d www.example.com -d cp.example.com
  • Nginx モード:
$ acme.sh --issue --nginx -d example.com -d www.example.com -d cp.example.com
  • DNS モード (詳しくは official wiki を参照してください):
$ acme.sh --issue -d example.com -d '*.example.com' --dns dns_he

プロジェクトの wiki には さらに多くの例が掲載されています。

Apache/Nginx などに証明書をインストールする

Nginx:

$ acme.sh --install-cert -d example.com --key-file '/path/to/keyfile/in/nginx/example.key' --fullchain-file '/path/to/fullchain/nginx/example.cer' --reloadcmd "systemctl force-reload nginx"

Apache:

$ acme.sh --install-cert -d example.com --cert-file '/path/to/certfile/in/apache/example.cer' --key-file '/path/to/keyfile/in/apache/example.key' --fullchain-file '/path/to/fullchain/certfile/apache/example.fullchain.cer' --reloadcmd "systemctl force-reload nginx apache2"

証明書の維持

証明書は 60 日ごとに更新されます。acme.sh を定期的に実行するために、systemd timer を設定することができます。

参照

  • ドキュメントは、Project homepagewiki があります。
  • acme-tiny はいくつかの関連するユーティリティと、その他の一般的な ACME ドキュメントを提供します。
  • lacme は小さな ACME クライアントで、プロセスの分離と最小限の特権を念頭に置いて書かれています。
翻訳ステータス: このページは en:Acme.sh の翻訳バージョンです。最後の翻訳日は 2022-07-07 です。もし英語版に 変更 があれば、翻訳の同期を手伝うことができます。