1.安装 docker 

sudo apt install docker.io

2.查看版本docker

 docker -v
Docker version 19.03.6, build 369ce74a3c


 

3.安装metersphere-release-v1.6.2

注意要用超级用户

sudo curl -sSL https://github.com/metersphere/metersphere/releases/latest/download/quick_start.sh | sh

4.安装记录

metersphere-release-v1.6.2$ sudo ./install.sh
======================= 开始安装 =======================
time: Wed Jan 13 02:32:35 UTC 2021
[MeterSphere Log]: 检测到 Docker 已安装,跳过安装步骤 
[MeterSphere Log]: 启动 Docker  
[MeterSphere Log]: ... 在线安装 docker-compose 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   651  100   651    0     0    637      0  0:00:01  0:00:01 --:--:--   637
100 11.6M  100 11.6M    0     0  10.0M      0  0:00:01  0:00:01 --:--:--  110M
[MeterSphere Log]: 拉取镜像 
The HOSTNAME variable is not set. Defaulting to a blank string.
Pulling ms-node-controller ... done
Pulling mysql              ... done
Pulling zookeeper          ... done
Pulling kafka              ... done
Pulling ms-data-streaming  ... done
Pulling ms-server          ... done
5.3-ms14: Pulling from metersphere/jmeter-master
801bfaa63ef2: Pulling fs layer
59f8794b5182: Pulling fs layer
b0c05bf17fb2: Pulling fs layer
4e59daf8f2d1: Pulling fs layer
a8d3bfc40c06: Pulling fs layer
07be4530e3ef: Pulling fs layer
4e59daf8f2d1: Waiting
a8d3bfc40c06: Waiting
07be4530e3ef: Waiting
b0c05bf17fb2: Verifying Checksum
b0c05bf17fb2: Download complete
4e59daf8f2d1: Verifying Checksum
4e59daf8f2d1: Download complete
801bfaa63ef2: Verifying Checksum
801bfaa63ef2: Download complete
801bfaa63ef2: Pull complete
a8d3bfc40c06: Verifying Checksum
a8d3bfc40c06: Download complete
07be4530e3ef: Verifying Checksum
07be4530e3ef: Download complete
59f8794b5182: Verifying Checksum
59f8794b5182: Download complete
59f8794b5182: Pull complete
b0c05bf17fb2: Pull complete
4e59daf8f2d1: Pull complete
a8d3bfc40c06: Pull complete
07be4530e3ef: Pull complete
Digest: sha256:37aabd433e70ba5de7d9581ffb470979e30d5348e4cb2a0339a45415d5bc97c2
Status: Downloaded newer image for registry.cn-qingdao.aliyuncs.com/metersphere/jmeter-master:5.3-ms14
registry.cn-qingdao.aliyuncs.com/metersphere/jmeter-master:5.3-ms14
/home/testing/metersphere-release-v1.6.2
[MeterSphere Log]: 启动服务 
The HOSTNAME variable is not set. Defaulting to a blank string.
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-jmeter-data
Volume metersphere_ms-jmeter-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.
The HOSTNAME variable is not set. Defaulting to a blank string.
Creating network "metersphere_ms-network" with the default driver
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-jmeter-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 mysql              ... done
Creating zookeeper          ... done
Creating ms-node-controller ... done
Creating kafka              ... done
Creating ms-data-streaming  ... done
Creating ms-server          ... done

       Name                     Command                       State                               Ports                     
----------------------------------------------------------------------------------------------------------------------------
kafka                /opt/bitnami/scripts/kafka ...   Up (healthy)            0.0.0.0:19092->19092/tcp, 9092/tcp            
ms-data-streaming    /deployments/run-java.sh         Up (health: starting)   0.0.0.0:8084->8084/tcp, 0.0.0.0:8085->8085/tcp
ms-node-controller   /deployments/run-java.sh         Up (healthy)            0.0.0.0:8082->8082/tcp                        
ms-server            /deployments/run-java.sh         Up (health: starting)   0.0.0.0:8081->8081/tcp                        
mysql                docker-entrypoint.sh mysqld      Up (healthy)            0.0.0.0:3307->3306/tcp, 33060/tcp             
zookeeper            /opt/bitnami/scripts/zooke ...   Up (healthy)            2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp        
======================= 安装完成 =======================

请通过以下方式访问:
 URL: http://$LOCAL_IP:8081
 用户名: admin
 初始密码: metersphere
您可以使用命令 'msctl status' 检查服务运行情况.

查看没有权限 msctl status 用sudo

Traceback (most recent call last):
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 392, in _make_request
  File "http/client.py", line 1252, in request
  File "http/client.py", line 1298, in _send_request
  File "http/client.py", line 1247, in endheaders
  File "http/client.py", line 1026, in _send_output
  File "http/client.py", line 966, in send
  File "docker/transport/unixconn.py", line 43, in connect
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "requests/adapters.py", line 449, in send
  File "urllib3/connectionpool.py", line 727, in urlopen
  File "urllib3/util/retry.py", line 403, in increment
  File "urllib3/packages/six.py", line 734, in reraise
  File "urllib3/connectionpool.py", line 677, in urlopen
  File "urllib3/connectionpool.py", line 392, in _make_request
  File "http/client.py", line 1252, in request
  File "http/client.py", line 1298, in _send_request
  File "http/client.py", line 1247, in endheaders
  File "http/client.py", line 1026, in _send_output
  File "http/client.py", line 966, in send
  File "docker/transport/unixconn.py", line 43, in connect
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "docker/api/client.py", line 205, in _retrieve_server_version
  File "docker/api/daemon.py", line 181, in version
  File "docker/utils/decorators.py", line 46, in inner
  File "docker/api/client.py", line 228, in _get
  File "requests/sessions.py", line 543, in get
  File "requests/sessions.py", line 530, in request
  File "requests/sessions.py", line 643, in send
  File "requests/adapters.py", line 498, in send
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/docker-compose", line 3, in <module>
  File "compose/cli/main.py", line 67, in main
  File "compose/cli/main.py", line 123, in perform_command
  File "compose/cli/command.py", line 69, in project_from_options
  File "compose/cli/command.py", line 132, in get_project
  File "compose/cli/docker_client.py", line 43, in get_client
  File "compose/cli/docker_client.py", line 170, in docker_client
  File "docker/api/client.py", line 188, in __init__
  File "docker/api/client.py", line 213, in _retrieve_server_version
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))
[5583] Failed to execute script docker-compose
 

sudo msctl status

docker里面的服务都正常启动

       Name                     Command                       State                       Ports            
-----------------------------------------------------------------------------------------------------------
kafka                /opt/bitnami/scripts/kafka ...   Up (healthy)            0.0.0.0:19092->19092/tcp,    
                                                                              9092/tcp                     
ms-data-streaming    /deployments/run-java.sh         Up (healthy)            0.0.0.0:8084->8084/tcp,      
                                                                              0.0.0.0:8085->8085/tcp       
ms-node-controller   /deployments/run-java.sh         Up (healthy)            0.0.0.0:8082->8082/tcp       
ms-server            /deployments/run-java.sh         Up (health: starting)   0.0.0.0:8081->8081/tcp       
mysql                docker-entrypoint.sh mysqld      Up (healthy)            0.0.0.0:3307->3306/tcp,      
                                                                              33060/tcp                    
zookeeper            /opt/bitnami/scripts/zooke ...   Up (healthy)            2181/tcp, 2888/tcp, 3888/tcp,
                                                                              8080/tcp    

用浏览器登录后完成

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐