ログイン
ユーザ名:

パスワード:


パスワード紛失

新規登録
メインメニュー
検索
オンライン状況
43 人のユーザが現在オンラインです。 (1 人のユーザが ニュース を参照しています。)

登録ユーザ: 0
ゲスト: 43

もっと...
Let's Encryptを試す : Let’s Encryptの自動更新の設定
投稿者: f-otake 投稿日時: 2017-2-1 13:13:57 (913 ヒット)

Let's Encryptの有効期限は90日しかないので、自動更新を設定します。
初めにテスト
# ./certbot-auto renew --dry-run
すると

/root/.local/share/letsencrypt/lib/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6
is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support
for Python 2.6
  DeprecationWarning
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/www.kinryokai.net.conf
-------------------------------------------------------------------------------
Cert not due for renewal, but simulating renewal for dry run
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for www.kinryokai.net
Waiting for verification...
Cleaning up challenges
Generating key (2048 bits): /etc/letsencrypt/keys/0001_key-certbot.pem
Creating CSR: /etc/letsencrypt/csr/0001_csr-certbot.pem
** DRY RUN: simulating 'certbot renew' close to cert expiry **
         (The test certificates below have not been saved.)
Congratulations, all renewals succeeded. The following certs have been renewed:
 /etc/letsencrypt/live/www.kinryokai.net/fullchain.pem (success)
** DRY RUN: simulating 'certbot renew' close to cert expiry **
         (The test certificates above have not been saved.)
後略

と成功したので、更新するコマンドを1日2回(失敗することがあるので2回の実行が推奨されているそうな)実行するようcrotabで設定します
# crontab -u root -e
空白の設定ファイルが開くので(以前に何か設定していたら、それが表示されるので最後に追記する) a を押し挿入モードにしてから
MAILTO=""
15 6 * * * /root/certbot-auto renew --quiet
15 7 * * * /root/certbot-auto renew --quiet

として保存しておく(esc : w q) 尚、このファイルは /var/spool/cron/root に保存される。6時15分と7時15分に設定したのは午前4時に全サブホストのバックアップが始まるから少しずらした。

Printer Friendly Page Send this Story to a Friend
 
投稿された内容の著作権はコメントの投稿者に帰属します。
テーマ選択

(4 テーマ)
ピックアップ画像
2012年紅葉 2
最近の画像
IMG_0004.jpg (2023-3-17)
IMG_0004.jpg
IMG_0003.jpg (2023-3-17)
IMG_0003.jpg
IMG_0010.jpg (2023-3-17)
IMG_0010.jpg
IMG_0013.jpg (2023-3-17)
IMG_0013.jpg
IMG_0007.jpg (2023-3-17)
IMG_0007.jpg
IMG_0005.jpg (2023-3-17)
IMG_0005.jpg
IMG_0002.jpg (2023-3-17)
IMG_0002.jpg
IMG_0011.jpg (2023-3-17)
IMG_0011.jpg
IMG_0009.jpg (2023-3-17)
IMG_0009.jpg
IMG_0008.jpg (2023-3-17)
IMG_0008.jpg
人気画像
ゴーキョピー... (6003 hits)
ゴーキョピー...
ギャチュンカ... (5866 hits)
ギャチュンカ...
ばあちゃんミ... (5765 hits)
ばあちゃんミ...
ヒマラヤ壁 (5672 hits)
ヒマラヤ壁
タムセルク残... (5479 hits)
タムセルク残...
Powered by Xoops2 Theme Modified by F-Otake
copyright (c) 2006 All rights reserved.