准备工作
安装各种必备依赖
apt update
apt upgrade -y
apt install -y curl bash wget unzip tar sudo vim
必要步骤:遵照网友Riiina的教程为机器添加warp的ipv4代理出口
安装哪吒agent
第一步最后会报错,不用管他
proxychains4 curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent aaa.com 5555 111111111111111111
proxychains4 wget -t 2 -T 10 -O nezha-agent_linux_amd64.zip https://github.com/nezhahq/agent/releases/download/v0.15.15/nezha-agent_linux_amd64.zip >/dev/null 2>&1
unzip -qo nezha-agent_linux_amd64.zip
mv nezha-agent /opt/nezha/agent
chmod +x /opt/nezha/agent
proxychains4 wget https://raw.githubusercontent.com/naiba/nezha/master/script/nezha-agent.service
mv nezha-agent.service /etc/systemd/system
配置nezha-agent.service
所有汉字部分需要改成你对应的配置
vim /etc/systemd/system/nezha-agent.service
dashboard为纯ipv4的修改为
[Unit]
Description=Nezha Agent
After=syslog.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/nezha/agent/
ExecStart=/opt/nezha/agent/nezha-agent -s 哪吒dashboard的裸奔地址:哪吒通讯端口 -p 密钥
Restart=always
Environment="https_proxy=socks5://127.0.0.1:准备工作Riiina的教程里的socks5本地监听端口"
Environment="http_proxy=socks5://127.0.0.1:准备工作Riiina的教程里的socks5本地监听端口"
[Install]
WantedBy=multi-user.target
dashboard为ipv4+ipv6双栈或纯ipv6的修改为
[Unit]
Description=Nezha Agent
After=syslog.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/opt/nezha/agent/
ExecStart=/opt/nezha/agent/nezha-agent -s 哪吒dashboard的裸奔地址:哪吒通讯端口 -p 密钥
Restart=always
[Install]
WantedBy=multi-user.target
运行哪吒agent,一切搞定
systemctl enable nezha-agent.service
systemctl start nezha-agent.service