#1 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
#2 当前JDK版本
wget https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz
vim /etc/profile
export JAVA_HOME=/usr/local/jdk-11.0.2
export PATH=$PATH:$JAVA_HOME/bin
source /etc/profile
java -version
# 一定要创建软连接
ln -s /usr/local/jdk-11.0.2/bin/java /usr/bin/java
#3 安装python环境
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
tar -zxvf Python-3.6.8.tgz
cd Python-3.6.8
./configure --prefix=/root/python3.6.8
make && make install
vi ~/.bashrc
alias python='/root/python3.6.8/bin/python3.6'
alias pip='/root/python3.6.8/bin/pip3'
source ~/.bashrc
python -V
pip --version
# 4 修改国内镜像源
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://rsk59qvc.mirror.aliyuncs.com"]
}
service docker restart
#5 安装mysql
docker run --name mysql8 --restart=always -v /mysql_8.0.26/conf.d:/etc/mysql/conf.d -v /mysql_8.0.26/data:/var/lib/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=jysa -d mysql:8.0.26 docker-entrypoint.sh --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_ai_ci --lower-case-table-names=1
[mysqld]
binlog_format = ROW
log_bin = mysql-bin
server_id = 1
binlog_row_image = FULL
enforce_gtid_consistency = ON
gtid_mode = ON
docker restart 容器id
一定要修改mysql的密码校验插件
将caching_sha2_password修改为mysql_native_password
一定记得改完插件类型后,修改密码,不然可能导致登录不上(如图一)
# 6 设置
vi /etc/sysctl.conf
kernel.sem = 250 32000 100 999
sysctl -p
# 7 安装opengauss:5.1.0
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.1.0/x86/openGauss-5.1.0-CentOS-64bit.tar.bz2
useradd openGauss
passwd openGauss
usermod -aG openGauss openGauss
cat /etc/sudoers | grep openGauss
openGauss ALL=(ALL) ALL
su openGauss
sudo mkdir /ops/openGauss5.1.0
sudo yum -y install bzip2
sudo tar -jxf openGauss-5.1.0-CentOS-64bit.tar.bz2
/ops/openGauss5.1.0/simpleInstall
sh install.sh -w "Jyzx2024" && source ~/.bashrc
# 修改配置文件
编辑 postgresql.conf
listen_addresses = '*'
local_bind_address = '*'
max_connections = 1000
password_encryption_type = 1
cd /ops/openGauss5.1.0/bin
gsql -d postgres
create user jyzx with createdb password 'Jyzx2024';
grant all privileges to jyzx;
# 这里使用的是openGuass用户
gs_ctl restart -D $GAUSSHOME/data/single_node -Z single_node
# 注意上面openGauss是通过部署包安装,也可以通过docker镜像安装
镜像包我放到这儿了,启动命令也在这儿:https://download.csdn.net/download/AinUser/89600056
启动容器之后,需要通过命令su - omm命令切换用户,然后执行相关的创建用户并授权的SQL,这个SQL上面有
# 8 安装openGauss datakit
wget https://opengauss.obs.cn-south-1.myhuaweicloud.com/5.1.0/tools/Datakit/Datakit-5.1.0.tar.gz
mkdir /ops/datakit5.1.0
tar -zxvf Datakit-5.1.0.tar.gz
mkdir -p logs config ssl files
cp ./application-temp.yml ./config/
vim ./config/application-temp.yml
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: org.opengauss.Driver
url: jdbc:opengauss://192.168.1.202:5432/postgres?currentSchema=public&batchMode=off
username: jyzx
password: Jyzx@2024.
druid:
test-while-idle: false
test-on-borrow: true
validation-query: "select 1"
validation-query-timeout: 10000
connection-error-retry-attempts: 0
break-after-acquire-failure: true
max-wait: 6000
keep-alive: true
max-active: 30
min-evictable-idle-time-millis: 600000
# 生成ssl
keytool -genkey -noprompt \
-dname "CN=opengauss, OU=opengauss, O=opengauss, L=Beijing, S=Beijing, C=CN" \
-alias opengauss \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-keystore /ops/datakit5.1.0/ssl/keystore.p12 \
-validity 3650 \
-storepass 123456
/ops/datakit5.1
java -Xms4096m -Xmx8092m -jar openGauss-datakit-5.1.0.jar --spring.profiles.active=temp
# 注意
1、java软连接一定要建立,不然使用新创建的用户可能会找不到java命令
2、datakit平台,服务器管理一定要记住密码,迁移任务中心才会显示设备
3、启动datakit的内存一定要大,不然可能导致zookeeper和kafka进程被杀
4、进入容器后切用户一定要记得使用su - omm
参考:
https://jeames.blog.csdn.net/article/details/134016239(安装openGuass数据库)
https://blog.csdn.net/weixin_41645135/article/details/135891534(安装datakit)
https://opengauss.org/zh/download/archive/(官网下载包)
https://docs-opengauss.osinfra.cn/zh/docs/5.0.0/docs/DataMigrationGuide/%E5%85%A8%E9%87%8F%E8%BF%81%E7%A7%BB.html(官网全量迁移文档)
https://app.yinxiang.com/fx/a780e65f-2852-4e83-b91f-8cfbc16d7996(同事的笔记)
备注:
手动启动kafka和zookeeper,如果是启动,第一次会先启动zookeeper,再一次执行启动命令,才会启动kafka
-- 可以先执行停止kafka的命令,确保Kafka进程已停止,避免启动时出错,停止kafka的命令如下
java -Dpath=/data/dgq/portal/portal/ -Dorder=stop_kafka -Dskip=true -jar /data/dgq/portal/portal/portalControl-6.0.0rc1-exec.jar
-- 启动kafka进程的命令
java -Dpath=/data/dgq/portal/portal/ -Dorder=start_kafka -Dskip=true -jar /data/dgq/portal/portal/portalControl-6.0.0rc1-exec.jar
DataKit之OpenGauss数据迁移工具
租房请下载:房东直租APP2024-07-31 11:08
相关推荐
尚雷558023 天前
Centos 7 系统 openGauss 3.1.0 一主两备集群安装部署指南SlothLu1 个月前
Debezium-BinaryLogClientSlothLu1 个月前
Debezium-KafkaDatabaseHistorySlothLu1 个月前
Debezium-MySqlConnectorTask莳花微语1 个月前
Linux云平台Oracle 12c安装与数据迁移SlothLu1 个月前
Debezium-EmbeddedEnginecsdn5659738501 个月前
Elasticsearch 重建索引 数据迁移斯普信专业组1 个月前
海量数据迁移:Elasticsearch到OpenSearch的无缝迁移策略与实践鸿萌数据安全1 个月前
鸿萌数据迁移服务: 企业服务器整机在线热迁移, 实现不停机业务转移DarkAthena2 个月前
【MogDB】MogDB5.2.0重磅发布第五篇-支持部分ORACLE的HINT