LetsEncryptのcertbotを新規インストールにおいて、いつの間にか、python3系が要求されるようになってたので、python3.6系へアップデートした際の備忘録です
たぶんデフォでは2.7系じゃなかったかと思われますw
yum install -y https://repo.ius.io/ius-release-el7.rpm
yum search python36
cd /usr/bin
ls | grep python
yum install python36 python36-pip
※下記はroot権限だと弾かれます
su ユーザー名
pip3.6 install –upgrade pip
pip3.6 install certbot
exit
which certbot
シンボリックリンク
ln -s /usr/local/bin/certbot /usr/bin/certbot
alias python=’/usr/bin/python3′
alias | grep python
python –version
cd /root
vim .bashrc
#下記の後に追記
# User specific aliases and functions
alias python=’/usr/bin/python3′
snapのインストール
yum install snapd
systemctl enable –now snapd.socket
ln -s /var/lib/snapd/snap /snap
snap install core
snap refresh core
systemctl restart snapd
systemctl status snapd
systemctl enable snapd
snap –version
snap install –classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
certbot –version
証明書作成コマンド
/var/lib/snapd/snap/bin/certbot certonly
もしくは
/snap/bin/certbot –nginx
※下記はapache版
/snap/bin/certbot –apache

コメント