Surging -Demo部署

1、安装rabbitmq

docker run -d --name rabbitmq --restart=unless-stopped --publish 5671:5671 --publish 5672:5672 --publish 4369:4369 --publish 25672:25672 --publish 15671:15671 --publish 15672:15672  rabbitmq:management

访问 http://192.168.95.128:15672/  默认账号密码都是guest

2、安装consul

docker run -d -p 8500:8500 -h node1 --name node1 consul agent -server -bootstrap-expect=1 -node=node1 -client 0.0.0.0 -ui

访问 http://192.168.95.128:8500/ 验证

3、安装redis

docker run --name redis -d -p 6379:6379  -v /usr/local/redis/redis.conf:/etc/redis.conf  redis redis-server /etc/redis.conf

修改/etc/sysctl.conf 添加:net.core.somaxconn = 2048

可使用RedisDesktopManager验证或容器内redis-cli ping

4、安装MySQL8

docker run --name mysql -d -p 3306:3306 -v /home/mysql/data:/var/lib/mysql -v /home/mysql/conf/my.cnf:/etc/mysql/my.cnf -e MYSQL_ROOT_PASSWORD=123456 mysql

my.cnf文件内容

[mysqld]
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
datadir         = /var/lib/mysql
secure-file-priv= NULL
symbolic-links=0
!includedir /etc/mysql/conf.d/
default_authentication_plugin=mysql_native_password
lower-case-table-names=1 
max_execution_time=18000000
innodb_buffer_pool_size=5G
innodb_buffer_pool_instances=1
tmp_table_size=300M
log_bin_trust_function_creators=TRUE
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
character-set-server = utf8mb4
performance_schema_max_table_instances = 600
table_definition_cache = 400
table_open_cache = 256
[mysql]
default-character-set = utf8mb4
[client]
default-character-set = utf8mb4

其中 lower-case-table-names linux 1 windows 2 表名忽略大小写

0 大小写敏感

 

建用户 授权

CREATE USER `markormes`@`%` IDENTIFIED BY '123456';

GRANT ALL ON *.* TO `markormes`@`%` WITH GRANT OPTION;

GRANT ALL ON *.* TO `root`@`%` WITH GRANT OPTION;

 

5、安装elasticsearch

1、如果报错:max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

在/etc/sysctl.conf文件最后添加一行

vm.max_map_count=655360

执行命令:sysctl -p

exceptionless需要5.6版本

docker pull docker.elastic.co/elasticsearch/elasticsearch:5.6.9   

(markorregistry.cn:8085/docker.elastic.co/elasticsearch/elasticsearch:5.6.9)

2、建议安装镜像(最新方式)

参考文档:

https://mp.weixin.qq.com/s?__biz=MzAwNTMxMzg1MA==&mid=2654072206&idx=2&sn=b5ab05943f3b84c16d746010e03501ed&chksm=80dbc9dbb7ac40cdf0ba9521b7709deffbac91fe1b0ac2794b30215232135e6c506762c27a1b&mpshare=1&scene=1&srcid=1009C4oUMCJRYbL0DqQIfSPc#rd

docker run -p 9200:9200 -p 9300:9300 -e cluster.name=elasticsearch -e xpack.security.enabled=false --name=elasticsearch --restart=always -d wutang/elasticsearch-shanghai-zone

3、官方镜像安装

docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "cluster.name=CollectorDBCluster" docker.elastic.co/elasticsearch/elasticsearch:5.6.9

删除x-pack插件,内置的登录认证插件

docker exec -it cbb4a6ad72ee  bash

./bin/elasticsearch-plugin remove x-pack

docker restart cbb4a6ad72ee

http://192.168.95.128:9200/  查看是否成功

 

6、安装skywalking

1、最新镜像方式安装(对应上述ES中2)

docker inspect elasticsearch |grep IPAddress  //获取elasticsearchIP

docker run -p 8080:8080 -p 10800:10800 -p 11800:11800 -p 12800:12800 -e ES_CLUSTER_NAME=elasticsearch -e ES_ADDRESSES=上一步拿到的elasticsearchIP:9300 -d wutang/skywalking-docker:5.x

2、原方式安装(对应上述ES 中3)

下载并解压 http://skywalking.apache.org/downloads/

8080端口被占用,修改webapp目录下配置文件webapp.yml 改为8090

修改config目录下application.yml 中 remote下gRPC 以及 agent_gRPC下gRPC 的localhost改为ip

切换到解压目录,终端运行

sh -x startup.sh (如提示 Permission denied  使用 chmod 777 *.sh 授权)

如失败,log显示 Unsupported major.minor version 52.0  说明没有jdk1.8

安装jdk1.8   yum  install  java-1.8.0-openjdk   java-1.8.0-openjdk-devel 

http://10.5.30.237:8090

目前 skywalking与es相同服务器 可正常使用,非相同服务器报错,有待解决。

参考https://github.com/apache/incubator-skywalking/blob/master/docs/en/Deploy-backend-in-standalone-mode.md#quick-start

 

展开阅读全文

没有更多推荐了,返回首页