短時間で学ぶサーバ設定術 Technology

Entries tagged [pip]

How to Install Certbot from Sources Using Python PIP

by e-Manabix


Posted on 2024年5月27日 (月) in Technology


先に、certbot 2.10.0のインストール記事を書きましたが、アプリケーションを更新する段階で、ファイルの依存関係が崩れたようで、使えなくなりました。

このため、Certbotのソースファイルから、Python PIPを使用して、インストールする方法を採用することにしました。

この方法でインストールしたcertbotでも、Let's EncryptによるWeb認証ができますので、お試しください。

なお、前回同様に、無保証ですので、自己責任でお試しください。

 #How to Install Certbot from Sources Using Python Pip for Let's Encrypt on AlmaLinux 9

(1) OS
cat /etc/redhat-release 
Almalinux release 9.4

(2) Pip Install
which pip
dnf -y install pip
##  python3-pip-21.2.3-8.el9.noarch
##完了しました!

(3) Certbot Download
https://sourceforge.net/projects/certbot.mirror/files/v2.10.0/

wget https://sourceforge.net/projects/certbot.mirror/files/v2.10.0/certbot-2.10.0.tar.gz

ls -al certbot*
-rw-r--r--  1 root  root 437757  4月  4 07:16 certbot-2.10.0.tar.gz

gunzip certbot-2.10.0.tar.gz

tar xvf certbot-2.10.0.tar

tree certbot-2.10.0

certbot-2.10.0
├── changelog.md
├── license.txt
├── manifest.in
├── pkg-info
├── readme.rst
├── certbot
│   ├── __init__.py
│   ├── interfaces.py
│   ├── main.py
│   ├── ocsp.py
│   └── util.py
├── setup.cfg
└── setup.py

(4) Certbot Install
pip install ./certbot-2.10.0

##Using legacy 'setup.py install' for certbot, since package 'wheel' is not installed.
##Installing collected packages: pycparser, cffi, cryptography, urllib3, pytz, PyOpenSSL, idna, charset-normalizer, certifi, zipp, requests, pyrfc3339, josepy, parsedatetime, importlib-metadata, configobj, ConfigArgParse, acme, certbot
##    Running setup.py install for certbot ... done
##Successfully installed ConfigArgParse-1.7 PyOpenSSL-24.1.0 acme-2.10.0 certbot-2.10.0 certifi-2024.2.2 cffi-1.16.0 charset-normalizer-3.3.2 configobj-5.0.8 cryptography-42.0.7 idna-3.7 importlib-metadata-7.1.0 josepy-1.14.0 parsedatetime-2.6 pycparser-2.22 pyrfc3339-1.1 pytz-2024.1 requests-2.32.2 urllib3-2.2.1 zipp-3.19.0

which certbot
/usr/local/bin/certbot

/usr/local/bin/certbot --version
certbot 2.10.0