0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Let's Encryptから発行した証明書を更新した履歴

0
Posted at

証明書の更新が切れた

Let's Encryptの有効期限は60日なので更新しないと有効期限は切れます

更新に使ったコマンド

環境
OS: CentOS v6.10

./certbot-auto renew --force-renew

実行したところエラーが出て更新が出来ない。
※エラーを既に消してしまったため詳細はわからないが「pythonのバージョンが2だったので、3以上に上げて欲しい」というような内容だった。

pyenvでpython3をインストール

現時点でのPythonのVersionが、3.8.1だったのでそれのインストールを試みるが、下記のエラーがでる。

$ pyenv install 3.8.1                                                                                                    [17:46]
Downloading Python-3.8.1.tar.xz...
-> https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tar.xz
Installing Python-3.8.1...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


BUILD FAILED (CentOS release 6.10 (Final) using python-build 1.2.16-5-g7097f82)

下記を見ろと書いてあるので、URLにアクセスしてこのエラーを検索。
https://github.com/pyenv/pyenv/wiki/Common-build-problems

※CentOS v6ではPython 3.7以降は入らないようだ。

ということで、v3.4.3をインストール

$ pyenv install 3.4.3
Downloading Python-3.4.3.tar.xz...
-> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz
Installing Python-3.4.3...
WARNING: The Python bz2 extension was not compiled. Missing the bzip2 lib?
WARNING: The Python readline extension was not compiled. Missing the GNU readline lib?
WARNING: The Python sqlite3 extension was not compiled. Missing the SQLite3 lib?
Installed Python-3.4.3 to /home/kawakami/.pyenv/versions/3.4.3

インストール出来た。

$ pyenv versions                                                                                                           [18:01]
* system (set by /home/kawakami/.pyenv/version)
  3.4.3

Pythonのバージョンを変更

$ pyenv global 3.4.3
$ pyenv rehash
$ pyenv versions                                                                                                           [18:02]
  system
* 3.4.3 (set by /home/kawakami/.pyenv/version)

証明書の更新

証明書の更新を再度実行。

$ ./certbot-auto renew --force-renew
...
Problem binding to port 80: Could not bind to IPv4 or IPv6.. Skipping.

WebServerを止めないと行けないようだ

$ sudo service nginx stop
$ ./certbot-auto renew --force-renew
...
(success)

やっと更新できた!

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?