无法扫库问题

添加库后一直扫描卡在90%,查看日志发现是:

The configured user limit (8192) on the number of inotify watches has been reached, or the operating system failed to allocate a required resource.

查看系统用户的限制数量:

cat /proc/sys/fs/inotify/max_user_watches

默认8192

加大此值

echo 32768 > /proc/sys/fs/inotify/max_user_watches

Lets Encrypt证书

使用lets Encrypt可以创建免费证书,3个月,可自动续期。

安装:

curl https://get.acme.sh | sh -s email=my@example.com

生成证书
使用Dns api自动添加域名验证信息
export DP_Id="1234"

export DP_Key="sADDsdasdgdsf"

acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com

以后就可以
acme.sh --issue -d mydomain2.com --dns  dns_dp

复制证书
acme.sh --install-cert -d example.com \
--key-file       /path/to/keyfile/in/nginx/key.pem  \
--fullchain-file /path/to/fullchain/nginx/cert.pem \
--reloadcmd     "service nginx force-reload"

Nginx 的配置 ssl_certificate 使用 /etc/nginx/ssl/fullchain.cer ,而非 /etc/nginx/ssl/<domain>.cer ,否则 SSL Labs 的测试会报 Chain issues Incomplete 错误。

定时任务
crontab  -l

56 * * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null

群晖可使用webhook导入证书
需要使用帐号密码
./acme.sh --deploy --home . -d "abc.com" --deploy-hook synology_dsm

参考https://github.com/acmesh-official/acme.sh/wiki/Synology-NAS-Guide

https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E

ubuntu proxy

function set_proxy(){
export http_proxy="http://172.19.96.1:10812";
export https_proxy="http://172.19.96.1:10812";
export HTTP_PROXY="http://172.19.96.1:10812";
export HTTPS_PROXY="http://172.19.96.1:10812";
}
function unset_proxy(){
        unset http_proxy HTTP_PROXY https_proxy HTTPS_PROXY
        curl -s "https://ip.jackjyq.com" | grep -E -i "ip:|country:"
}

WSL安装docker

add-apt-repository “deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
$(lsb_release -cs) \
stable”
sudo apt-cache madison docker-ce
apt-get update
sudo apt-cache madison docker-ce
sudo apt-get install docker-ce docker-ce-cli containerd.io