标签:包含 source bin 内存 查看 解压 system asn mysql
架构图:
官网地址:https://skywalking.apache.org/
软件版本:
apache-skywalking-apm-6.5.0.tar.gz
apache-tomcat-8.5.47.tar.gz
elasticsearch-6.4.0.tar.gz
1、设置时间同步并创建安装目录
yum install -y ntp */2 * * * * /usr/sbin/ntpdate 182.92.12.11;/sbin/hwclock -w > /dev/null #2>&1 mkdir -p /usr/local/skywalking
2、创建elasticsearch用户及设置系统文件句柄数
#添加es用户 useradd es passwd es #设置文件打开句柄数 vim /etc/security/.conf es soft nofile 65536 es hard nofile 65536 es soft nproc 4096 es hard nproc 4096 #增大虚拟内存 vim /etc/sysctl.conf vm.max_map_count=262144 #运用生效 system -p
3、部署elasticsearch,注意事项:https://github.com/apache/skywalking/blob/5.x/docs/cn/Deploy-backend-in-standalone-mode-CN.md#%E9%83%A8%E7%BD%B2elasticsearch
#安装java环境 yum install -y java #解压 tar -xf elasticsearch-6.4.0.tar.gz #授权 chown -R es.es elasticsearch-6.4.0 #切换到es用户 su - es #后台启动es服务 cd /usr/local/skywalking/elasticsearch-6.4.0/bin/ ./elasticsearch -d
curl请求返回正常:
4、安装skywalking
tar -xf apache-skywalking-apm-6.5.0.tar.gz cd apache-skywalking-apm-bin/ #修改数据源 vim config/application.yml #打开elasticseatch注解 storage: elasticsearch: nameSpace: ${SW_NAMESPACE:""} clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200} protocol: ${SW_STORAGE_ES_HTTP_PROTOCOL:"http"} trustStorePath: ${SW_SW_STORAGE_ES_SSL_JKS_PATH:"../es_keystore.jks"} trustStorePass: ${SW_SW_STORAGE_ES_SSL_JKS_PASS:""} user: ${SW_ES_USER:""} password: ${SW_ES_PASSWORD:""} indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2} indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0} # Those data TTL settings will override the same settings in core module. recordDataTTL: ${SW_STORAGE_ES_RECORD_DATA_TTL:7} # Unit is day otherMetricsDataTTL: ${SW_STORAGE_ES_OTHER_METRIC_DATA_TTL:45} # Unit is day monthMetricsDataTTL: ${SW_STORAGE_ES_MONTH_METRIC_DATA_TTL:18} # Unit is month ##注释h2数据源 # h2: # driver: ${SW_STORAGE_H2_DRIVER:org.h2.jdbcx.JdbcDataSource} # url: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db} # user: ${SW_STORAGE_H2_USER:sa} # metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000} #后台启动服务 /usr/local/skywalking/apache-skywalking-apm-bin/bin ./startup.sh -d SkyWalking OAP started successfully! SkyWalking Web Application started successfully!
5、基于tomcat部署skywalking agent
#解压tomcat tar -xf apache-tomcat-8.5.47.tar.gz #在tomcat的启动参数添加skywalking-agent.jar /usr/local/skywalking/apache-tomcat-8.5.47/bin/catalina.sh CATALINA_OPTS="$CATALINA_OPTS -javaagent:/usr/local/skywalking/apache-skywalking-apm-bin/agent/skywalking-agent.jar";export CATALINA_OPTS #启动tomcat服务 ./startup.sh
6、首先要访问tomcat服务,这时我们打开一个新的无痕窗口(fuck。。。因为缓存的问题我整整花了一天时间卡在上面,当前服务一直不显示。)看到skywalking UI。
后记:
1、系统时间同步,不然也会导致UI无法显示请求。
标签:包含 source bin 内存 查看 解压 system asn mysql
原文地址:https://www.cnblogs.com/Dev0ps/p/12724492.html