Yêu cầu hệ thống
| Thành phần | Yêu cầu |
|---|---|
| Quyền | Administrator/root để cài đặt service |
| Mạng | Internet (nếu dùng Registry) |
| Disk | 100MB free space |
| RAM | 512MB |
Theo nền tảng
| Nền tảng | OS | Architecture | Ghi chú |
|---|---|---|---|
| Windows | Windows 10/11 hoặc Server 2016+ | x64 | PowerShell 5.1+ |
| Linux | Ubuntu 18.04+, CentOS 7+, RHEL 7+, Debian 9+, Alpine 3.8+ | x86_64, ARM64 | systemd khuyến nghị |
Cài đặt trên Windows
Bước 1: Tạo thư mục và copy binary
powershell
# Tạo thư mục
New-Item -ItemType Directory -Path "C:\Program Files\BlackHoleAgent" -Force
# Copy binary
Copy-Item "blackhole-agt.exe" -Destination "C:\Program Files\BlackHoleAgent\blackhole-agt.exe"Bước 2: Cài đặt và khởi động service
powershell
cd "C:\Program Files\BlackHoleAgent"
# Cài đặt service
.\blackhole-agt.exe service install
# Khởi động service
.\blackhole-agt.exe service startXác minh
powershell
# Kiểm tra trạng thái service
Get-Service -Name "blackhole-agt"
# Xem logs
Get-EventLog -LogName Application -Source "blackhole-agt" -Newest 10Cài đặt trên Linux
Bước 1: Chuẩn bị
bash
# Tạo user và thư mục
sudo useradd -r -s /bin/false blackhole-agent
sudo mkdir -p /opt/blackhole-agent /etc/blackhole-agent /var/log/blackhole-agent
# Copy binary và set quyền
sudo cp blackhole-agt-linux-x64 /opt/blackhole-agent/blackhole-agt
sudo chmod +x /opt/blackhole-agent/blackhole-agtBước 2: Cài đặt và khởi động service
bash
# Cài đặt service
sudo /opt/blackhole-agent/blackhole-agt service install
# Khởi động service
sudo /opt/blackhole-agent/blackhole-agt service startXác minh
bash
# Kiểm tra trạng thái
sudo /opt/blackhole-agent/blackhole-agt service status
# Xem logs
sudo journalctl -u blackhole-agt -fCấu hình ban đầu
Tạo cấu hình mẫu
bash
# Tạo cấu hình mẫu với tất cả sources/sinks
blackhole-agt configure sample --path config.ymlXác thực với Registry (tùy chọn)
bash
blackhole-agt auth --key "your-api-key-here"Gỡ cài đặt
Windows
powershell
.\blackhole-agt.exe service stop
.\blackhole-agt.exe service uninstall
Remove-Item -Recurse -Force "C:\Program Files\BlackHoleAgent"Linux
bash
sudo /opt/blackhole-agent/blackhole-agt service stop
sudo /opt/blackhole-agent/blackhole-agt service uninstall
sudo rm -rf /opt/blackhole-agent /etc/blackhole-agent /var/log/blackhole-agent
sudo userdel blackhole-agentKhắc phục sự cố
| Vấn đề | Nguyên nhân | Giải pháp |
|---|---|---|
| Service không khởi động | Thiếu quyền hoặc file không tồn tại | Kiểm tra quyền và đường dẫn file |
| "Access Denied" | Không có quyền administrator | Chạy PowerShell as Administrator |
| Binary không thực thi | Thiếu quyền execute | chmod +x /opt/blackhole-agent/blackhole-agt |
| Permission denied | User không có quyền truy cập | Kiểm tra ownership và permissions |
