apt install certbot
python3 -m venv venv # 这个会提示你应该用什么命令,就是下面的,根据自己的python版本而不同
apt install python3.11-venv
mkdir -p /mnt/certbot
cd /mnt/certbot
python3 -m venv venv
source venv/bin/activate
pip install certbot certbot-nginx certbot-dns-aliyun
vi /mnt/certbot/credentials.ini
dns_aliyun_access_key = xxxxxxx
dns_aliyun_access_key_secret = yyyyyyyyy
chmod 600 /mnt/certbot/credentials.ini
certbot certonly --dns-aliyun-credentials credentials.ini -d example.cn -d *.example.cn