全面启用https
vps上的kanboard、whoogle
群晖上的管理系统、typecho、syncthing
vps上的kanboard、whoogle
群晖上的管理系统、typecho、syncthing
1.替换自带的证书和密钥
ssh进群晖,切换到rootsudo -i
备份自带证书和密钥,代码中的volume1为套件所在的存储空间
mv /volume1/@appstore/syncthing/var/https-cert.pem /volume1/@appstore/syncthing/var/https-cert.pem.orgi
mv /volume1/@appstore/syncthing/var/https-key.pem /volume1/@appstore/syncthing/var/https-key.pem.orgi
拷入新证书和密钥。这两个文件在域名注册商哪里申请来的ssl证书包里。
cp PATH_TO_FILE/DOMAIN.csr /volume1/@appstore/syncthing/var/https-cert.pem
cp PATH_TO_FILE/DOMAIN.key /volume1/@appstore/syncthing/var/https-key.pem
设置权限
chown sc-syncthing:syncthing /volume1/@appstore/syncthing/var/https-cert.pem
chown sc-syncthing:syncthing /volume1/@appstore/syncthing/var/https-key.pem
chmod +r /volume1/@appstore/syncthing/var/https-cert.pem
chmod +r /volume1/@appstore/syncthing/var/https-key.pem
2.web页面勾选加密连接
3.重启syncthing套件生效
备注:
这样设置后,内网中再用“ip+端口”的方式访问时也会重定向到https页面,浏览器提示证书问题,需要手动确认接受风险。
中科大镜像,下载iso测试速度最快,接近Gbps,但没软件源;
http://mirrors.ustc.edu.cn/kde-application/neon/images/
北京外国语大学镜像,下载iso测试速度适中,约500Mps,有软件源;
https://mirrors.bfsu.edu.cn/kde-neon/
南京大学镜像,下载iso最慢,约100Mbps,有软件源。
https://mirrors.nju.edu.cn/kde-neon/
最近工作上同时推进的项目比较多,有些跟踪不过来,特别是不同的项目进展的程度也不一样,简单纸笔工具也不直观。
想起之前用过看板系统,比较适合这种情况。
但试用的几款要么部署太复杂、要么功能太简单,还有些在线的数据全在缓存里,数据很容易丢。
最终选定了kanboard。
kanboard仅依赖php,单人使用的话数据库可以用sqlite,只要db目录有写入权限就行了。
kanboard banner
为了避免再折腾域名、端口啥的,直接丢到typecho目录下,通过子目录访问就行了,群晖管理页面再给http组配置上data目录的写入权限。
齐活!
浏览器访问,duang,一个大错误提示,“只支持php 7.2以上”。
再跑到群晖后台,安装php7.4;webStation中给这个虚拟主机配置使用php 7.4。
再重新访问,OK了
用了两天,确实不错。
又发现了子任务的故障,新建子任务没问题,但是一点击开始子任务或者完成子任务,就提示数据库错误。
Internal Error: SQL Error: SQLSTATE[HY000]: General error: 1 no such
table: main.task_has_subtasks #4858
搜索了一番,原来是老早就有的问题,貌似子任务表结构设计的有问题,issue里也给了解决方案。
把数据库文件拿到本地,用sqlite管理工具运行修复脚本,把修复好的数据库再放回去覆盖即可。
管理工具:sqlite-tools-win32-x86-3360000.zip
修复脚本保存为fix.sql
ALTER TABLE subtask_time_tracking RENAME TO subtask_time_tracking_old;
CREATE TABLE subtask_time_tracking (
"id" INTEGER,
"user_id" INTEGER NOT NULL,
"subtask_id" INTEGER NOT NULL,
"start" INTEGER DEFAULT 0,
"end" INTEGER DEFAULT 0,
"time_spent" REAL DEFAULT 0,
FOREIGN KEY("user_id") REFERENCES "users"("id") ON DELETE CASCADE,
FOREIGN KEY("subtask_id") REFERENCES "subtasks"("id") ON DELETE CASCADE
);
INSERT INTO subtask_time_tracking SELECT * FROM subtask_time_tracking_old;
运行过程:
sqlite3.exe db.slite
.read fix.sql
启用插件:
`chmown www-data:www-data plugins`
header.php文件,在
标签内添加以下代码:<link rel="shortcut icon" href="/usr/themes/default/favicon.ico" type="image/x-icon" />
https://github.com/benbusby/whoogle-search
安装:
sudo pip install whoogle-search
启动文件/lib/systemd/system/whoogle.service
[Unit]
Description=Whoogle
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory={whoogle-search所在目录}
ExecStart={whoogle-search路径} --host 127.0.0.1 --port 5000 --userpass {访问用户名:密码}
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
启动&自启动
systemctl start whoogle
systemctl enable whoogle
nginx反代
nginx虚拟服务器设置
server {
server_name 子域名;
location / {
proxy_pass 目标URL;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
重启nginx,设置https
systemctl restart nginx
certbot --nginx
miui的analytics服务卸载之后,重启会自动安装,用冻结最方便
adb shell pm disable-user com.miui.analytics
常用的就那么几个,其他大部分可以手机上操作删除了:
adb shell pm uninstall --user 0 com.miui.systemAdSolution # 小米系统广告解决方案,必删
adb shell pm uninstall --user 0 com.baidu.input_mi # 百度输入法小米版
adb shell pm uninstall --user 0 com.iflytek.inputmethod.miui # 讯飞输入法小米版
adb shell pm uninstall --user 0 com.sohu.inputmethod.sogou.xiaomi # 搜狗输入法小米版
adb shell pm uninstall --user 0 com.android.browser # 小米浏览器,用x浏览器替代
adb shell pm uninstall --user 0 com.android.quicksearchbox # 小米桌面搜索框
#!/bin/bash echo "===========================系统精简开始===========================" # 一定要先退出"纯净模式",否则卸载后无法退出 adb kill-server adb devices # 所附设备列表 # 7HX0219928032887 device # 卸载预置应用包 # MIUI 相关 adb shell pm uninstall --user 0 com.miui.accessibility # 小米闻声 adb shell pm uninstall --user 0 com.miui.analytics # 小米广告分析,必删(重启会自动安装) adb shell pm uninstall --user 0 com.miui.aod # 万象息屏 adb shell pm uninstall --user 0 com.miui.audiomonitor # 小米录音 adb shell pm uninstall --user 0 com.miui.bugreport # 用户反馈 adb shell pm uninstall --user 0 com.miui.cit # CIT手机测试 adb shell pm uninstall --user 0 com.miui.cleanmaster # 清理垃圾 adb shell pm uninstall --user 0 com.miui.compass # 小米指南针 adb shell pm uninstall --user 0 com.miui.contentcatcher # 应用程序扩展服务 adb shell pm uninstall --user 0 com.miui.contentextension # 传送门 adb shell pm uninstall --user 0 com.miui.easygo # EasyGo adb shell pm uninstall --user 0 com.miui.freeform # 自由窗口 adb shell pm uninstall --user 0 com.miui.huanji # 小米换机 adb shell pm uninstall --user 0 com.miui.hybrid # 快应用服务框架 adb shell pm uninstall --user 0 com.miui.hybrid.accessory # 智慧生活 adb shell pm uninstall --user 0 com.miui.maintenancemode # 维修模式 adb shell pm uninstall --user 0 com.miui.miservice # 服务与反馈 adb shell pm uninstall --user 0 com.miui.mishare.connectivity # 小米互传 adb shell pm uninstall --user 0 com.miui.miwallpaper.earth # 地球超级壁纸 adb shell pm uninstall --user 0 com.miui.miwallpaper.geometry # 几何超级壁纸 adb shell pm uninstall --user 0 com.miui.miwallpaper.mars # 火星超级壁纸 adb shell pm uninstall --user 0 com.miui.miwallpaper.saturn # 土星超级壁纸 adb shell pm uninstall --user 0 com.miui.miwallpaper.snowmountain # 雪山超级壁纸(默认的,卸了也会更新) adb shell pm uninstall --user 0 com.miui.newhome # 内容中心 adb shell pm uninstall --user 0 com.miui.newmidrive # 小米云盘 adb shell pm uninstall --user 0 com.miui.nextpay # 小米支付 adb shell pm uninstall --user 0 com.miui.notes #小米笔记 adb shell pm uninstall --user 0 com.miui.securityadd # 游戏加速 adb shell pm uninstall --user 0 com.miui.smarttravel # 智能出行 adb shell pm uninstall --user 0 com.miui.systemAdSolution # 小米系统广告解决方案,必删 adb shell pm uninstall --user 0 com.miui.touchassistant # 悬浮球 adb shell pm uninstall --user 0 com.miui.thirdappassistant # 三方应用异常分析 adb shell pm uninstall --user 0 com.miui.tsmclient # 小米智能卡 adb shell pm uninstall --user 0 com.miui.virtualsim # 全球上网 adb shell pm uninstall --user 0 com.miui.voiceassist # 小爱同学 adb shell pm uninstall --user 0 com.miui.voicetrigger # 语音唤醒 adb shell pm uninstall --user 0 com.miui.weather2 # 小米天气 adb shell pm uninstall --user 0 com.miui.yellowpage # 生活黄页 adb shell pm uninstall --user 0 com.miui.personalassistant # 智能助理(负一屏) adb shell pm uninstall --user 0 com.miui.phrase # 常用语 adb shell pm uninstall --user 0 com.miui.translation.kingsoft # 金山翻译 adb shell pm uninstall --user 0 com.miui.translation.youdao # 有道翻译 adb shell pm uninstall --user 0 com.miui.translation.xmcloud # 小米云翻译 adb shell pm uninstall --user 0 com.miui.translationservice # 翻译服务 adb shell pm uninstall --user 0 com.miui.wmsvc # 不知道干啥的 # MIUI 云服务 adb shell pm uninstall --user 0 com.miui.cloudbackup # 小米云备份(卸载后无法进入设置中的小米云空间→桌面云备份) adb shell pm uninstall --user 0 com.miui.cloudservice # 小米云服务(卸载后无法进入设置中的小米云空间) adb shell pm uninstall --user 0 com.miui.micloudsync # 小米云同步 adb shell pm uninstall --user 0 com.miui.cloudservice.sysbase # 小米云服务系统基础 # Xiaomi 相关 adb shell pm uninstall --user 0 com.xiaomi.ab # 小米商城系统组件 adb shell pm uninstall --user 0 com.xiaomi.aiasst.service # AI虚拟助手 adb shell pm uninstall --user 0 com.xiaomi.aiasst.vision # AI虚拟助手 adb shell pm uninstall --user 0 com.xiaomi.drivemode # 驾车模式 adb shell pm uninstall --user 0 com.xiaomi.gamecenter # 游戏中心 adb shell pm uninstall --user 0 com.xiaomi.gamecenter.sdk.service # 游戏服务 adb shell pm uninstall --user 0 com.xiaomi.joyose # 运动计步 adb shell pm uninstall --user 0 com.xiaomi.jr # 天星金融 adb shell pm uninstall --user 0 com.xiaomi.macro # 自动连招 adb shell pm uninstall --user 0 com.xiaomi.mi_connect_service # 小米互传 adb shell pm uninstall --user 0 com.xiaomi.mibrain.speech # 小迷语音引擎 adb shell pm uninstall --user 0 com.xiaomi.migameservice # 游戏高能时刻 adb shell pm uninstall --user 0 com.xiaomi.mirror # MIUI+ Beta版 adb shell pm uninstall --user 0 com.xiaomi.payment # 米币支付 adb shell pm uninstall --user 0 com.xiaomi.shop # 小米商城 adb shell pm uninstall --user 0 com.xiaomi.mircs # RCS 增强短信 adb shell pm uninstall --user 0 com.xiaomi.mtb # Modem 测试工具 adb shell pm uninstall --user 0 com.xiaomi.simactivate.service # 小米 SIM 卡激活工具 adb shell pm uninstall --user 0 com.xiaomi.oobhelper # OOB Helper 不知道干什么的 adb shell pm uninstall --user 0 com.xiaomi.dtool # D Tool 不知道干什么的 adb shell pm uninstall --user 0 com.xiaomi.otrpbroker # OTRP 协议协商程序(物联网) adb shell pm install-existing --user 0 com.xiaomi.finddevice # 查找手机(关闭后无法打开设置中的云服务) adb shell pm install-existing --user 0 com.xiaomi.micloud.sdk # 小米云 SDK(关闭后无法打开设置) # 小米定制应用 adb shell pm uninstall --user 0 cn.wps.moffice_eng.xiaomi.lite # 小米文档查看器(WPS 定制) adb shell pm uninstall --user 0 com.baidu.input_mi # 百度输入法小米版 adb shell pm uninstall --user 0 com.iflytek.inputmethod.miui # 讯飞输入法小米版 adb shell pm uninstall --user 0 com.sohu.inputmethod.sogou.xiaomi # 搜狗输入法小米版 # 小米官方应用 adb shell pm uninstall --user 0 com.mfashiongallery.emag # 小米画报 adb shell pm uninstall --user 0 com.mi.health # 小米健康 adb shell pm uninstall --user 0 com.mi.liveassistant # 小米直播助手 adb shell pm uninstall --user 0 com.mipay.wallet # 小米钱包 # 第三方应用 adb shell pm uninstall --user 0 cn.wps.moffice_eng # WPS Office adb shell pm uninstall --user 0 com.achievo.vipshop # 唯品会 adb shell pm uninstall --user 0 com.baidu.searchbox # 百度搜索 adb shell pm uninstall --user 0 com.bsp.catchlog # CatchLog adb shell pm uninstall --user 0 com.dianping.v1 # 大众点评 adb shell pm uninstall --user 0 com.dragon.read # 番茄免费小说 adb shell pm uninstall --user 0 com.duokan.reader # 多看阅读 adb shell pm uninstall --user 0 com.eastmoney.android.berlin # 东方财富 adb shell pm uninstall --user 0 com.Qunar # 去哪儿旅行 adb shell pm uninstall --user 0 com.qxwz.ps.hpls # 千寻位置 adb shell pm uninstall --user 0 com.sina.weibo # 微博 adb shell pm uninstall --user 0 com.taobao.litetao # 淘宝特价版 adb shell pm uninstall --user 0 com.tencent.mtt # QQ 浏览器 adb shell pm uninstall --user 0 com.tianyancha.skyeye # 天眼查 adb shell pm uninstall --user 0 com.UCMobile # UI 浏览器 adb shell pm uninstall --user 0 com.xunmeng.pinduoduo # 拼多多 adb shell pm uninstall --user 0 ctrip.android.view # 携程旅行 adb shell pm uninstall --user 0 org.codeaurora.ims # IMS adb shell pm uninstall --user 0 tv.pps.mobile # 爱奇艺随刻 # Android 相关 adb shell pm uninstall --user 0 com.android.apps.tag # Tags adb shell pm uninstall --user 0 com.android.backupconfirm # 备份确认 adb shell pm uninstall --user 0 com.android.bips # 系统打印服务 adb shell pm uninstall --user 0 com.android.bookmarkprovider # Bookmark Provider adb shell pm uninstall --user 0 com.android.calendar # 日历 adb shell pm uninstall --user 0 com.android.calllogbackup # 自带通话记录备份 adb shell pm uninstall --user 0 com.android.captiveportallogin # 强制门户登录,测试 WiFi 连接(叹号就这里来的) adb shell pm uninstall --user 0 com.android.carrierdefaultapp # 运营商默认应用 adb shell pm uninstall --user 0 com.android.chrome # Chrome 浏览器 adb shell pm uninstall --user 0 com.android.companiondevicemanager # 配套设备管理器 adb shell pm uninstall --user 0 com.android.cts.ctsshim # 谷歌兼容性检查 adb shell pm uninstall --user 0 com.android.cts.priv.ctsshim # 谷歌兼容性检查 adb shell pm uninstall --user 0 com.android.deskclock # 时钟 adb shell pm uninstall --user 0 com.android.dreams.basic # 基本互动屏保 adb shell pm uninstall --user 0 com.android.email # 电子邮箱 adb shell pm uninstall --user 0 com.android.emergency # 急救信息 adb shell pm uninstall --user 0 com.android.externalstorage # 外部存储设备 adb shell pm uninstall --user 0 com.android.hbmsvmanager # 完全不知道这个是什么 adb shell pm uninstall --user 0 com.android.hotspot2.osulogin # OSU 登录 adb shell pm uninstall --user 0 com.android.hotwordenrollment.okgoogle # 谷歌助理 adb shell pm uninstall --user 0 com.android.hotwordenrollment.xgoogle # Google Assistant adb shell pm uninstall --user 0 com.android.htmlviewer # HTML 查看程序 adb shell pm uninstall --user 0 com.android.inputdevices # 输入设备 adb shell pm uninstall --user 0 com.android.localtransport # 本地传输 adb shell pm uninstall --user 0 com.android.managedprovisioning # 工作设置 adb shell pm uninstall --user 0 com.android.mms.service # MMS 短信服务 adb shell pm uninstall --user 0 com.android.mtp # MTP 主机 adb shell pm uninstall --user 0 com.android.musicfx # MusicFX adb shell pm uninstall --user 0 com.android.ons # 完全不知道这个是什么 adb shell pm uninstall --user 0 com.android.overlay.gmstelecomm # GMS 电信 adb shell pm uninstall --user 0 com.android.overlay.gmstelephony # GMS 电话通讯 adb shell pm uninstall --user 0 com.android.pacprocessor # PAC 进程(中国用不上) adb shell pm uninstall --user 0 com.android.printspooler # 打印处理服务 adb shell pm uninstall --user 0 com.android.protips # 主屏幕提示 adb shell pm uninstall --user 0 com.android.providers.blockednumber # 存储已屏蔽的号码 adb shell pm uninstall --user 0 com.android.providers.calendar # 日历存储 adb shell pm install-existing --user 0 com.android.providers.downloads # 内容下载管理器(禁用后小米应用商店无法下载安装) adb shell pm uninstall --user 0 com.android.providers.downloads.ui # 下载(Pixel禁用后第三方软件无法看到下载,MIUI 没事) adb shell pm uninstall --user 0 com.android.providers.partnerbookmarks # Bookmark Provider adb shell pm uninstall --user 0 com.android.providers.userdictionary # 用户词典 adb shell pm uninstall --user 0 com.android.proxyhandler # 代理处理器(禁用后无法使用 VPN 服务) adb shell pm uninstall --user 0 com.android.quicksearchbox # 搜索 adb shell pm uninstall --user 0 com.android.safetyregulatoryinfo # 安全和监管手册 adb shell pm uninstall --user 0 com.android.se # Secure Element Application adb shell pm uninstall --user 0 com.android.service.ims # Carrier Services adb shell pm uninstall --user 0 com.android.service.ims.presence # Presence adb shell pm uninstall --user 0 com.android.sharedstoragebackup # 共享存储备份13 adb shell pm uninstall --user 0 com.android.simappdialog # SIM App Dialog adb shell pm uninstall --user 0 com.android.statementservice # 配套设备管理器 adb shell pm uninstall --user 0 com.android.stk # SIM 卡应用 adb shell pm uninstall --user 0 com.android.systemui.plugin.globalactions.wallet # 完全不知道这个是什么 adb shell pm uninstall --user 0 com.android.timezone.updater # 时区更新程序 adb shell pm uninstall --user 0 com.android.traceur # 系统追踪(开发者调试用) adb shell pm uninstall --user 0 com.android.wallpaper.livepicker # 安卓壁纸 adb shell pm uninstall --user 0 com.android.wallpaperbackup # 安卓壁纸 adb shell pm uninstall --user 0 com.android.wallpapercropper # 安卓壁纸 # Android 导航相关 adb shell pm uninstall --user 0 com.android.internal.systemui.navbar.gestural adb shell pm uninstall --user 0 com.android.internal.systemui.navbar.gestural_extra_wide_back adb shell pm uninstall --user 0 com.android.internal.systemui.navbar.gestural_narrow_back adb shell pm uninstall --user 0 com.android.internal.systemui.navbar.gestural_wide_back adb shell pm uninstall --user 0 com.android.internal.systemui.navbar.threebutton # 三按钮导航
后悔药—恢复
adb shell cmd package install-existing <package.name>
来源:
https://www.chfse.com/archives/2423
https://blog.5a6c.me/posts/uninstall-pre-install-app-without-root/
迁移群晖后,装回Adminer套件的时候,发现这货原本就是个单文件的PHP文件,现在捆绑了一堆依赖。
还是自己去下载这个PHP文件,参考http://nas.leosutopia.xyz:8000/index.php/archives/148/直接部署。
成功: