安装 opkg

群晖上没有 yum,apt 这样的包管理工具,只能使用 ipkg 和 opkg,ipkg 不维护了,很多包都太老了,所以我们使用 opkg。

sudo -i # 进入 root 用户
wget -O - http://bin.entware.net/x64-k3.2/installer/generic.sh | sh # 安装 opkg
​
opkg files <command> # 可以查看命令装在哪里

安装 wget

群晖默认带的 wget 不支持 https,使用的时候会报这样的错 wget`` HTTPS support not compiled in

sudo opkg remove wget
sudo opkg install wget-ssl

更新 openssl

群晖自带的 openssl 版本非常老,支持的协议有限,导致有些网站访问不了,比如报这样的错 wget`` penSSL: error:1407742E:``SSL`` routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

解决方案是升级 openssl。

opkg install libopenssl
opkg install openssl-util

安装 git

git 也很奇怪,我用 opkg install git 安装了一个,但是不会使用 http 协议,然后尝试了下面这个才可以。

opkg install git-http

使用 crontab

群晖的 crontab 也被改过了,要用下面的方式使用。

https://www.moewah.com/archives/1112.html

docker 换镜像源

编辑 /var/packages/ContainerManager/etc/dockerd.json

修改这个内容

"registry-mirrors":["https://dockerhub.azk8s.cn"]

然后执行下面的命令重启 docker

sudo systemctl restart pkg-ContainerManager-dockerd.service

docker 配置代理

dsm7.2
docker 本身走代理
mkdir -p /etc/systemd/system/pkg-ContainerManager-dockerd.service.d
touch /etc/systemd/system/pkg-ContainerManager-dockerd.service.d/http-proxy.conf
vim http-proxy.conf
​
[Service]
Environment="HTTP_PROXY=http://192.168.1.3:1088"
Environment="HTTPS_PROXY=http://192.168.1.3:1088"
Environment="NO_PROXY=localhost,127.0.0.1"
​
systemctl daemon-reload
systemctl restart pkg-ContainerManager-dockerd.service
systemctl show --property=Environment pkg-ContainerManager-dockerd.service #验证

群晖NAS内网速度测试

需要提前在内网的另一台机子上装好iperf3

1.SSH登录群晖NAS,并切换到管理员权限sudo -i

2.安装Diagnosis Toolsudo synogear install

3.运行/var/packages/DiagnosisTool/target/tool/iperf3 -c 192.168.188.1

群晖NAS外网速度测试

1.安装Diagnosis Toolsudo synogear install

2.运行:/var/packages/DiagnosisTool/target/tool/speedtest-cli.py

3.结果可以找到Download: 850.34 Mbit/s;Upload: 78.01 Mbit/s

群晖的Diagnosis Tool工具包

基本涵盖了常用的测试和监控工具

1. /var/packages/DiagnosisTool/target/tool/addr2name
2. /var/packages/DiagnosisTool/target/tool/arping
3. /var/packages/DiagnosisTool/target/tool/ash
4. /var/packages/DiagnosisTool/target/tool/bash
5. /var/packages/DiagnosisTool/target/tool/cifsiostat
6. /var/packages/DiagnosisTool/target/tool/clockdiff
7. /var/packages/DiagnosisTool/target/tool/dig
8. /var/packages/DiagnosisTool/target/tool/domain_test.sh
9. /var/packages/DiagnosisTool/target/tool/file
10. /var/packages/DiagnosisTool/target/tool/fix_idmap.sh
11. /var/packages/DiagnosisTool/target/tool/free
12. /var/packages/DiagnosisTool/target/tool/gcore
13. /var/packages/DiagnosisTool/target/tool/gdb
14. /var/packages/DiagnosisTool/target/tool/gdbserver
15. /var/packages/DiagnosisTool/target/tool/iftop
16. /var/packages/DiagnosisTool/target/tool/iostat
17. /var/packages/DiagnosisTool/target/tool/iotop
18. /var/packages/DiagnosisTool/target/tool/iperf
19. /var/packages/DiagnosisTool/target/tool/iperf3
20. /var/packages/DiagnosisTool/target/tool/kill
21. /var/packages/DiagnosisTool/target/tool/killall
22. /var/packages/DiagnosisTool/target/tool/ldd
23. /var/packages/DiagnosisTool/target/tool/lsof
24. /var/packages/DiagnosisTool/target/tool/ltrace
25. /var/packages/DiagnosisTool/target/tool/mpstat
26. /var/packages/DiagnosisTool/target/tool/name2addr
27. /var/packages/DiagnosisTool/target/tool/ncat
28. /var/packages/DiagnosisTool/target/tool/ndisc6
29. /var/packages/DiagnosisTool/target/tool/nethogs
30. /var/packages/DiagnosisTool/target/tool/nfsiostat-sysstat
31. /var/packages/DiagnosisTool/target/tool/nmap
32. /var/packages/DiagnosisTool/target/tool/nping
33. /var/packages/DiagnosisTool/target/tool/nslookup
34. /var/packages/DiagnosisTool/target/tool/perf-check.py
35. /var/packages/DiagnosisTool/target/tool/pgrep
36. /var/packages/DiagnosisTool/target/tool/pidof
37. /var/packages/DiagnosisTool/target/tool/pidstat
38. /var/packages/DiagnosisTool/target/tool/ping6
39. /var/packages/DiagnosisTool/target/tool/ping
40. /var/packages/DiagnosisTool/target/tool/pkill
41. /var/packages/DiagnosisTool/target/tool/pmap
42. /var/packages/DiagnosisTool/target/tool/ps
43. /var/packages/DiagnosisTool/target/tool/pstree
44. /var/packages/DiagnosisTool/target/tool/pwdx
45. /var/packages/DiagnosisTool/target/tool/rarpd
46. /var/packages/DiagnosisTool/target/tool/rdisc6
47. /var/packages/DiagnosisTool/target/tool/rdisc
48. /var/packages/DiagnosisTool/target/tool/rltraceroute6
49. /var/packages/DiagnosisTool/target/tool/sa1
50. /var/packages/DiagnosisTool/target/tool/sa2
51. /var/packages/DiagnosisTool/target/tool/sadc
52. /var/packages/DiagnosisTool/target/tool/sadf
53. /var/packages/DiagnosisTool/target/tool/sar
54. /var/packages/DiagnosisTool/target/tool/sh
55. /var/packages/DiagnosisTool/target/tool/sid2ugid.sh
56. /var/packages/DiagnosisTool/target/tool/slabtop
57. /var/packages/DiagnosisTool/target/tool/sockstat
58. /var/packages/DiagnosisTool/target/tool/speedtest-cli.py
59. /var/packages/DiagnosisTool/target/tool/strace
60. /var/packages/DiagnosisTool/target/tool/sysctl
61. /var/packages/DiagnosisTool/target/tool/sysstat
62. /var/packages/DiagnosisTool/target/tool/tcpdump
63. /var/packages/DiagnosisTool/target/tool/tcpdump_wrapper
64. /var/packages/DiagnosisTool/target/tool/tcpspray6
65. /var/packages/DiagnosisTool/target/tool/tcptraceroute6
66. /var/packages/DiagnosisTool/target/tool/telnet
67. /var/packages/DiagnosisTool/target/tool/tload
68. /var/packages/DiagnosisTool/target/tool/top
69. /var/packages/DiagnosisTool/target/tool/tracepath
70. /var/packages/DiagnosisTool/target/tool/traceroute6
71. /var/packages/DiagnosisTool/target/tool/tracert6
72. /var/packages/DiagnosisTool/target/tool/uptime
73. /var/packages/DiagnosisTool/target/tool/vmstat
74. /var/packages/DiagnosisTool/target/tool/w
75. /var/packages/DiagnosisTool/target/tool/watch
76. /var/packages/DiagnosisTool/target/tool/zblacklist
77. /var/packages/DiagnosisTool/target/tool/zmap
78. /var/packages/DiagnosisTool/target/tool/ztee


参考

NAS 入坑系列三、群晖基础配置

文章作者: 布丁布丁布
本文链接:
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 布丁の小窝
群晖
喜欢就支持一下吧
打赏
微信 微信
支付宝 支付宝