惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Spread Privacy
Spread Privacy
V
Visual Studio Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
Apple Machine Learning Research
Apple Machine Learning Research
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
Recent Announcements
Recent Announcements
V
V2EX
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
V
Vulnerabilities – Threatpost
C
Check Point Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
AI
AI
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
量子位
Attack and Defense Labs
Attack and Defense Labs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
CERT Recently Published Vulnerability Notes
腾讯CDC
Latest news
Latest news
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
Blog — PlanetScale
Blog — PlanetScale
博客园_首页
美团技术团队
The Cloudflare Blog
T
Tenable Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
SecWiki News
SecWiki News
Webroot Blog
Webroot Blog
N
News | PayPal Newsroom
博客园 - 叶小钗
博客园 - Franky

醉卧烟雨's Blog

腾讯dd Linux – 醉卧烟雨's Blog RealtekAudioControl_1.51.328 – 醉卧烟雨's Blog Debian12/11/10 一键开启BBR – 醉卧烟雨's Blog 国内小鸡可用的BBR一键脚本 – 醉卧烟雨's Blog
国内服务器安装哪吒监控 – 醉卧烟雨's Blog
P4n21m4 · 2025-04-29 · via 醉卧烟雨's Blog

下载 agent

x86架构,应下载 nezha-agent_linux_amd64.zip
arm架构,应下载 nezha-agent_linux_arm64.zip

从 https://github.com/nezhahq/agent/releases 下载 nezha-agent 并上传到国内服务器,使用 unzip 解压,将二进制文件放到 /opt/nezha/agent

这里可以使用反代加速 github,在国内机上直接下载,参考步骤如下(请自行确认反代地址、agent 版本号和平台)

mkdir /opt/nezha/agent -p
cd /opt/nezha/agent
wget https://github.com/nezhahq/agent/releases/download/v0.15.19/nezha-agent_linux_amd64.zip
unzip nezha-agent_linux_amd64.zip
chmod +x nezha-agent

配置 systemd

vim /etc/systemd/system/nezha-agent.service

创建 /etc/systemd/system/nezha-agent.service 文件,填入以下代码

自行修改代码中的 -s IP地址/域名:5555 -p 密钥部分

注意:如果国内机只有 IPv6 可访问到面板服务器,必须为面板服务器的域名添加 AAAA IPv6 记录(面板服务器可套 WARP 获取 IPv6)

[Unit]
Description=Nezha Agent
After=syslog.target
#After=network.target
#After=nezha-dashboard.service

[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
Type=simple
User=root
Group=root
WorkingDirectory=/opt/nezha/agent/
ExecStart=/opt/nezha/agent/nezha-agent -s IP地址/域名:5555 -p 密钥
Restart=always
#Environment=DEBUG=true

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

[Install]
WantedBy=multi-user.target

以上完成后,即可配置 agent 开机自启

systemctl daemon-reload
systemctl enable nezha-agent
systemctl restart nezha-agent