功夫不负有心人,用了一天的时间终于搭建好了,分享出来以免大家踩坑。
(一)服务器配置
笔者使用阿里云ECS学生机搭建,选择Linux 下的CentOS 7.7 64位服务器
(二)系统环境配置
更新yum
yum update
安装必要包
yum install -y yum-utils device-mapper-persistent-data lvm2 bind-utils git
设置yum源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.rep
这里使用docker-ce 19.0.8,因为不在yum安装列表中,笔者手动下载安装
wget https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpmwgethttps://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-19.03.8-3.el7.x86_64.rpmwgethttps://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.8-3.el7.x86_64.rpmyum -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.13-3.2.el7.x86_64.rpmyum -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-cli-19.03.8-3.el7.x86_64.rpmyum -y install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-19.03.8-3.el7.x86_64.rpm
启动并加入启动项
sudo systemctl start dockersudo systemctl enable docker
验证安装
docker version
安装python-pip
yum -y install epel-releaseyum -y install python-pip
检验
pip -V
对安装的pip进行升级
pip install --upgrade pip
安装编译工具
yum install gcc libffi-devel python-devel openssl-devel -y
安装docker-compose 1.25.5
pip install docker-compose
验证
docker-compose --version
拉取镜像会很慢,直接用阿里云的镜像加速器
sudo mkdir -p /etc/dockersudo tee /etc/docker/daemon.json <{ "registry-mirrors": ["https://zoy3cvcn.mirror.aliyuncs.com"]}EOFsudo systemctl daemon-reloadsudo systemctl restart docker
(三)平台安装启动
H1ve源码Github地址
https://github.com/D0g3-Lab/H1ve.git
为了加快速度我拖到了自己Gitee码云上
git clone https://gitee.com/songjialin1221/H1ve.git
进入目录
cd H1ve
※这里还有一个地方需要改动:
在H1ve目录下的single.yml 第37行,将mariadb版本改成10.4.12
image: mariadb:10.4.12
最后使用docker-compose 启动平台
docker-compose -f single.yml up
大功告成!
鸣谢|Sharun Nigacat
参考文章:
https://github.com/D0g3-Lab/H1ve
https://xz.aliyun.com/t/6889
https://blog.csdn.net/qq_43431158/article/details/104507751
https://blog.csdn.net/yulei_qq/article/details/89021817
https://cr.console.aliyun.com/cn-beijing/instances/mirrors
https://download.docker.com/linux/centos/7/x86_64/stable/Packages/
https://github.com/D0g3-Lab/H1ve/issues/27
![b6769f078cc6823c99d6db1baaf43122.png](https://i-blog.csdnimg.cn/blog_migrate/f8c76f10f00c846360f6bd92979b84af.png)
![dbffe15797d41d132c62b21fb2523e05.gif](https://i-blog.csdnimg.cn/blog_migrate/999caa75d816c249cb1a410818df7e50.gif)