$ sudo sh -c 'curl https://get.acme.sh | sh' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1032 0 1032 0 0 2181 0 --:--:-- --:--:-- --:--:-- 2186 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 218k 100 218k 0 0 275k 0 --:--:-- --:--:-- --:--:-- 275k [Mon Apr 29 01:26:37 AM UTC 2024] Installing from online archive. [Mon Apr 29 01:26:37 AM UTC 2024] Downloading https://github.com/acmesh-official/acme.sh/archive/master.tar.gz [Mon Apr 29 01:26:38 AM UTC 2024] Extracting master.tar.gz [Mon Apr 29 01:26:38 AM UTC 2024] Installing to /root/.acme.sh [Mon Apr 29 01:26:38 AM UTC 2024] Installed to /root/.acme.sh/acme.sh [Mon Apr 29 01:26:38 AM UTC 2024] Installing alias to '/root/.bashrc' [Mon Apr 29 01:26:38 AM UTC 2024] OK, Close and reopen your terminal to start using acme.sh [Mon Apr 29 01:26:38 AM UTC 2024] Installing cron job no crontab for root no crontab for root [Mon Apr 29 01:26:38 AM UTC 2024] Good, bash is found, so change the shebang to use bash as preferred. [Mon Apr 29 01:26:39 AM UTC 2024] OK [Mon Apr 29 01:26:39 AM UTC 2024] Install success!
[Mon Apr 29 09:13:49 AM CST 2024] Standalone mode server [Mon Apr 29 09:13:53 AM CST 2024] Processing, The CA is processing your order, please just wait. (1/30) [Mon Apr 29 09:13:57 AM CST 2024] Pending, The CA is processing your order, please just wait. (2/30) ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... [Mon Apr 29 09:16:12 AM CST 2024] Pending, The CA is processing your order, please just wait. (29/30) [Mon Apr 29 09:16:17 AM CST 2024] acme.tufau.com:Timeout [Mon Apr 29 09:16:17 AM CST 2024] Please add '--debug' or '--log' to check more details. [Mon Apr 29 09:16:17 AM CST 2024] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
在有运行 web 服务的情况下申请证书
这种适用于服务器已经安装了 web 服务的情况,即:如果你的服务器已经部署了网站环境。acme 会自动在网站的根目录下放置一个文件,通过访问该文件来验证域名的所有权。注意替换路径为你的网站根目录的绝对路径