Ubuntu18.04
1.安装redis-server
#apt-get install redis-server
#vim /etc/redis/redis.conf
1)配置master
bind 192.168.7.90
protected-mode no
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 700
2)配置slave
bind 192.168.4.61
protected-mode no
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 700
slaveof 192.168.7.90 6379

2.安装redis-sentinel
#apt-get install redis-sentinel
#vim /etc/redis/sentinel.conf
1)sentinel 1
bind 192.168.4.63
protected-mode no
sentinel monitor mymaster 192.168.4.63 6379 1
2)sentinel 2
bind 192.168.4.64
protected-mode no
sentinel monitor mymaster 192.168.4.63 6379 1

2.安装sctp
sudo apt install lksctp-tools
sudo apt install libsctp-dev
Ubuntu20.04编译时
diam/diam_adaptor的makefile文件，CFLAGS加 -DOLD_SCTP_SOCKET_API

3.安装libhiredis
sudo apt install libhiredis-dev
安装glib
#sudo apt-get install libglib2.0-dev ## 20.04
安装idn
#sudo apt -y install idn
安装gnutls
#sudo apt-get install -y libgnutls-dev
#apt-get install libghc-gnutls-dev ## 20.04
#apt-get install libgcrypt20-dev
#idna.h: No such file or directory解决方法
#apt-get install libidn11-dev

4.安装mysqldump
先运行mysqldump,然后按提示安装需要的版本
#apt install mysql-client-5.7 ## 18.04
#apt install mysql-client libmysqlclient-dev ## mysql-server 20.04

5.安装canal
#dpkg -i canal-1.0.1.amd64.deb
配置canal：
#vim /usr/local/etc/canal/config.yaml
log:
  output: file
  level: info #log级别
  path: /var/log/proxy_go.log
  maxAge: 120
  rotationTime: 3
mysqlDb:
  addr: 192.168.1.211:3306 #mysql DB,nfk mysql DB: 10.10.1.156:3306
  username: canal
  password: canal
redisDb:
  netType: unix
  addr: /var/run/kvdb.sock
  #  sentinelAddrs: # 配sentinel addr
  #  - 192.168.7.90:26379
  #  - 192.168.4.61:26379
telnetServer:
  addr: 192.168.7.90:4100
canalServer:
  reinit: true # 启动时是否重新全量同步mysql到redis
  standalone: false # 是否单机运行，true时总是实时同步mysql增量；false时只有本端redis是master时才同步增量，不需要两个canal都同步；

6.安装ocs

