开源自动化运维平台spug搭建
参考链接: https://www.csdn.net/tags/MtzaAg4sODI2OS1ibG9n.html
1.安装docker
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum -y install docker-ce
systemctl enable docker
systemctl start docker
查看状态
systemctl status docker
● docker.service – Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2022-07-29 10:21:59 CST; 19s ago
配置镜像下载加速器
vi /etc/docker/daemon.json
{
"graph": "/data/docker",
"insecure-registries":["https://b9pmyelo.mirror.aliyuncs.com"]
}
systemctl restart docker
2.安装自动化运维平台spug
docker pull registry.aliyuncs.com/openspug/spug
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.aliyuncs.com/openspug/spug latest a6a4856a9f3b 9 days ago 698MB
docker run -d --restart=always --name=spug -p 80:80 registry.aliyuncs.com/openspug/spug
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
049dbb936872 registry.aliyuncs.com/openspug/spug “/entrypoint.sh” 16 seconds ago Up 14 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp spug
netstat -anput |grep 80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 8460/docker-proxy
tcp6 0 0 :::80 :::* LISTEN 8466/docker-proxy
以下操作会创建一个用户名为 admin 密码为 spug.dev 的管理员账户,可自行替换管理员账户:
docker exec spug init_spug admin spug.dev
docker restart spug
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
049dbb936872 registry.aliyuncs.com/openspug/spug “/entrypoint.sh” 3 minutes ago Up 27 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp spug
浏览器访问: http://192.168.38.128/
用户名: admin 密码: spug.dev