Anubis提供基于Docker的标准部署方案,具体步骤如下:
1. 环境准备
- 安装Git工具:
sudo apt-get install git
- 安装Docker引擎:参考官方文档完成安装
- 验证环境:
git --version
和docker --version
应有正确输出
2. 获取代码
- 克隆仓库:
git clone https://github.com/TecharoHQ/anubis.git
- 进入目录:
cd anubis
3. 构建运行
- 构建镜像:
docker build -t anubis .
- 启动容器:
docker run -p 8080:8080 anubis
- 测试访问:通过
http://localhost:8080
验证
4. 高级配置
- 修改监听端口:
docker run -p 9000:8080 anubis --listen=http://0.0.0.0:9000
- 检查运行状态:
docker exec <容器ID> /app/bin/anubis --healthcheck
- 查看实时日志:
docker logs <容器ID>
本答案来源于文章《Anubis:通过工作量证明干扰AI爬虫抓取》