全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1726|回复: 1
打印 上一主题 下一主题

群晖dsm7安装哪吒监控 简易教程

[复制链接]
跳转到指定楼层
1#
发表于 2022-2-9 03:53:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 jhsyue 于 2022-2-9 03:57 编辑

研究了下 其实挺简单

dsm7的群晖 启动项管理 变成了 systemd

路径在 /usr/lib/systemd/system/

那么就简单了





  1. // ssh登陆群晖 然后切换成root

  2. sudo -s

  3. cd  /volume1/@apphome

  4. mkdir NezhaAgent

  5. // 这里得注意 下载你群晖对应架构的agent
  6. wget https://github.com/naiba/nezha/releases/download/v0.12.3/nezha-agent_linux_amd64.tar.gz

  7. tar -zxvf nezha-agent_linux_amd64.tar.gz
  8. chmod +x nezha-agent

  9. //下面就设置systemd脚本

  10. vim /usr/lib/systemd/system/nezha-agent.service


  11. [Unit]
  12. Description=Nezha Agent
  13. After=syslog.target
  14. #After=network.target
  15. #After=nezha-dashboard.service

  16. [Service]
  17. # Modify these two values and uncomment them if you have
  18. # repos with lots of files and get an HTTP error 500 because
  19. # of that
  20. ###
  21. #LimitMEMLOCK=infinity
  22. #LimitNOFILE=65535
  23. Type=simple
  24. User=root
  25. Group=root
  26. WorkingDirectory=/volume1/@apphome/NezhaAgent
  27. ExecStart=/volume1/@apphome/NezhaAgent/nezha-agent --report-delay 3 --disable-command-execute --skip-conn --skip-procs -s 你自己的服务器:443 -p 你自己的密钥 --tls
  28. Restart=always
  29. #Environment=DEBUG=true

  30. # Some distributions may not support these hardening directives. If you cannot start the service due
  31. # to an unknown option, comment out the ones not supported by your version of systemd.
  32. #ProtectSystem=full
  33. #PrivateDevices=yes
  34. #PrivateTmp=yes
  35. #NoNewPrivileges=true

  36. [Install]
  37. WantedBy=multi-user.target



  38. //然后启用就行了

  39. systemctl daemon-reload
  40. systemctl enable nezha-agent
  41. systemctl start nezha-agent

  42. // 看下状态

  43. systemctl status nezha-agent
复制代码


就这么简单
2#
发表于 2022-2-9 04:19:26 | 只看该作者
不好意思,鄙人看不懂
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-16 03:57 , Processed in 0.055346 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表