一,离线安装docker环境
1,安装docker
2,安装docker-compose
官网:https://docs.docker.com/compose/install/
https://github.com/docker/compose/releases
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
docker-compose --version
二,下载 skywalking相关docker镜像并导入
docker pull apache/skywalking-oap-server:6.1.0
docker pull elasticsearch:6.8.0
docker pull apache/skywalking-ui:6.1.0
docker.io/elasticsearch 6.8.0 d0b291d7093b 5 months ago 895 MB
docker.io/apache/skywalking-ui 6.1.0 ee2f5bde1235 5 months ago 230 MB
docker.io/apache/skywalking-oap-server 6.1.0 02fd608e0238 5 months ago 230 MB
docker save -o ./elasticsearch680.tar docker.io/elasticsearch
docker save -o ./skywalking-ui610.tar docker.io/apache/skywalking-ui
docker save -o ./skywalking-oap-server610.tar docker.io/apache/skywalking-oap-server
docker load -i ./elasticsearch680.tar
docker load -i ./skywalking-oap-server610.tar
docker load -i ./skywalking-ui610.tar
三,docker-compose.yml
# Licensed to the Apache Software Foundation (ASF) under onell
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
version: '3.3'
services:
elasticsearch:
image: elasticsearch:6.8.0
container_name: elasticsearch
restart: always
ports:
- 9200:9200
- 9300:9300
environment:
discovery.type: single-node
TZ: Asia/Shanghai
ulimits:
memlock:
soft: -1
hard: -1
oap:
image: apache/skywalking-oap-server:6.1.0
container_name: skywalking-oap
depends_on:
- elasticsearch
links:
- elasticsearch
restart: always
ports:
- 9401:11800
- 9402:12800
environment:
TZ: Asia/Shanghai
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch:9200
ui:
image: apache/skywalking-ui:6.1.0
container_name: skywalking-ui
depends_on:
- oap
links:
- oap
restart: always
ports:
- 18080:8080
environment:
SW_OAP_ADDRESS: oap:9402
collector.ribbon.listOfServers: oap:9402
security.user.admin.password: 111111
docker-compose -f ./docker-compose.yml up -d
https://github.com/apache/skywalking/blob/master/docs/en/setup/service-agent/java-agent/README.md
java -javaagent:/opt/apps/skywalking/apache-skywalking-apm-bin/agent/skywalking-agent.jar -Dskywalking.agent.service_name=syncorder -Dskywalking.collector.backend_service=117.50.30.96:11800 -jar sync-order-server.jar