1.准备

1.1.组件

  JDK:1.8版本及以上;

  ElasticSearch:6.x版本,目前貌似不支持7.x版本;

      Kibana:6.x版本;

     Canal.deployer:1.1.4

   Canal.Adapter:1.1.4

1.2.配置

  • 需要先开启MySQL的 binlog 写入功能,配置 binlog-format 为 ROW 模式

找到my.cnf文件,我的目录是/etc/my.cnf,添加以下配置:

  1. log-bin=mysql-bin   # 开启 binlog
  2. binlog-format=ROW   # 选择 ROW 模式
  3. server_id=      # 配置 MySQL replaction 需要定义,不要和 canal 的 slaveId 重复

然后重启mysql,用以下命令检查一下binlog是否正确启动:

  1. mysql> show variables like 'log_bin%';
  2. +---------------------------------+----------------------------------+
  3. | Variable_name | Value |
  4. +---------------------------------+----------------------------------+
  5. | log_bin | ON |
  6. | log_bin_basename | /data/mysql/data/mysql-bin |
  7. | log_bin_index | /data/mysql/data/mysql-bin.index |
  8. | log_bin_trust_function_creators | OFF |
  9. | log_bin_use_v1_row_events | OFF |
  10. +---------------------------------+----------------------------------+
  11. rows in set (0.00 sec)
  12. mysql> show variables like 'binlog_format%';
  13. +---------------+-------+
  14. | Variable_name | Value |
  15. +---------------+-------+
  16. | binlog_format | ROW |
  17. +---------------+-------+
  18. row in set (0.00 sec)
  • 授权 canal 链接 MySQL 账号具有作为 MySQL slave 的权限, 如果已有账户可直接 grant
  1. CREATE USER canal IDENTIFIED BY 'Aa123456.';
  2. GRANT SELECT, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'canal'@'%';
  3. FLUSH PRIVILEGES;

2.安装

2.1.ElasticSearch

安装配置方法:https://www.cnblogs.com/caoweixiong/p/11826295.html

2.2.canal.deployer

2.2.1.下载解压

  1. 直接下载
  2.  
  3. 访问:https://github.com/alibaba/canal/releases ,会列出所有历史的发布版本包 下载方式,比如以1.1.4版本为例子:
  4. wget https://github.com/alibaba/canal/releases/download/canal-1.1.4/canal.deployer-1.1.4.tar.gz
  5.  
  6. 自己编译
  7. git clone git@github.com:alibaba/canal.git
  8. cd canal;
  9. mvn clean install -Dmaven.test.skip -Denv=release
  10. 编译完成后,会在根目录下产生target/canal.deployer-$version.tar.gz
  1. mkdir /usr/local/canal
  2. tar zxvf canal.deployer-1.1..tar.gz -C /usr/local/canal

解压完成后,进入 /usr/local/canal目录,可以看到如下结构:

2.2.2.配置

  • 配置server
  1. cd /usr/local/canal/conf
  2. vi canal.properties

标红的需要我们重点关注的,也是平常修改最多的参数:

  1. #################################################
  2. ######### common argument #############
  3. #################################################
  4. # tcp bind ip
  5. canal.ip =
  6. # register ip to zookeeper
  7. canal.register.ip =  #运行canal-server服务的主机IP,可以不用配置,他会自动绑定一个本机的IP
  8. canal.port = 11111   #canal-server监听的端口(TCP模式下,非TCP模式不监听1111端口)
  9. canal.metrics.pull.port = 11112 #canal-server metrics.pull监听的端口
  10. # canal instance user/passwd
  11. # canal.user = canal
  12. # canal.passwd = E3619321C1A937C46A0D8BD1DAC39F93B27D4458
  13.  
  14. # canal admin config
  15. #canal.admin.manager = 127.0.0.1:
  16. canal.admin.port =
  17. canal.admin.user = admin
  18. canal.admin.passwd = 4ACFE3202A5FF5CF467898FC58AAB1D615029441
  19.  
  20. canal.zkServers =  #集群模式下要配置zookeeper进行协调配置,单机模式可以不用配置
  21. # flush data to zk
  22. canal.zookeeper.flush.period =
  23. canal.withoutNetty = false
  24. # tcp, kafka, RocketMQ
  25. canal.serverMode = tcp #canal-server运行的模式,TCP模式就是直连客户端,不经过中间件。kafka和mq是消息队列的模式
  26. # flush meta cursor/parse position to file
  27. canal.file.data.dir = ${canal.conf.dir} #存放数据的路径
  28. canal.file.flush.period =
  29. ## memory store RingBuffer size, should be Math.pow(,n)
  30. canal.instance.memory.buffer.size =
  31. ## memory store RingBuffer used memory unit size , default 1kb  #下面是一些系统参数的配置,包括内存、网络等
  32. canal.instance.memory.buffer.memunit =
  33. ## meory store gets mode used MEMSIZE or ITEMSIZE
  34. canal.instance.memory.batch.mode = MEMSIZE
  35. canal.instance.memory.rawEntry = true
  36.  
  37. ## detecing config  #这里是心跳检查的配置,做HA时会用到
  38. canal.instance.detecting.enable = false
  39. #canal.instance.detecting.sql = insert into retl.xdual values(,now()) on duplicate key update x=now()
  40. canal.instance.detecting.sql = select
  41. canal.instance.detecting.interval.time =
  42. canal.instance.detecting.retry.threshold =
  43. canal.instance.detecting.heartbeatHaEnable = false
  44.  
  45. # support maximum transaction size, more than the size of the transaction will be cut into multiple transactions delivery
  46. canal.instance.transaction.size =
  47. # mysql fallback connected to new master should fallback times
  48. canal.instance.fallbackIntervalInSeconds =
  49.  
  50. # network config
  51. canal.instance.network.receiveBufferSize =
  52. canal.instance.network.sendBufferSize =
  53. canal.instance.network.soTimeout =
  54.  
  55. # binlog filter config  #binlog过滤的配置,指定过滤那些SQL
  56. canal.instance.filter.druid.ddl = true
  57. canal.instance.filter.query.dcl = false
  58. canal.instance.filter.query.dml = false
  59. canal.instance.filter.query.ddl = false
  60. canal.instance.filter.table.error = false
  61. canal.instance.filter.rows = false
  62. canal.instance.filter.transaction.entry = false
  63.  
  64. # binlog format/image check #binlog格式检测,使用ROW模式,非ROW模式也不会报错,但是同步不到数据
  65. canal.instance.binlog.format = ROW,STATEMENT,MIXED
  66. canal.instance.binlog.image = FULL,MINIMAL,NOBLOB
  67.  
  68. # binlog ddl isolation
  69. canal.instance.get.ddl.isolation = false
  70.  
  71. # parallel parser config
  72. canal.instance.parser.parallel = true  #并行解析配置,如果是单个CPU就把下面这个true改为false
  73. ## concurrent thread number, default % available processors, suggest not to exceed Runtime.getRuntime().availableProcessors()
  74. #canal.instance.parser.parallelThreadSize =
  75. ## disruptor ringbuffer size, must be power of
  76. canal.instance.parser.parallelBufferSize =
  77.  
  78. # table meta tsdb info
  79. canal.instance.tsdb.enable = true
  80. canal.instance.tsdb.dir = ${canal.file.data.dir:../conf}/${canal.instance.destination:}
  81. canal.instance.tsdb.url = jdbc:h2:${canal.instance.tsdb.dir}/h2;CACHE_SIZE=;MODE=MYSQL;
  82. canal.instance.tsdb.dbUsername = canal
  83. canal.instance.tsdb.dbPassword = canal
  84. # dump snapshot interval, default hour
  85. canal.instance.tsdb.snapshot.interval =
  86. # purge snapshot expire , default hour( days)
  87. canal.instance.tsdb.snapshot.expire =
  88.  
  89. # aliyun ak/sk , support rds/mq
  90. canal.aliyun.accessKey =
  91. canal.aliyun.secretKey =
  92.  
  93. #################################################
  94. ######### destinations #############
  95. #################################################
  96. canal.destinations = example #canal-server创建的实例,在这里指定你要创建的实例的名字,比如test1,test2等,逗号隔开
  97. # conf root dir
  98. canal.conf.dir = ../conf
  99. # auto scan instance dir add/remove and start/stop instance
  100. canal.auto.scan = true
  101. canal.auto.scan.interval =
  102.  
  103. canal.instance.tsdb.spring.xml = classpath:spring/tsdb/h2-tsdb.xml
  104. #canal.instance.tsdb.spring.xml = classpath:spring/tsdb/mysql-tsdb.xml
  105.  
  106. canal.instance.global.mode = spring
  107. canal.instance.global.lazy = false
  108. canal.instance.global.manager.address = ${canal.admin.manager}
  109. #canal.instance.global.spring.xml = classpath:spring/memory-instance.xml
  110. canal.instance.global.spring.xml = classpath:spring/file-instance.xml
  111. #canal.instance.global.spring.xml = classpath:spring/default-instance.xml
  112.  
  113. ##################################################
  114. ######### MQ #############
  115. ##################################################
  116. canal.mq.servers = 127.0.0.1:
  117. canal.mq.retries =
  118. canal.mq.batchSize =
  119. canal.mq.maxRequestSize =
  120. canal.mq.lingerMs =
  121. canal.mq.bufferMemory =
  122. canal.mq.canalBatchSize =
  123. canal.mq.canalGetTimeout =
  124. canal.mq.flatMessage = true
  125. canal.mq.compressionType = none
  126. canal.mq.acks = all
  127. #canal.mq.properties. =
  128. canal.mq.producerGroup = test
  129. # Set this value to "cloud", if you want open message trace feature in aliyun.
  130. canal.mq.accessChannel = local
  131. # aliyun mq namespace
  132. #canal.mq.namespace =
  133.  
  134. ##################################################
  135. ######### Kafka Kerberos Info #############
  136. ##################################################
  137. canal.mq.kafka.kerberos.enable = false
  138. canal.mq.kafka.kerberos.krb5FilePath = "../conf/kerberos/krb5.conf"
  139. canal.mq.kafka.kerberos.jaasFilePath = "../conf/kerberos/jaas.conf"
  • 配置example

在根配置文件中创建了实例名称之后,需要在根配置的同级目录下创建该实例目录,canal-server为我们提供了一个示例的实例配置,因此我们可以直接复制该示例,举个例子吧:根配置配置了如下实例:

  1. [root@aliyun conf]# vim canal.properties
  2. ...
  3. canal.destinations = user_order,delivery_info
  4. ...
  5.  
  6. 我们需要在根配置的同级目录下创建这两个实例
  7. [root@aliyun conf]# pwd
  8. /usr/local/canal-server/conf
  9. [root@aliyun conf]# cp -a example/ user_order
  10. [root@aliyun conf]# cp -a example/ delivery_info

这里只举例1个example的配置:

  1. vi /usr/local/canal/conf/example/instance.properties

标红的需要我们重点关注的,也是平常修改最多的参数:

  1. ###################################################
    mysql serverId , v1.0.26+ will autoGencanal.instance.mysql.slaveId=11
    # enable gtid use true/false
  2. canal.instance.gtidon=false
  3.  
  4. # position info
  5. canal.instance.master.address=172.16.10.26:3306 #指定要读取binlog的MySQL的IP地址和端口
  6. canal.instance.master.journal.name= #从指定的binlog文件开始读取数据
  7. canal.instance.master.position= #指定偏移量,做过主从复制的应该都理解这两个参数。
    #tips:binlog和偏移量也可以不指定,则canal-server会从当前的位置开始读取。我建议不设置
    canal.instance.master.timestamp=
  8. canal.instance.master.gtid=
  9.  
  10. # rds oss binlog
  11. canal.instance.rds.accesskey=
  12. canal.instance.rds.secretkey=
  13. canal.instance.rds.instanceId=
  14.  
  15. # table meta tsdb info
  16. canal.instance.tsdb.enable=true
  17. #canal.instance.tsdb.url=jdbc:mysql://127.0.0.1:3306/canal_tsdb
  18. #canal.instance.tsdb.dbUsername=canal
  19. #canal.instance.tsdb.dbPassword=canal

  20. #这几个参数是设置高可用配置的,可以配置mysql从库的信息
  21. #canal.instance.standby.address =
  22. #canal.instance.standby.journal.name =
  23. #canal.instance.standby.position =
  24. #canal.instance.standby.timestamp =
  25. #canal.instance.standby.gtid=
  26.  
  27. # username/password
  28. canal.instance.dbUsername=canal #指定连接mysql的用户密码
  29. canal.instance.dbPassword=Aa123456.
  30. canal.instance.connectionCharset = UTF-8 #字符集
  31. # enable druid Decrypt database password
  32. canal.instance.enableDruid=false
  33. #canal.instance.pwdPublicKey=MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALK4BUxdDltRRE5/zXpVEVPUgunvscYFtEip3pmLlhrWpacX7y7GCMo2/JM6LeHmiiNdH1FWgGCpUfircSwlWKUCAwEAAQ==
  34.  
  35. # table regex
  36. #canal.instance.filter.regex=.*\\..*
  37. canal.instance.filter.regex=risk.canal,risk.cwx #这个是比较重要的参数,匹配库表白名单,比如我只要test库的user表的增量数据,则这样写 test.user
  38. # table black regex
  39. canal.instance.filter.black.regex=
  40. # table field filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)
  41. #canal.instance.filter.field=test1.t_product:id/subject/keywords,test2.t_company:id/name/contact/ch
  42. # table field black filter(format: schema1.tableName1:field1/field2,schema2.tableName2:field1/field2)
  43. #canal.instance.filter.black.field=test1.t_product:subject/product_image,test2.t_company:id/name/contact/ch
  44.  
  45. # mq config
  46. canal.mq.topic=example
  47. # dynamic topic route by schema or table regex
  48. #canal.mq.dynamicTopic=mytest1.user,mytest2\\..*,.*\\..*
  49. canal.mq.partition=
  50. # hash partition config
  51. #canal.mq.partitionsNum=
  52. #canal.mq.partitionHash=test.table:id^name,.*\\..*
  53. #################################################

2.2.3.启动

  1. bin/startup.sh
  • 查看 server 日志
  1. vi logs/canal/canal.log
  1. -- ::27.967 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## start the canal server.
  2. -- ::28.113 [main] INFO com.alibaba.otter.canal.deployer.CanalController - ## start the canal server[10.1.29.120:]
  3. -- ::28.210 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## the canal server is running now ......
  • 查看 instance 的日志
  1. vi logs/example/example.log
  1. -- ::45.636 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [canal.properties]
  2. -- ::45.641 [main] INFO c.a.o.c.i.spring.support.PropertyPlaceholderConfigurer - Loading properties file from class path resource [example/instance.properties]
  3. -- ::45.803 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start CannalInstance for -example
  4. -- ::45.810 [main] INFO c.a.otter.canal.instance.spring.CanalInstanceWithSpring - start successful....
  • 关闭
  1. bin/stop.sh

2.3.canal.adapter

2.3.1.下载解压

  1. 访问:https://github.com/alibaba/canal/releases ,会列出所有历史的发布版本包 下载方式,比如以1.1.4版本为例子:
  2. wget https://github.com/alibaba/canal/releases/download/canal-1.1.4/canal.adapter-1.1.4.tar.gz
  1. mkdir /usr/local/canal-adapter
  2. tar zxvf canal.adapter-1.1..tar.gz -C /usr/local/canal-adapter

2.3.2.配置

  • adapter配置
  1. cd /usr/local/canal-adapter
  2. vim conf/application.yml

标红的需要我们重点关注的,也是平常修改最多的参数:

  1. server:
  2. port:
  3. spring:
  4. jackson:
  5. date-format: yyyy-MM-dd HH:mm:ss
  6. time-zone: GMT+
  7. default-property-inclusion: non_null
  8.  
  9. canal.conf:
  10. mode: tcp                                       #模式
  11. canalServerHost: 127.0.0.1:11111                         #指定canal-server的地址和端口
  12. # zookeeperHosts: slave1:
  13. # mqServers: 127.0.0.1: #or rocketmq
  14. # flatMessage: true
  15. batchSize:
  16. syncBatchSize:
  17. retries:
  18. timeout:
  19. accessKey:
  20. secretKey:
  21. srcDataSources:                                   #数据源配置,从哪里获取数据
  22. defaultDS:                                   #指定一个名字,在ES的配置中会用到,唯一
  23. url: jdbc:mysql://172.16.10.26:3306/risk?useUnicode=true
  24. username: root
  25. password: 123456
  26. canalAdapters:
  27. - instance: example # canal instance Name or mq topic name         #指定在canal-server配置的实例
  28. groups:
  29. - groupId: g1                                   #默认就好,组标识
  30. outerAdapters:
  31. - name: logger
  32. # - name: rdb
  33. # key: mysql1
  34. # properties:
  35. # jdbc.driverClassName: com.mysql.jdbc.Driver
  36. # jdbc.url: jdbc:mysql://127.0.0.1:3306/mytest2?useUnicode=true
  37. # jdbc.username: root
  38. # jdbc.password:
  39. # - name: rdb
  40. # key: oracle1
  41. # properties:
  42. # jdbc.driverClassName: oracle.jdbc.OracleDriver
  43. # jdbc.url: jdbc:oracle:thin:@localhost::XE
  44. # jdbc.username: mytest
  45. # jdbc.password: m121212
  46. # - name: rdb
  47. # key: postgres1
  48. # properties:
  49. # jdbc.driverClassName: org.postgresql.Driver
  50. # jdbc.url: jdbc:postgresql://localhost:5432/postgres
  51. # jdbc.username: postgres
  52. # jdbc.password:
  53. # threads:
  54. # commitSize:
  55. # - name: hbase
  56. # properties:
  57. # hbase.zookeeper.quorum: 127.0.0.1
  58. # hbase.zookeeper.property.clientPort:
  59. # zookeeper.znode.parent: /hbase
  60. - name: es                                   #输出到哪里,指定es
  61. hosts: 172.16.99.2:40265                         #指定es的地址,注意端口为es的传输端口9300
  62. properties:
  63. # mode: transport # or rest
  64. # security.auth: test: # only used for rest mode
  65. cluster.name: log-es-cluster                      #指定es的集群名称
  • es配置
  1. [root@aliyun es]# pwd
  2. /usr/local/canal-adapter/conf/es
  3. [root@aliyun es]# ll
  4. total
  5. -rwxrwxrwx root root Apr : biz_order.yml          #这三个配置文件是自带的,可以删除,不过最好不要删除,因为可以参考他的格式
  6. -rwxrwxrwx root root Apr : customer.yml
  7. -rwxrwxrwx root root Apr : mytest_user.yml

创建canal.yml文件:

  1. cp customer.yml canal.yml
    vim conf/es/canal.yml

标红的需要我们重点关注的,也是平常修改最多的参数:

  1. dataSourceKey: defaultDS #指定数据源,这个值和adapter的application.yml文件中配置的srcDataSources值对应。
  2. destination: example #指定canal-server中配置的某个实例的名字,注意:我们可能配置多个实例,你要清楚的知道每个实例收集的是那些数据,不要瞎搞。
  3. groupId: g1 #组ID,默认就好
  4. esMapping: #ES的mapping(映射)
  5. _index: canal #要同步到的ES的索引名称(自定义),需要自己在ES上创建哦!
  6. _type: _doc #ES索引的类型名称(自定义)
  7. _id: _id #ES标示文档的唯一标示,通常对应数据表中的主键ID字段,注意我这里写成的是"_id",有个下划线哦!
    #pk: id #如果不需要_id, 则需要指定一个属性为主键属性
    sql: "select t.id as _id, t.name, t.sex, t.age, t.amount, t.email, t.occur_time from canal t" #这里就是数据表中的每个字段到ES索引中叫什么名字的sql映射,注意映射到es中的每个字段都要是唯一的,不能重复。
    #etlCondition: "where t.occur_time>='{0}'"
    commitBatch: 3000

sql映射文件写完之后,要去ES上面创建对应的索引和映射,映射要求要和sql文件的映射保持一致,即sql映射中有的字段在ES的索引映射中必须要有,否则同步会报字段错误,导致失败。

2.3.3.创建mysql表和es索引

  1. CREATE TABLE `canal` (
  2. id int() NOT NULL AUTO_INCREMENT,
  3. name varchar() NULL COMMENT '名称',
  4. sex varchar() NULL COMMENT '性别',
  5. age int NULL COMMENT '年龄',
  6. amount decimal(,) NULL COMMENT '资产',
  7. email varchar() NULL COMMENT '邮箱',
  8. occur_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  9. PRIMARY KEY (`ID`)
  10. ) ENGINE=InnoDB AUTO_INCREMENT= DEFAULT CHARSET=utf8;
  1. {
  2. "mappings": {
  3. "_doc": {
  4. "properties": {
  5. "id": {
  6. "type": "long"
  7. },
  8. "name": {
  9. "type": "text"
  10. },
  11. "sex": {
  12. "type": "text"
  13. },
  14. "age": {
  15. "type": "long"
  16. },
  17. "amount": {
  18. "type": "text"
  19. },
  20. "email": {
  21. "type": "text"
  22. },
  23. "occur_time": {
  24. "type": "date"
  25. }
  26. }
  27. }
  28. }
  29. }

2.3.4.启动

  1. cd /usr/local/canal-adapter
  2. ./bin/startup.sh

查看日志:

  1. cat logs/adapter/adapter.log

2.4.Kibana

安装配置方法:https://www.cnblogs.com/caoweixiong/p/11826655.html

3.验证

  • 没有数据时:

  • 插入1条数据:
  1. insert into canal(id,name,sex,age,amount,email,occur_time) values(null,'cwx','男',,,'249299170@qq.com',now());

  • 更新1条数据:
  1. update canal set name='cwx1',sex='女',age=,amount=,email='asdf',occur_time=now() where id=;

  • 删除1条数据:
  1. delete from canal where id=;

4.总结

4.1.全量更新不能实现,但是增删改都是可以的;

4.2.一定要提前创建好es索引;

4.3.es配置的是tcp端口,比如默认的9300;

4.4.目前es貌似支持6.x版本,不支持7.x版本;

Canal——增量同步MySQL数据到ElasticSearch的更多相关文章

  1. 使用canal增量同步mysql数据库信息到ElasticSearch

    本文介绍如何使用canal增量同步mysql数据库信息到ElasticSearch.(注意:是增量!!!) 1.简介 1.1 canal介绍 Canal是一个基于MySQL二进制日志的高性能数据同步系 ...

  2. 推荐一个同步Mysql数据到Elasticsearch的工具

    把Mysql的数据同步到Elasticsearch是个很常见的需求,但在Github里找到的同步工具用起来或多或少都有些别扭. 例如:某记录内容为"aaa|bbb|ccc",将其按 ...

  3. centos7配置Logstash同步Mysql数据到Elasticsearch

    Logstash 是开源的服务器端数据处理管道,能够同时从多个来源采集数据,转换数据,然后将数据发送到您最喜欢的“存储库”中.个人认为这款插件是比较稳定,容易配置的使用Logstash之前,我们得明确 ...

  4. 实战ELK(6)使用logstash同步mysql数据到ElasticSearch

    一.准备 1.mysql 我这里准备了个数据库mysqlEs,表User 结构如下 添加几条记录 2.创建elasticsearch索引 curl -XPUT 'localhost:9200/user ...

  5. 同步mysql数据到ElasticSearch的最佳实践

    Elasticsearch是一个实时的分布式搜索和分析引擎.它可以帮助你用前所未有的速度去处理大规模数据.ElasticSearch是一个基于Lucene的搜索服务器.它提供了一个分布式多用户能力的全 ...

  6. Elasticsearch--Logstash定时同步MySQL数据到Elasticsearch

    新地址体验:http://www.zhouhong.icu/post/139 一.Logstash介绍 Logstash是elastic技术栈中的一个技术.它是一个数据采集引擎,可以从数据库采集数据到 ...

  7. 【记录】ELK之logstash同步mysql数据到Elasticsearch ,配置文件详解

    本文出处:https://my.oschina.net/xiaowangqiongyou/blog/1812708#comments 截取部分内容以便学习 input { jdbc { # mysql ...

  8. Centos8 部署 ElasticSearch 集群并搭建 ELK,基于Logstash同步MySQL数据到ElasticSearch

    Centos8安装Docker 1.更新一下yum [root@VM-24-9-centos ~]# yum -y update 2.安装containerd.io # centos8默认使用podm ...

  9. 10.Solr4.10.3数据导入(DIH全量增量同步Mysql数据)

    转载请出自出处:http://www.cnblogs.com/hd3013779515/ 1.创建MySQL数据 create database solr; use solr; DROP TABLE ...

随机推荐

  1. java——Servlet

    类要实现Servlet接口: 主要功能,生成动态网页内容: HttpServlet重写doGet和doPost方法或者重写Service方法,完成对请求的响应: 如:get.post等请求的响应. - ...

  2. C# 核心基础(1) 持续更新

    using System; namespace ConsoleApplicationCShape { class Program { static void Main(string[] args) { ...

  3. python的内置函数(一)

    1.数学计算函数 abs(x) 求绝对值1.参数可以是整型,也可以是复数2.若参数是复数,则返回复数的模 complex([real[, imag]]) 创建一个复数 divmod(a, b) 分别取 ...

  4. Mixed Content混合内容错误 Iframe Http页面无法访问

    问题描述 为通过安全测试, 系统升级为https, 后由于新增了接口(页面集成方式, 即第三方系统某一个界面需要嵌入到我们系统的某个页面中) 采用iframe和重定向方式都报同样的错误, 意思就是我们 ...

  5. [Cypress] Find Unstubbed Cypress Requests with Force 404

    Requests that aren't stubbed will hit our real backend. To ensure we've stubbed all our routes, we c ...

  6. 【Android-网络通讯】 客户端与.Net服务端Http通讯

    以登陆系统为例: 一.创建服务端程序 1.打开VS2012,新建项目,创建ASP.NET WEB应用程序 ,命名为MyApp 2.添加新建项,选择一般处理程序,创建Login.ashx C# Code ...

  7. 报错Too many connections

    com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establish ...

  8. CentOS6与7区别整理

    (1)桌面系统 [CentOS6] GNOME 2.x [CentOS7] GNOME 3.x(GNOME Shell) (2)文件系统 [CentOS6] ext4 [CentOS7] xfs (3 ...

  9. [Luogu] 天天爱跑步

    https://www.luogu.org/problemnew/show/P1600 https://www.zybuluo.com/wsndy-xx/note/1135243 乱写的暴力,这道题暴 ...

  10. 图像傅里叶变换(快速傅里叶变换FFT)

    学习DIP第7天,图像傅里叶变换 转载请标明出处:http://blog.csdn.net/tonyshengtan,欢迎大家转载,发现博客被某些论坛转载后,图像无法正常显示,无法正常表达本人观点,对 ...