others-how to install and setup apache skywalking on linux servers?

1. Purpose

In this post, I will introduce how to install and setup skywalking server on linux server.

2. Solution

2.1 What is skywalking?

Apache SkyWalking, an application performance monitor (APM) and observability platform, especially designed for microservices, cloud native and container-based (Kubernetes) architectures ,is an open source project that addresses this need — with or without a service mesh.

SkyWalking contains monitoring, tracing, diagnosing capabilities for distributed system in Cloud Native architecture.


2.2 Where to download apache skywalking?

There are many types of skywalking components, which you can download from its officail website, For our needs, we just need to downlaod the Skywalking APM component, which stands for the core server component of apache skywalking.

Here is the download link : the link

Or you just download it using wget commmand:

wget https://dlcdn.apache.org/skywalking/9.2.0/apache-skywalking-apm-9.2.0.tar.gz


2.3 How to install skywalking?

It’s very simple, just uncompress the tar.gz as follows:

tar zxvf apache-skywalking-apm-9.2.0.tar.gz

Then goto the uncompressed directory and list the files:


total 137696
-rw-r--r--  1 root root 140996787 11月  2 15:46 apache-skywalking-apm-9.2.0.tar.gz
drwxr-xr-x 10 root root       191 11月  2 15:47 apache-skywalking-apm-bin
[root@zh-246 skywalking]# ll apache-skywalking-apm-bin/
total 112
drwxr-xr-x  2 root root   241 11月  2 15:47 bin
drwxr-xr-x 12 root root  4096 11月  2 15:47 config
drwxr-xr-x  2 root root    68 11月  2 15:47 config-examples
-rw-r--r--  1 root root 48360 2月  18 2022 LICENSE
drwxr-xr-x  3 root root  4096 11月  2 15:47 licenses
-rw-r--r--  1 root root  1393 2月  18 2022 LICENSE.tpl
drwxr-xr-x  2 root root    80 11月  2 15:47 logs
-rw-r--r--  1 root root 30503 2月  18 2022 NOTICE
drwxr-xr-x  2 root root 12288 2月  18 2022 oap-libs
-rw-r--r--  1 root root  1951 2月  18 2022 README.txt
drwxr-xr-x  4 root root    52 11月  2 15:47 tools
drwxr-xr-x  2 root root    53 11月  2 15:47 webapp
[root@zh-246 skywalking]#


2.4 How to startup skywalking?

Just like apache tomcat, we can start the skywalking server as follows:

bin/startup.sh

then you got this:

...
2022-11-02 15:48:03,811 - org.apache.skywalking.oap.server.library.server.grpc.GRPCServer - 131 [main] INFO  [] - Bind handler MetricServiceGRPCHandler into gRPC server 0.0.0.0:11800
2022-11-02 15:48:03,816 - org.apache.skywalking.oap.server.library.server.grpc.GRPCServer - 131 [main] INFO  [] - Bind handler MetricServiceGRPCHandlerV3 into gRPC server 0.0.0.0:11800
2022-11-02 15:48:03,818 - org.apache.skywalking.oap.server.library.server.grpc.GRPCServer - 131 [main] INFO  [] - Bind handler AccessLogServiceGRPCHandler into gRPC server 0.0.0.0:11800
2022-11-02 15:48:03,823 - org.apache.skywalking.oap.server.library.server.grpc.GRPCServer - 131 [main] INFO  [] - Bind handler AccessLogServiceGRPCHandlerV3 into gRPC server 0.0.0.0:11800
2022-11-02 15:48:03,825 - org.apache.skywalking.oap.server.library.server.grpc.GRPCServer - 131 [main] INFO  [] - Bind handler SatelliteAccessLogServiceGRPCHandlerV3 into gRPC server 0.0.0.0:11800
2022-11-02 15:48:04,003 - com.linecorp.armeria.common.util.SystemInfo - 237 [main] INFO  [] - hostname: zh-246 (from /proc/sys/kernel/hostname)
2022-11-02 15:48:04,806 - com.linecorp.armeria.server.Server - 807 [armeria-boss-http-*:12800] INFO  [] - Serving HTTP at /0:0:0:0:0:0:0:0%0:12800 - http://127.0.0.1:12800/
2022-11-02 15:48:04,808 - org.apache.skywalking.oap.server.core.storage.PersistenceTimer - 58 [main] INFO  [] - persistence timer start
2022-11-02 15:48:04,810 - org.apache.skywalking.oap.server.core.cache.CacheUpdateTimer - 46 [main] INFO  [] - Cache updateServiceInventory timer start
2022-11-02 15:48:05,231 - org.apache.skywalking.oap.server.starter.OAPServerBootstrap - 53 [main] INFO  [] - Version of OAP: 9.2.0-cb8845


2.5 How to access apache skywalking?

We can access it in a web browser using the link : https://<server_IP>:8080/, then you will get this:

2.6 How to change the port?

If you want to change the default port 8080, you can open the file:./webapp/webapp.yml, which skywalking use to start its UI server.

server:
  port: 8080

spring:
  cloud:
    gateway:
      routes:
        - id: oap-route
          uri: lb://oap-service
          predicates:
            - Path=/graphql/**
    discovery:
      client:
        simple:
          instances:
            oap-service:
              - uri: http://127.0.0.1:12800
            # - uri: http://<oap-host-1>:<oap-port1>
            # - uri: http://<oap-host-2>:<oap-port2>

  mvc:
    throw-exception-if-no-handler-found: true

  web:
    resources:
      add-mappings: true

management:
  server:
    base-path: /manage

Just change the port and restart skywalking server.



3. Summary

In this post, I demonstrated how to download,install and setup apache skywalking. That’s it, thanks for your reading.