雨林的Blog

Caddy一键安装,卸载及操作命令

Caddy一键安装,卸载及操作命令

Caddy一键包

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh
#备用地址
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh

如果想要安装其他扩展可以把名字加到命令后面(bash caddy_install.sh install xxx,xxx,xxx,扩展列表点击查看

使用说明

启动:/etc/init.d/caddy start
停止:/etc/init.d/caddy stop
重启:/etc/init.d/caddy restart
查看状态:/etc/init.d/caddy status
查看Caddy启动日志:tail -f /tmp/caddy.log

安装目录:/usr/local/caddy
Caddy配置文件位置:/usr/local/caddy/Caddyfile
Caddy自动申请SSL证书位置:/.caddy/acme/acme-v01.api.letsencrypt.org/sites/xxx.xxx(域名)/

升级Caddy或者更新扩展

只需要重新执行你当初安装时候用的命令即可,会覆盖安装最新的Caddy+扩展。

卸载Caddy

执行以下代码,会问你是否确定要卸载 Caddy,输入y即可。卸载 Caddy 会把Caddy的所有虚拟主机文件夹和配置文件删除!

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/caddy_install.sh && bash caddy_install.sh uninstall
#备用地址
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && bash caddy_install.sh uninstall

https://www.moerats.com/archives/404/

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »