[root@izf9t76wjp0zs8z ~]# wget -O - https://get.acme.sh | sh --2019-03-09 15:17:22-- https://get.acme.sh/ Resolving get.acme.sh (get.acme.sh)... 144.217.161.63, 2607:5300:201:3100::5663 Connecting to get.acme.sh (get.acme.sh)|144.217.161.63|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 705 [text/plain] Saving to: ‘STDOUT’
100%[===========================================================================================================>] 705 --.-K/s in 0s
2019-03-09 15:17:24 (176 MB/s) - written to stdout [705/705]
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 171k 100 171k 0 0 10938 0 0:00:16 0:00:16 --:--:-- 45873 [Sat Mar 9 15:17:40 CST 2019] Installing from online archive. [Sat Mar 9 15:17:40 CST 2019] Downloading https://github.com/Neilpang/acme.sh/archive/master.tar.gz [Sat Mar 9 15:17:46 CST 2019] Extracting master.tar.gz [Sat Mar 9 15:17:46 CST 2019] It is recommended to install socat first. [Sat Mar 9 15:17:46 CST 2019] We use socat for standalone server if you use standalone mode. [Sat Mar 9 15:17:46 CST 2019] If you don't use standalone mode, just ignore this warning. [Sat Mar 9 15:17:46 CST 2019] Installing to /usr/local/acme.sh [Sat Mar 9 15:17:46 CST 2019] Installed to /usr/local/acme.sh/acme.sh [Sat Mar 9 15:17:46 CST 2019] Installing alias to '/root/.bashrc' [Sat Mar 9 15:17:46 CST 2019] OK, Close and reopen your terminal to start using acme.sh [Sat Mar 9 15:17:46 CST 2019] Installing alias to '/root/.cshrc' [Sat Mar 9 15:17:46 CST 2019] Installing alias to '/root/.tcshrc' [Sat Mar 9 15:17:46 CST 2019] Installing cron job 57 0 * * * "/usr/local/acme.sh"/acme.sh --cron --home "/usr/local/acme.sh" > /dev/null [Sat Mar 9 15:17:46 CST 2019] Good, bash is found, so change the shebang to use bash as preferred. [Sat Mar 9 15:17:46 CST 2019] OK [Sat Mar 9 15:17:46 CST 2019] Install success! [root@izf9t76wjp0zs8z ~]# export Ali_Key="4xvxbCThnjerg955" [root@izf9t76wjp0zs8z ~]# export Ali_Secret="fwyhkkp0" [root@izf9t76wjp0zs8z ~]# acme.sh --issue --dns dns_ali -d *.peakchao.com [Sat Mar 9 15:19:42 CST 2019] Creating domain key [Sat Mar 9 15:19:43 CST 2019] The domain key is here: /usr/local/nginx/conf/ssl/*.peakchao.com/*.peakchao.com.key [Sat Mar 9 15:19:43 CST 2019] Single domain='*.peakchao.com' [Sat Mar 9 15:19:43 CST 2019] Getting domain auth token for each domain [Sat Mar 9 15:19:46 CST 2019] Getting webroot for domain='*.peakchao.com' [Sat Mar 9 15:19:46 CST 2019] Found domain api file: /usr/local/acme.sh/dnsapi/dns_ali.sh [Sat Mar 9 15:19:49 CST 2019] Let's check each dns records now. Sleep 20 seconds first. [Sat Mar 9 15:20:10 CST 2019] Checking peakchao.com for _acme-challenge.peakchao.com [Sat Mar 9 15:20:11 CST 2019] Domain peakchao.com '_acme-challenge.peakchao.com' success. [Sat Mar 9 15:20:11 CST 2019] All success, let's return [Sat Mar 9 15:20:11 CST 2019] Verifying: *.peakchao.com [Sat Mar 9 15:20:15 CST 2019] Success [Sat Mar 9 15:20:15 CST 2019] Removing DNS records. [Sat Mar 9 15:20:19 CST 2019] Verify finished, start to sign. [Sat Mar 9 15:20:19 CST 2019] Lets finalize the order, Le_OrderFinalize: https://acme-v02.api.letsencrypt.org/acme/finalize/48893963/348010849 [Sat Mar 9 15:20:21 CST 2019] Download cert, Le_LinkCert: https://acme-v02.api.letsencrypt.org/acme/cert/0325e2883ade3b454bcf95c37c112b884689 [Sat Mar 9 15:20:23 CST 2019] Cert success. -----BEGIN CERTIFICATE----- MIIFVTCCBD2gAwIBAgISAyXiiDreO0VLz5XDfBEriEaJMA0GCSqGSIb3DQEBCwUA MEoxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MSMwIQYDVQQD ExpMZXQncyBFbmNyeXB0IEF1dGhvcml0eSBYMzAeFw0xOTAzMDkwNjIwMjBaFw0x OTA2MDcwNjIwMjBaMBkxFzAVBgNVBAMMDioucGVha2NoYW8uY29tMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8A -----END CERTIFICATE----- [Sat Mar 9 15:20:23 CST 2019] Your cert is in /usr/local/nginx/conf/ssl/*.peakchao.com/*.peakchao.com.cer [Sat Mar 9 15:20:23 CST 2019] Your cert key is in /usr/local/nginx/conf/ssl/*.peakchao.com/*.peakchao.com.key [Sat Mar 9 15:20:23 CST 2019] The intermediate CA cert is in /usr/local/nginx/conf/ssl/*.peakchao.com/ca.cer [Sat Mar 9 15:20:23 CST 2019] And the full chain certs is there: /usr/local/nginx/conf/ssl/*.peakchao.com/fullchain.cer
0x01 lnmp自动续期
1 2 3 4 5 6 7
# 请填写实际key&Secret export Ali_Key="4xvxbCThnjerg955" export Ali_Secret="fwyhkkp0" # 执行此命令后按下图配置 lnmp dnsssl ali 或 lnmp dns ali # 最后请不要忘记修改nginx配置以及重启
Skipping bootstrap because certbot-auto is deprecated on this system. Your system is not supported by certbot-auto anymore. Certbot cannot be installed. Please visit https://certbot.eff.org/ to check for other alternatives.
If you have any Certbot packages installed using an OS package manager like apt, dnf, or yum, you should remove them before installing the Certbot snap to ensure that when you run the command certbot the snap is used rather than the installation from your OS package manager. The exact command to do this depends on your OS, but common examples are sudo apt-get remove certbot, sudo dnf remove certbot, or sudo yum remove certbot. If you previously used Certbot through the certbot-auto script, you should also remove its installation by following the instructions here.