2022年8月29日 星期一

Install certbot by snap

新的 certbot 要透過 snap 套件管理來安裝,而且不能裝在太舊的系統,要有 Python 3.6 以上
yum -y install snap
systemctl enable --now snapd.socket
ln -s /var/lib/snapd/snap /snap
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot

裝完後,參數就跟之前一樣了
certbot certonly --webroot -w /var/www/html -m your@email.com -d yourdomain.com -d www.yourdomain.com

2022年8月25日 星期四

SSH keep alive

某些情境防火牆有設定 session timeout,導致 SSH 在 idle 情況下無法長時間連線
所以就需要 SSH keep alive 設定,定期送個封包讓連線不致於 timeout
它可以設在 Client 端或 Server 端
Server 端在 /etc/ssh/sshd_config 設定 ClientAliveInterval
Client 端在 /etc/ssh/ssh_config 設定 ServerAliveInterval
單位是秒,這個值只要低於觀察到會斷線的時間即可

2022年8月2日 星期二

WSL Export and Import

Export
wsl --export <Distro> <FileName>
e.g.
wsl --export Ubuntu-20.04 C:\BAK\Ubuntu-20.04.tar

Import
wsl --import <Distro> <InstallLocation> <FileName>
e.g.
wsl --import Ubuntu-20.04 C:\WSL C:\BAK\Ubuntu-20.04.tar

Update ESXi to 8.0.3d using depot file

本例是從 8.0U3 升到 8.0U3d,若從更舊的版本升級,不確定是否適用 先把所有 VM 關機,進入維護模式 把 depot 升級檔 VMware-ESXi-8.0U3d-24585383-depot.zip 放到機器內 ssh ESXi 先查看 depot 有那些 Prof...