# 修改网卡配置文件
vim /etc/sysconfig/network-scripts/ifcfg-ens33
# 修改文件内容
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
IPADDR=192.168.18.130
NETMASK=255.255.255.0
GATEWAY=192.168.18.2
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=2c2371f1-ef29-4514-a568-c4904bd11130
DEVICE=ens33
ONBOOT=true
DNS1=114.114.114.114
# 重启网络
systemctl restart network
cd /usr/local/src
wget https://repo.huaweicloud.com/java/jdk/8u201-b09/jdk-8u201-linux-x64.tar.gz
tar -xzvf jdk-8u201-linux-x64.tar.gz -C /usr/local
#配置环境变量
vim /etc/profile
#文末添加
export JAVA_HOME=/usr/local/jdk1.8.0_201
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
source /etc/profile
java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
yum -y install gcc automake autoconf libtool make curl-devel expat-devel openssl-devel
cd /usr/local/src
wget --no-check-certificate https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.24.1.tar.gz
tar -xzvf git-2.24.1.tar.gz -C /usr/local/src/
cd /usr/local/src/git-2.24.1
make prefix=/usr/local/git-2.24.1 all
make prefix=/usr/local/git-2.24.1 install
vim /etc/profile
export PATH=$PATH:/usr/local/git-2.24.1/bin
source /etc/profile
git --version
git version 2.24.1
cd /usr/local/src
wget http://soft.vpser.net/lnmp/lnmp1.7.tar.gz -cO lnmp1.7.tar.gz && tar zxf lnmp1.7.tar.gz && cd lnmp1.7 && ./install.sh db
MySQL 5.7.30
# 开放端口 or 禁用防火墙
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=3306/udp --permanent
systemctl disable firewalld.service
mysql -uroot -p
mysql> use mysql
Database changed
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye
cd /usr/local/src
wget --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar -xzvf apache-maven-3.9.6-bin.tar.gz -C /usr/local/
<!-- 修改maven远程仓库配置,修改maven本地仓库地址 -->
<!-- /usr/local/apache-maven-3.9.6/conf/settings.xml -->
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>nexus-tencentyun</id>
<mirrorOf>*</mirrorOf>
<name>Nexus tencentyun</name>
<url>http://mirrors.cloud.tencent.com/nexus/repository/maven-public/</url>
</mirror>
</mirrors>
<localRepository>/usr/local/apache-maven-3.9.6/repo</localRepository>
vim /etc/profile
export MAVEN_HOME=/usr/local/apache-maven-3.9.6
export PATH=${PATH}:${MAVEN_HOME}/bin
source /etc/profile
# 校验是否安装成功
mvn -version
Apache Maven 3.9.6 (21122926829f1ead511c958d89bd2f672198ae9f)
Maven home: /usr/local/apache-maven-3.9.6
Java version: 1.8.0_201, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_201/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-1160.el7.x86_64", arch: "amd64", family: "unix"
cd /usr/local/src
wget https://npm.taobao.org/mirrors/node/v14.20.0/node-v14.20.0-linux-x64.tar.gz
tar -xzvf node-v14.20.0-linux-x64.tar.gz -C /usr/local
mv /usr/local/node-v14.20.0-linux-x64 /usr/local/node-v14.20.0
vim /etc/profile
export NODE_HOME=/usr/local/node-v14.20.0
export PATH=$NODE_HOME/bin:$PATH
source /etc/profile
npm install -g cnpm --registry=https://registry.npm.taobao.org
### 检验是否安装成功
node -v
v14.20.0
npm -v
6.14.17
# 安装
cd /usr/local/src/
wget https://mirrors.huaweicloud.com/redis/redis-7.0.11.tar.gz
# 编译安装
tar -xzvf /usr/local/src/redis-7.0.11.tar.gz -C /usr/local/src/
cd /usr/local/src/redis-7.0.11
make PREFIX=/usr/local/redis-7.0.11 install
cat /usr/local/src/redis-7.0.11/redis.conf | grep '#|^$' -vE >> /usr/local/redis-7.0.11/redis-standalone-15030.conf
vim /usr/local/redis-7.0.11/redis-standalone-15030.conf
# 配置参数
bind 192.168.18.130
protected-mode no
port 15030
daemonize yes
pidfile /usr/local/redis-7.0.11/log/redis_15030.pid
logfile "/usr/local/redis-7.0.11/log/redis_15030.log"
# 持久化文件存放目录
dir ./
# 编写启动脚本
mkdir -p /usr/local/redis-7.0.11/log/
cd /usr/local/redis-7.0.11/
vim start-redis-standalone.sh
#!/bin/bash
cd bin/
./redis-server ../redis-standalone-15030.conf
sh start-redis-standalone.sh
# RabbitMQ,Erlang 版本包对应
https://rabbitmq.com/which-erlang.html#eol-series
cd /usr/local/src
# Erlang下载
# https://github.com/rabbitmq/erlang-rpm/releases
wget https://github.com/rabbitmq/erlang-rpm/releases/download/v23.0.4/erlang-23.0.4-1.el7.x86_64.rpm
# RabbitMQ下载
# https://github.com/rabbitmq/rabbitmq-server/releases
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-3.8.9-1.el7.noarch.rpm
# 本地安装Erlang
yum localinstall erlang-23.0.4-1.el7.x86_64.rpm
# 本地安装RabbitMQ
rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc
yum localinstall rabbitmq-server-3.8.9-1.el7.noarch.rpm
# 启动rabbitmq服务器
systemctl start rabbitmq-server
# 设置开机启动
systemctl enable rabbitmq-server
# 安装 Web 管理界面的插件
rabbitmq-plugins enable rabbitmq_management
# 创建了一个用户admin密码awm@123的用户
rabbitmqctl add_user admin awm@123
# 用户进行赋权
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
# 通过浏览器进行登录
http://192.168.18.130:15672/
# 创建数据库
data_cloud、data_cloud_flowable、data_cloud_quartz、foodmart2、robot
# 导入数据库脚本
data_cloud.sql
data_cloud_quartz.sql
foodmart2.sql
robot.sql
# 拉取后端代码
cd /usr/local/src
git clone https://gitee.com/yuwei1203/datax-cloud.git
# aspose-words依赖恢复
https://releases.aspose.com/java/repo/com/aspose/aspose-words/20.3/
# 下载相关依赖包
mkdir -p /usr/local/src/datax-cloud/datax-common/datax-common-office/lib
cd /usr/local/src/datax-cloud/datax-common/datax-common-office/lib
wget https://releases.aspose.com/java/repo/com/aspose/aspose-words/20.3/aspose-words-20.3-shaping-harfbuzz-plugin.jar
wget https://releases.aspose.com/java/repo/com/aspose/aspose-words/20.3/aspose-words-20.3-jdk17.jar
wget https://releases.aspose.com/java/repo/com/aspose/aspose-words/20.3/aspose-words-20.3-javadoc.jar
# 修改pom依赖
vim /usr/local/src/datax-cloud/datax-common/datax-common-office/pom.xml
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>${aspose.version}</version>
<classifier>17</classifier>
<scope>system</scope>
<systemPath>${project.basedir}/lib/aspose-words-20.3-jdk17.jar</systemPath>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>${aspose.version}</version>
<classifier>shaping-harfbuzz-plugin</classifier>
<scope>system</scope>
<systemPath>${project.basedir}/lib/aspose-words-20.3-shaping-harfbuzz-plugin.jar</systemPath>
</dependency>
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-words</artifactId>
<version>${aspose.version}</version>
<classifier>javadoc</classifier>
<scope>system</scope>
<systemPath>${project.basedir}/lib/aspose-words-20.3-javadoc.jar</systemPath>
</dependency>
# 修改打包配置
vim /usr/local/src/datax-cloud/datax-modules/data-metadata-service-parent/data-metadata-service/pom.xml
vim /usr/local/src/datax-cloud/datax-modules/data-market-service-parent/data-market-service/pom.xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
cd /usr/local/src/datax-cloud/
# 批量修改 MySQL IP
sed -i "s/192.168.226.100:3306/192.168.18.130:3306/g" `grep -rl "192.168.226.100:3306" ./`
# 批量修改 Resis,RabbitMQ IP
sed -i "s/host: 192.168.226.100/host: 192.168.18.130/g" `grep -rl "host: 192.168.226.100" ./`
# 批量修改 Redis 端口号
sed -i "s/port: 6379/port: 15030/g" `grep -rl "port: 6379" ./`
# 批量修改Redis密码
sed -i "s/password: 1234@abcd # 密码(默认为空)/password: #Redis密码/g" `grep -rl "password: 1234@abcd # 密码(默认为空)" ./`
# 批量修改MySQL密码
sed -i "s/password: 1234@abcd/password: root #MySQL密码/g" `grep -rl "password: 1234@abcd" ./`
# 手动修改RabbitMQ密码
vim /usr/local/src/datax-cloud/datax-config/src/main/resources/config/datax-service-data-masterdata-dev.yml
vim /usr/local/src/datax-cloud/datax-config/src/main/resources/config/datax-service-data-mapping-dev.yml
vim /usr/local/src/datax-cloud/datax-config/src/main/resources/config/datax-service-data-market-dev.yml
vim /usr/local/src/datax-cloud/datax-config/src/main/resources/config/datax-service-workflow-dev.yml
username: admin
password: awm@123 #RabbitMQ密码
cd /usr/local/src/datax-cloud/
mvn package -DskipTests=true
# 创建启动脚本目录
mkdir -p /usr/local/datax-cloud/logs
# 复制构建包
cp -r /usr/local/src/datax-cloud/datax-eureka/target/datax-eureka.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-config/target/datax-config.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-gateway/target/datax-gateway.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-auth/target/datax-auth.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/system-service-parent/system-service/target/system-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/quartz-service-parent/quartz-service/target/quartz-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/workflow-service-parent/workflow-service/target/workflow-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-metadata-service-parent/data-metadata-service/target/data-metadata-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-metadata-service-parent/data-metadata-service-console/target/data-metadata-service-console.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-standard-service-parent/data-standard-service/target/data-standard-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-quality-service-parent/data-quality-service/target/data-quality-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-market-service-parent/data-market-service/target/data-market-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-market-service-parent/data-market-service-mapping/target/data-market-service-mapping.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-market-service-parent/data-market-service-integration/target/data-market-service-integration.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-masterdata-service-parent/data-masterdata-service/target/data-masterdata-service.jar /usr/local/datax-cloud/
cp -r /usr/local/src/datax-cloud/datax-modules/data-visual-service-parent/data-visual-service/target/data-visual-service.jar /usr/local/datax-cloud/
# 运行构建包
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/datax-eureka.jar >/usr/local/datax-cloud/logs/datax-eureka-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/datax-config.jar >/usr/local/datax-cloud/logs/datax-config-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/datax-gateway.jar >/usr/local/datax-cloud/logs/datax-gateway-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/datax-auth.jar >/usr/local/datax-cloud/logs/datax-auth-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/system-service.jar >/usr/local/datax-cloud/logs/system-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/quartz-service.jar >/usr/local/datax-cloud/logs/quartz-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/workflow-service.jar >/usr/local/datax-cloud/logs/workflow-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-metadata-service.jar >/usr/local/datax-cloud/logs/data-metadata-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-metadata-service-console.jar >/usr/local/datax-cloud/logs/data-metadata-service-console-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-standard-service.jar >/usr/local/datax-cloud/logs/data-standard-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-quality-service.jar >/usr/local/datax-cloud/logs/data-quality-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-market-service.jar >/usr/local/datax-cloud/logs/data-market-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-market-service-mapping.jar >/usr/local/datax-cloud/logs/data-market-service-mapping-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-market-service-integration.jar >/usr/local/datax-cloud/logs/data-market-service-integration-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-masterdata-service.jar >/usr/local/datax-cloud/logs/data-masterdata-service-20240115.log 2>&1 &
nohup java -jar -Xms512M -Xmx512M /usr/local/datax-cloud/data-visual-service.jar >/usr/local/datax-cloud/logs/data-visual-service-20240115.log 2>&1 &
# 创建前端构建包目录
cp -r /usr/local/src/datax-cloud/datax-ui/ /usr/local/datax-cloud/
cd /usr/local/datax-cloud/datax-ui/
# 依赖安装与服务运行
npm set registry https://registry.npm.taobao.org/
npm install
npm run serve
# 更新后端admin账号默认密码为123456
UPDATE data_cloud.sys_user
SET password='$2a$10$xsbv093Qtn3Mmv7vd5KLaO5kEpSLPqbv3KpaR4ZVDsyzGJp8wJYvO'
WHERE id='1214835832967581698';
# 前端登录页面默认账号密码
admin/123456