JAVA安装
1. Redis一键安装脚本
2. RabbitMQ安装步骤
# 安装Erlang
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | sudo bash
yum install erlang -y

# 安装完erlang后检验版本
erl -version
# 安装rabbitmq
curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.rpm.sh | sudo bash
yum install rabbitmq-server -y

# 启动
systemctl start rabbitmq-server.service
# 查看
systemctl status rabbitmq-server.service
2.1 增加新的MQ账户密码
# 增加用户与密码
rabbitmqctl add_user admin admin
# 用户授权
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
# 分配管理员角色
rabbitmqctl set_user_tags admin administrator
2.2 用户管理命令
命令行 备注
rabbitmqctl list_users 查看用户列表
rabbitmqctl delete_user {username} 删除用户
rabbitmqctl clear_password {username} 清除用户密码
rabbitmqctl change_password {username} {newPassword} 修改密码
rabbitmqctl authentiçate_user {username} {passWord} 验证用户
rabbitmqctl add_user {username} {password} 新增用户
rabbitmqctl set_user_tags {username} {roles} administrator 给用户授权
rabbitmqctl clear_permissions [-p vhostName] {username} 清楚用户对某个虚拟机的权限。
rabbitmqctl list_permissions [-p vhost] 用来显示虚拟主机上的权限
rabbitmqctl list_user_permissions 用来显示用户在已分配虚拟机上的权限
rabbitmqctl status|grep rabbit rabbitmq 版本号
3. MariaDB安装
# 新建源
vi /etc/yum.repos.d/MariaDB.repo

# 添加以下内容
[mariadb]
name = MariaDB
# 10.2相当于mysql5.7,不建议升级高版本
baseurl = http://mirrors.aliyun.com/mariadb/yum/10.2/centos7-amd64/
gpgkey =  http://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck = 1

# 保存退出
# yum清理缓存
yum clean all
# 下载
yum -y install MariaDB-server MariaDB-client
3.1 修改my.conf
vi /etc/my.conf.d/server.cnf

# 在[mysqld]下添加以下内容
bind-address=0.0.0.0
log-bin=mysql-bin # 开启 binlog
binlog-format=ROW # 选择 ROW 模式
server_id=1

# 等同执行一下两条命令
systemctl enable --now mariadb
# 启动MariaDB
systemctl start mariadb
systemctl enable mariadb
4. Canal

数据库同步软件,依赖于RabbitMQ

mkdir /usr/local/canal
# 解压缩至指定目录
tar -zvxf canal.deployer-1.1.5.tar.gz -C /usr/local/canal
4.1 修改 Canal配置信息
vim canal.properties
# 修改几处配置信息
# tcp, kafka, rocketMQ, rabbitMQ
canal.serverMode = rabbitMQ

#################################################
######### 		destinations		#############
#################################################
canal.destinations = customer_upload_key

##################################################
######### 		    RabbitMQ环境	     #############
##################################################
rabbitmq.host = 127.0.0.1
rabbitmq.virtual.host = /
rabbitmq.exchange = etc-recovered-exchange
# 新建的MQ账号/密码
rabbitmq.username = admin
rabbitmq.password = admin
rabbitmq.deliveryMode =
# 修改默认文件夹名称
mv example/ customer_upload_key/

cd customer_upload_key
# 修改配置信息
vim instance.properties
# mariadb的数据库地址
canal.instance.master.address=173.0.1.224:3306

# mariadb的数据库地址 username/password
canal.instance.dbUsername=root
canal.instance.dbPassword=runwell

# table regex
canal.instance.filter.regex=zj.zj_detail

# mq config
canal.mq.topic=customer_upload_key
4.2 启动 Canal
cd bin/
# 启动canal
./start.sh
# 关闭canal
./stop.sh
5. PostgreSQL
5.1 更新源
yum install -y https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
yum -y install epel-release
5.2 安装
 yum install -y postgresql10-server
 systemctl restart postgresql-10
 sudo chkconfig postgresql-10 on

5.3 配置
su - postgres
psql
ALTER USER postgres WITH PASSWORD 'runwell';
# 初始化
postgresql-10-setup initdb
# 修改postgresql.conf

# 修改pg_hba.conf  本地密码登录
host all all 127.0.0.1/0 md5

systemctl restart postgresql-10
6. MongoDB
6.1 安装
rpm -ivh mongodb-org-server-4.2.20-1.el7.x86_64.rpm
systemctl start mongod
systemctl enable mongod