当前位置:   article > 正文

项目搭建(二)Linux上搭建meterSphere_metersphere docker

metersphere docker


(做个笔记,自己以后忘了方便查找,会持续更新…)
(支持转载,但请注明出处,一经发现必究,一个是方便其他道友沟通交流,碰到问题也好来找我,另一个是讨厌不尊重他人成果的行为)

一、安装Docker

参考官方安装:https://www.runoob.com/docker/centos-docker-install.html
如果曾经安装过docker,但docker不能正常使用,建议先彻底卸载docker:

yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
rm -rf /etc/systemd/system/docker.service.d
rm -rf /var/lib/docker
rm -rf /var/run/docker
  • 1
  • 2
  • 3

1、安装Docker

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
  • 1
[root@localhost base]# curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
# Executing docker install script, commit: 93d2499759296ac1f9c510605fef85052a2c32be
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c 'yum install -y -q yum-utils'
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
+ sh -c 'yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo'
Loaded plugins: fastestmirror, langpacks
adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
+ '[' stable '!=' stable ']'
+ sh -c 'yum makecache'
Loaded plugins: fastestmirror, langpacks
base                                                                                                                                                                 | 3.6 kB  00:00:00
docker-ce-stable                                                                                                                                                     | 3.5 kB  00:00:00
extras                                                                                                                                                               | 2.9 kB  00:00:00
updates                                                                                                                                                              | 2.9 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Metadata Cache Created
+ '[' -n '' ']'
+ sh -c 'yum install -y -q docker-ce'
+ version_gte 20.10
+ '[' -z '' ']'
+ return 0
+ sh -c 'yum install -y -q docker-ce-rootless-extras'
Package docker-ce-rootless-extras-20.10.12-3.el7.x86_64 already installed and latest version

================================================================================

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

    dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details: https://docs.docker.com/go/attack-surface/

================================================================================
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58

2、安装 Docker Engine-Community

设置仓库,安装所需的软件包。yum-utils 提供了 yum-config-manager ,并且 device mapper 存储驱动程序需要 device-mapper-persistent-data 和 lvm2

sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
  • 1
  • 2
  • 3
[root@localhost base]# sudo yum install -y yum-utils \
> device-mapper-persistent-data \
> lvm2
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.6.3-1.el7 will be updated
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2 will be an update
---> Package lvm2.x86_64 7:2.02.166-1.el7 will be updated
---> Package lvm2.x86_64 7:2.02.187-6.el7_9.5 will be an update
--> Processing Dependency: lvm2-libs = 7:2.02.187-6.el7_9.5 for package: 7:lvm2-2.02.187-6.el7_9.5.x86_64
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_141)(64bit) for package: 7:lvm2-2.02.187-6.el7_9.5.x86_64
--> Processing Dependency: libdevmapper.so.1.02(DM_1_02_138)(64bit) for package: 7:lvm2-2.02.187-6.el7_9.5.x86_64
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.135-1.el7 will be updated
--> Processing Dependency: device-mapper-libs = 7:1.02.135-1.el7 for package: 7:device-mapper-1.02.135-1.el7.x86_64
---> Package device-mapper-libs.x86_64 7:1.02.170-6.el7_9.5 will be an update
---> Package lvm2-libs.x86_64 7:2.02.166-1.el7 will be updated
---> Package lvm2-libs.x86_64 7:2.02.187-6.el7_9.5 will be an update
--> Processing Dependency: device-mapper-event = 7:1.02.170-6.el7_9.5 for package: 7:lvm2-libs-2.02.187-6.el7_9.5.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.135-1.el7 will be updated
---> Package device-mapper.x86_64 7:1.02.170-6.el7_9.5 will be an update
---> Package device-mapper-event.x86_64 7:1.02.135-1.el7 will be updated
---> Package device-mapper-event.x86_64 7:1.02.170-6.el7_9.5 will be an update
--> Processing Dependency: device-mapper-event-libs = 7:1.02.170-6.el7_9.5 for package: 7:device-mapper-event-1.02.170-6.el7_9.5.x86_64
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.135-1.el7 will be updated
---> Package device-mapper-event-libs.x86_64 7:1.02.170-6.el7_9.5 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================================================
 Package                                                   Arch                               Version                                             Repository                           Size
============================================================================================================================================================================================
Updating:
 device-mapper-persistent-data                             x86_64                             0.8.5-3.el7_9.2                                     updates                             423 k
 lvm2                                                      x86_64                             7:2.02.187-6.el7_9.5                                updates                             1.3 M
Updating for dependencies:
 device-mapper                                             x86_64                             7:1.02.170-6.el7_9.5                                updates                             297 k
 device-mapper-event                                       x86_64                             7:1.02.170-6.el7_9.5                                updates                             192 k
 device-mapper-event-libs                                  x86_64                             7:1.02.170-6.el7_9.5                                updates                             192 k
 device-mapper-libs                                        x86_64                             7:1.02.170-6.el7_9.5                                updates                             325 k
 lvm2-libs                                                 x86_64                             7:2.02.187-6.el7_9.5                                updates                             1.1 M

Transaction Summary
============================================================================================================================================================================================
Upgrade  2 Packages (+5 Dependent packages)

Total size: 3.8 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-libs-1.02.170-6.el7_9.5.x86_64                                                                                                                          1/14
  Updating   : 7:device-mapper-1.02.170-6.el7_9.5.x86_64                                                                                                                               2/14
  Updating   : 7:device-mapper-event-libs-1.02.170-6.el7_9.5.x86_64                                                                                                                    3/14
  Updating   : 7:device-mapper-event-1.02.170-6.el7_9.5.x86_64                                                                                                                         4/14
  Updating   : 7:lvm2-libs-2.02.187-6.el7_9.5.x86_64                                                                                                                                   5/14
  Updating   : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64                                                                                                                    6/14
  Updating   : 7:lvm2-2.02.187-6.el7_9.5.x86_64                                                                                                                                        7/14
  Cleanup    : 7:lvm2-2.02.166-1.el7.x86_64                                                                                                                                            8/14
  Cleanup    : 7:lvm2-libs-2.02.166-1.el7.x86_64                                                                                                                                       9/14
  Cleanup    : 7:device-mapper-event-1.02.135-1.el7.x86_64                                                                                                                            10/14
  Cleanup    : 7:device-mapper-event-libs-1.02.135-1.el7.x86_64                                                                                                                       11/14
  Cleanup    : 7:device-mapper-1.02.135-1.el7.x86_64                                                                                                                                  12/14
  Cleanup    : 7:device-mapper-libs-1.02.135-1.el7.x86_64                                                                                                                             13/14
  Cleanup    : device-mapper-persistent-data-0.6.3-1.el7.x86_64                                                                                                                       14/14
  Verifying  : 7:device-mapper-event-1.02.170-6.el7_9.5.x86_64                                                                                                                         1/14
  Verifying  : 7:lvm2-libs-2.02.187-6.el7_9.5.x86_64                                                                                                                                   2/14
  Verifying  : device-mapper-persistent-data-0.8.5-3.el7_9.2.x86_64                                                                                                                    3/14
  Verifying  : 7:device-mapper-1.02.170-6.el7_9.5.x86_64                                                                                                                               4/14
  Verifying  : 7:device-mapper-event-libs-1.02.170-6.el7_9.5.x86_64                                                                                                                    5/14
  Verifying  : 7:lvm2-2.02.187-6.el7_9.5.x86_64                                                                                                                                        6/14
  Verifying  : 7:device-mapper-libs-1.02.170-6.el7_9.5.x86_64                                                                                                                          7/14
  Verifying  : 7:device-mapper-event-libs-1.02.135-1.el7.x86_64                                                                                                                        8/14
  Verifying  : 7:device-mapper-libs-1.02.135-1.el7.x86_64                                                                                                                              9/14
  Verifying  : 7:lvm2-2.02.166-1.el7.x86_64                                                                                                                                           10/14
  Verifying  : device-mapper-persistent-data-0.6.3-1.el7.x86_64                                                                                                                       11/14
  Verifying  : 7:device-mapper-1.02.135-1.el7.x86_64                                                                                                                                  12/14
  Verifying  : 7:lvm2-libs-2.02.166-1.el7.x86_64                                                                                                                                      13/14
  Verifying  : 7:device-mapper-event-1.02.135-1.el7.x86_64                                                                                                                            14/14

Updated:
  device-mapper-persistent-data.x86_64 0:0.8.5-3.el7_9.2                                                  lvm2.x86_64 7:2.02.187-6.el7_9.5

Dependency Updated:
  device-mapper.x86_64 7:1.02.170-6.el7_9.5                   device-mapper-event.x86_64 7:1.02.170-6.el7_9.5              device-mapper-event-libs.x86_64 7:1.02.170-6.el7_9.5
  device-mapper-libs.x86_64 7:1.02.170-6.el7_9.5              lvm2-libs.x86_64 7:2.02.187-6.el7_9.5

Complete!
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98

使用以下命令来设置稳定的仓库

sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
  • 1
  • 2
  • 3

安装最新版本的 Docker Engine-Community 和 containerd,或者转到下一步安装特定版本:

sudo yum install docker-ce docker-ce-cli containerd.io
  • 1

启动 Docker

sudo systemctl start docker
  • 1

检查Docker状态

sudo systemctl status docker
  • 1
[root@localhost zbox]# sudo systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/etc/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-01-05 16:59:36 CST; 1 weeks 1 days ago
     Docs: https://docs.docker.com
 Main PID: 97399 (dockerd)
    Tasks: 0
   Memory: 229.1M
   CGroup: /system.slice/docker.service
           ├─25950 /usr/bin/containerd-shim-runc-v2 -namespace moby -id e5bba89299232dd51b84b08dc2cb55625c3b3ba2f0351c1b3b5c94739dc4d9e4 -address /var/run/docker/containerd/containerd.s...
           ├─25996 /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 3307 -container-ip 172.30.10.3 -container-port 3306
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

二、安装meterSphere

(本次使用的是离线安装,所以需要先下载安装包)

1、下载并解压

安装包下载地址:https://community.fit2cloud.com/#/products/metersphere/downloads

tar -zxvf metersphere-offline-installer-v1.15.4.tar.gz
  • 1

2、进入目录下安装

cd metersphere-offline-installer-v1.15.4/
  • 1
sudo sh install.sh
  • 1
[root@localhost base]# tail -zxvf metersphere-offline-installer-v1.15.4.tar.gz
[root@localhost base]# cd metersphere-offline-installer-v1.15.4/
[root@localhost metersphere-offline-installer-v1.15.4]# sudo sh install.sh
存在已安装的 MeterSphere, 安装目录为 /opt/metersphere, 执行升级流程
[MeterSphere Log]: 拷贝安装文件到目标目录
‘./metersphere/docker-compose-kafka.yml’ -> ‘/opt/metersphere/docker-compose-kafka.yml’ (backup: ‘/opt/metersphere/docker-compose-kafka.yml.20220105-1719’)./metersphere/docker-compose-prometheus.yml’ -> ‘/opt/metersphere/docker-compose-prometheus.yml’ (backup: ‘/opt/metersphere/docker-compose-prometheus.yml.20220105-1719’)./metersphere/docker-compose-node-controller.yml’ -> ‘/opt/metersphere/docker-compose-node-controller.yml’ (backup: ‘/opt/metersphere/docker-compose-node-controller.yml.20220105-1719’)./metersphere/docker-compose-mysql.yml’ -> ‘/opt/metersphere/docker-compose-mysql.yml’ (backup: ‘/opt/metersphere/docker-compose-mysql.yml.20220105-1719’)./metersphere/conf/my.cnf’ -> ‘/opt/metersphere/conf/my.cnf’ (backup: ‘/opt/metersphere/conf/my.cnf.20220105-1719’)./metersphere/conf/version’ -> ‘/opt/metersphere/conf/version’ (backup: ‘/opt/metersphere/conf/version.20220105-1719’)./metersphere/conf/prometheus/prometheus.yml’ -> ‘/opt/metersphere/conf/prometheus/prometheus.yml’ (backup: ‘/opt/metersphere/conf/prometheus/prometheus.yml.20220105-1719’)./metersphere/conf/metersphere.properties’ -> ‘/opt/metersphere/conf/metersphere.properties’ (backup: ‘/opt/metersphere/conf/metersphere.properties.20220105-1719’)./metersphere/version’ -> ‘/opt/metersphere/version’ (backup: ‘/opt/metersphere/version.20220105-1719’)./metersphere/docker-compose-base.yml’ -> ‘/opt/metersphere/docker-compose-base.yml’ (backup: ‘/opt/metersphere/docker-compose-base.yml.20220105-1719’)./metersphere/docker-compose-server.yml’ -> ‘/opt/metersphere/docker-compose-server.yml’ (backup: ‘/opt/metersphere/docker-compose-server.yml.20220105-1719’)./metersphere/logs/README.md’ -> ‘/opt/metersphere/logs/README.md’ (backup: ‘/opt/metersphere/logs/README.md.20220105-1719’)
[MeterSphere Log]: ======================= 开始安装 =======================
[MeterSphere Log]: 检测到 Docker 已安装,跳过安装步骤
[MeterSphere Log]: 启动 Docker
Redirecting to /bin/systemctl start docker.service
[MeterSphere Log]: 检测到 Docker Compose 已安装,跳过安装步骤
[MeterSphere Log]: 加载镜像
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/jmeter-master:5.4.1-ms13-jdk8
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/kafka:2
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/metersphere:v1.15.4
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/ms-data-streaming:v1.15.4
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/ms-node-controller:v1.15.4
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/mysql:5.7.33
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/node-exporter:latest
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/prometheus:latest
Loaded image: registry.cn-qingdao.aliyuncs.com/metersphere/zookeeper:3
[MeterSphere Log]: 启动服务

Removing network metersphere_ms-network
Network metersphere_ms-network not found.
Removing volume metersphere_ms-conf
Volume metersphere_ms-conf not found.
Removing volume metersphere_ms-logs
Volume metersphere_ms-logs not found.
Removing volume metersphere_ms-data
Volume metersphere_ms-data not found.
Removing volume metersphere_ms-mysql-data
Volume metersphere_ms-mysql-data not found.
Removing volume metersphere_ms-zookeeper-data
Volume metersphere_ms-zookeeper-data not found.
Removing volume metersphere_ms-kafka-data
Volume metersphere_ms-kafka-data not found.
Removing volume metersphere_ms-prometheus-data
Volume metersphere_ms-prometheus-data not found.
Removing volume metersphere_ms-prometheus-conf
Volume metersphere_ms-prometheus-conf not found.

Creating network "metersphere_ms-network" with driver "bridge"
Creating volume "metersphere_ms-conf" with default driver
Creating volume "metersphere_ms-logs" with default driver
Creating volume "metersphere_ms-data" with default driver
Creating volume "metersphere_ms-mysql-data" with default driver
Creating volume "metersphere_ms-zookeeper-data" with default driver
Creating volume "metersphere_ms-kafka-data" with default driver
Creating volume "metersphere_ms-prometheus-data" with default driver
Creating volume "metersphere_ms-prometheus-conf" with default driver
Creating zookeeper          ... done
Creating mysql              ... done
Creating ms-prometheus      ... done
Creating ms-node-controller ... done
Creating kafka              ... done
Creating nodeexporter       ... done
Creating ms-server          ... done
Creating ms-data-streaming  ... done

       Name                     Command                       State                                                               Ports
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
kafka                /opt/bitnami/scripts/kafka ...   Up (healthy)            0.0.0.0:19092->19092/tcp,:::19092->19092/tcp, 9092/tcp
ms-data-streaming    /deployments/run-java.sh         Up (health: starting)
ms-node-controller   /deployments/run-java.sh         Up (health: starting)   0.0.0.0:8082->8082/tcp,:::8082->8082/tcp, 0.0.0.0:9100->9100/tcp,:::9100->9100/tcp
ms-prometheus        /bin/prometheus --config.f ...   Up (healthy)            0.0.0.0:9090->9090/tcp,:::9090->9090/tcp
ms-server            /deployments/run-java.sh         Up (health: starting)   0.0.0.0:10000->10000/tcp,:::10000->10000/tcp, 0.0.0.0:10001->10001/tcp,:::10001->10001/tcp,
                                                                              0.0.0.0:10002->10002/tcp,:::10002->10002/tcp, 0.0.0.0:10003->10003/tcp,:::10003->10003/tcp,
                                                                              0.0.0.0:10004->10004/tcp,:::10004->10004/tcp, 0.0.0.0:10005->10005/tcp,:::10005->10005/tcp,
                                                                              0.0.0.0:10006->10006/tcp,:::10006->10006/tcp, 0.0.0.0:10007->10007/tcp,:::10007->10007/tcp,
                                                                              0.0.0.0:10008->10008/tcp,:::10008->10008/tcp, 0.0.0.0:10009->10009/tcp,:::10009->10009/tcp,
                                                                              0.0.0.0:10010->10010/tcp,:::10010->10010/tcp, 0.0.0.0:8081->8081/tcp,:::8081->8081/tcp
mysql                docker-entrypoint.sh mysqld      Up (healthy)            0.0.0.0:3307->3306/tcp,:::3307->3306/tcp, 33060/tcp
nodeexporter         /bin/node_exporter --path. ...   Up (healthy)
zookeeper            /opt/bitnami/scripts/zooke ...   Up (healthy)            2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp
======================= 安装完成 =======================

请通过以下方式访问:
 URL: http://$LOCAL_IP:8081
 用户名: admin
 初始密码: metersphere
您可以使用命令 'msctl status' 检查服务运行情况.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93

安装完后,查看服务运行情况

[root@localhost metersphere]# sudo msctl status

       Name                     Command                  State                                                                Ports
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
kafka                /opt/bitnami/scripts/kafka ...   Up (healthy)   0.0.0.0:19092->19092/tcp,:::19092->19092/tcp, 9092/tcp
ms-data-streaming    /deployments/run-java.sh         Up (healthy)
ms-node-controller   /deployments/run-java.sh         Up (healthy)   0.0.0.0:8082->8082/tcp,:::8082->8082/tcp, 0.0.0.0:9100->9100/tcp,:::9100->9100/tcp
ms-prometheus        /bin/prometheus --config.f ...   Up (healthy)   0.0.0.0:9090->9090/tcp,:::9090->9090/tcp
ms-server            /deployments/run-java.sh         Up (healthy)   0.0.0.0:10000->10000/tcp,:::10000->10000/tcp, 0.0.0.0:10001->10001/tcp,:::10001->10001/tcp,
                                                                     0.0.0.0:10002->10002/tcp,:::10002->10002/tcp, 0.0.0.0:10003->10003/tcp,:::10003->10003/tcp,
                                                                     0.0.0.0:10004->10004/tcp,:::10004->10004/tcp, 0.0.0.0:10005->10005/tcp,:::10005->10005/tcp,
                                                                     0.0.0.0:10006->10006/tcp,:::10006->10006/tcp, 0.0.0.0:10007->10007/tcp,:::10007->10007/tcp,
                                                                     0.0.0.0:10008->10008/tcp,:::10008->10008/tcp, 0.0.0.0:10009->10009/tcp,:::10009->10009/tcp,
                                                                     0.0.0.0:10010->10010/tcp,:::10010->10010/tcp, 0.0.0.0:8081->8081/tcp,:::8081->8081/tcp
mysql                docker-entrypoint.sh mysqld      Up (healthy)   0.0.0.0:3307->3306/tcp,:::3307->3306/tcp, 33060/tcp
nodeexporter         /bin/node_exporter --path. ...   Up (healthy)
zookeeper            /opt/bitnami/scripts/zooke ...   Up (healthy)   2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp
[root@localhost metersphere]# netstat -antlpe | grep 8081
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN      0          282143     28166/docker-proxy
tcp6       0      0 :::8081                 :::*                    LISTEN      0          282150     28171/docker-proxy
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20

三、访问刚刚搭建的meterSphere

局域网访问

请通过以下方式访问:
URL: http://$LOCAL_IP:8081
(我这里用的是Linux的主机IP登录:http://192.168.182.128:8081/login)
使用ifconfig即可查到IP信息,[如果这里没显示IP,可以先执行:sudo dhclient ens33,再执行ifconfig]

ifconfig
  • 1
[bonree@localhost ~]$ ifconfig
 ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.182.128  netmask 255.255.255.0  broadcast 192.168.182.255
        inet6 fe80::bccc:a8a0:6dd9:6969  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:ea:bc:d4  txqueuelen 1000  (Ethernet)
        RX packets 2473629  bytes 3524726711 (3.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 352058  bytes 45140138 (43.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

用户名: admin
初始密码: metersphere
在这里插入图片描述

4、meterSphere重新启动

重启Docker

systemctl restart docker
  • 1

重启msctl

msctl reload
  • 1

重启成功后显示如下

[root@localhost metersphere-offline-installer-v1.15.4]# systemctl restart docker
[root@localhost metersphere-offline-installer-v1.15.4]# msctl reload

Starting zookeeper ...
Starting zookeeper          ... done
Starting mysql     ...
Starting mysql              ... done
Starting ms-node-controller ... done
Starting nodeexporter       ... done
Starting ms-server          ... done
Creating ms-data-streaming  ... done
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

重启失败也不要急,可以再次尝试重启

[root@localhost br]# msctl reload

Starting zookeeper ...
Starting zookeeper          ... done
Starting mysql     ...
Starting mysql              ... done
Starting ms-node-controller ... done
Starting nodeexporter       ... done
Starting ms-server          ... done

ERROR: for ms-data-streaming  Container "18959f298f5f" is unhealthy.
ERROR: Encountered errors while bringing up the project.
[root@localhost br]# msctl reload

ms-node-controller is up-to-date
zookeeper is up-to-date
mysql is up-to-date
ms-prometheus is up-to-date
nodeexporter is up-to-date
kafka is up-to-date
ms-server is up-to-date
ms-data-streaming is up-to-date
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/949914
推荐阅读
相关标签
  

闽ICP备14008679号