hawkeye安装

hawkeye安装

Docker方式部署Github监控系统Hawkeye
依赖
Python 3.x
MongoDB >= 3.x
Flask

创建python3依赖包
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel libffi-devel
安装
yum install python3
python3安装完成
阿里镜像安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
执行后会在/etc/yum.repos.d/目录生成一个docker-ce.repo文件
yum-config-manager —add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
默认安装是最新版本
yum install docker-ce
安装mongodb
新建
vim /etc/yum.repos.d/mongodb-org-4.0.repo
添加:
[mongodb-org-4.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.0.asc

yum -y install mongodb-org
service mongod start
修改配置
vim /etc/mongod.conf
bindIp: 127.0.0.1,172.17.0.1(是自己docker ip)
重启mongodb
service mongod restart
1、拉取docker
docker pull daocloud.io/0xbug/hawkeye
启动镜像
无认证
docker run -ti -p 80:80 -e MONGODB_URI=mongodb://172.17.0.1:27017 -d daocloud.io/0xbug/hawkeye

有认证
#docker run -ti -p 80:80 -e MONGODB_URI=mongodb://username:password@172.17.0.1:27017/hawkeye -e MONGODB_USER= -e MONGODB_PASSWORD= -d daocloud.io/0xbug/hawkeye