韩国、日本、香港、美国CN2独立服务器与VPS主机租用! 2 0 0 5 - 2 0 2 3 十 七 年 I D C 行 业 服 务 (Q Q:278550633)

同时安装v2-ui和Spug运维平台

环境:centos 7.6

安装顺序:1、v2-ui    2、Spug

1、安装v2-ui

#bash <(curl -Ls https://blog.sprov.xyz/v2-ui.sh)

全自动默认安装即可,如果无法访问,首先考虑防火墙问题,建议关闭防火墙即可,因为v2-ui添加账号每次需要建立新的端口。

centos7.6关闭防火墙并取消开启启动命令。如果运行后没有任何提示,需要安装

#yum install -y bash

#yum install -y curl

#systemctl stop firewalld.service

#systemctl disable firewalld.service

2、安装Spug

#cat /etc/redhat-release

#yum install docker

#systemctl start docker

#docker pull registry.aliyuncs.com/openspug/spug

#docker run -d --restart=always --name=spug -p 80:80 -v /mydata/:/data registry.aliyuncs.com/openspug/spug

#docker exec spug init_spug admin spug.dev

#docker restart spug

#systemctl enable docker


安装Spug第二步命令(上面绿色命令)

以下适合centos 7.8 / 7.9 版本

//*查看系统版本

#cat /etc/redhat-release

//*安装必要的系统工具

#sudo yum install -y yum-utils device-mapper-persistent-data lvm2

//*添加docker软件源

#sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

//*更新yum缓存

#sudo yum makecache fast

//*查看可用的docker版本

#yum list docker-ce --showduplicates | sort -r

//*更新yum索引

#yum makecache fast

//*安装指定的版本

#sudo yum install -y docker-ce-17.03.2.ce-1.el7.centos

//*报错:如果在安装指定版本的docker时显示需要安装指定版本的docker-ce-selinux依赖包,请安装: 

#yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm

继续从第三步开启docker命令执行安装。

备注:
a.如果安装镜像 registry.aliyuncs.com/openspug/spug不可用,可以使用官方镜像地址 openspug/spug

b.账户禁用问题(启用命令)

# docker exec spug python3 /data/spug/spug_api/manage.py user enable -u admin

c.重置密码

#docker exec spug python3 /data/spug/spug_api/manage.py user reset -u admin -p 111111

d.如需更换ip,则直接修改,然后重启主机即可。

参考文档:

https://blog.sprov.xyz/2019/08/03/v2-ui/

https://www.spug.dev/docs/install-docker/

https://www.cnblogs.com/harlanzhang/p/9965534.html

作者:safeidc 分类:Linux技术文档 浏览:721 评论:0