/images/avatar.png

《清醒地活:超越自我的生命之旅》读书笔记

这里整理了阅读《清醒地活:超越自我的生命之旅》时的标注和笔记。

第15章 无条件的快乐之路

最高级的灵性之路是生活本身。如果你知道如何过好日常生活,生活就会变成一种解放的经历。但你必须先正确地走向生活,否则生活就会变得非常混乱。你得明白你这一生真的只有一个选择,不是关于你的事业,也不是关于你要和谁结婚,或者你要不要寻找神。人们往往苦于做出这许多的选择,但其实你可以把它们都抛在一旁,只做一个根本的选择:你想要快乐,还是不想要快乐?就是这么简单。一旦你做出了那个选择,你的人生道路就会变得清晰。

Kubernetes 集群安装

要了解有关 kubeadm 工具箱的一些详细信息,最好的方法是使用它来管理 k8s 集群。这包括整个生命周期管理:新安装 (HA)、扩容/缩容和升级。所有信息截至 2022 年 5 月均为最新。

Kubernetes (k3s) 证书过期

一些旧的 k3s 版本存在一个错误,导致证书自动续期失败。

kubectl --insecure-skip-tls-verify=true delete secret -n kube-system k3s-serving
stop k3s
remove/backup /var/lib/rancher/k3s/server/tls/dynamic-cert.json
remove/backup /etc/rancher/k3s/k3s.yaml
restart k3s

Nextcloud 升级后添加缺失的索引

升级 Nextcloud

  1. 删除除 /config/data 之外的所有其他文件夹(因为一次不成功的跨大版本升级)。
  2. 逐个升级大版本(不能跨两个大版本升级)。

关于缺失索引的系统警告

kubectl exec -it -n nextcloud nextcloud-6864c47cf4-58vrl -- /bin/sh
# sudo -u www-data php occ db:add-missing-indices
/bin/sh: 1: sudo: not found
# su www-data
This account is currently not available.
# id
uid=0(root) gid=0(root) groups=0(root),33(www-data)

# su www-data -s /bin/sh
$ php occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional size index to the filecache table, this can take some time...
Filecache table updated successfully.
Adding additional path index to the filecache table, this can take some time...
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Adding cards_abiduri index to the cards table, this can take some time...
cards table updated successfully.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Adding properties_pathonly_index index to the oc_properties table, this can take some time...
oc_properties table updated successfully.
Check indices of the oc_jobs table.
Adding job_lastcheck_reserved index to the oc_jobs table, this can take some time...
oc_properties table updated successfully.
$ exit
# exit