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

推荐订阅源

T
Tenable Blog
博客园_首页
Vercel News
Vercel News
WordPress大学
WordPress大学
美团技术团队
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Y
Y Combinator Blog
博客园 - 【当耐特】
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
腾讯CDC
M
MIT News - Artificial intelligence
爱范儿
爱范儿
Recent Announcements
Recent Announcements
雷峰网
雷峰网
Last Week in AI
Last Week in AI
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
Jina AI
Jina AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
P
Privacy & Cybersecurity Law Blog
Recorded Future
Recorded Future
Help Net Security
Help Net Security
N
News and Events Feed by Topic
博客园 - Franky
P
Proofpoint News Feed
L
LINUX DO - 热门话题
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
月光博客
月光博客
D
Docker
Google DeepMind News
Google DeepMind News
有赞技术团队
有赞技术团队
IT之家
IT之家
Security Latest
Security Latest
L
LangChain Blog
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks

醉卧烟雨'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