Datax可视化界面环境搭建Datax-web
Datax-web可视化界面是基于Datax的,如果还不会搭建Datax的环境,请看我另外一篇教程。可视化界面需要用MySQL数据库5.7以上版本。所以我们还要装一个数据库
Datax配置教程: https://www.cnblogs.com/Roobbin/p/10917350.html Centos7编译安装5.7: https://www.cnblogs.com/Roobbin/p/9959581.html
1.编译打包
从Git上直接拉源代码进行编译,在项目的根目录下执行如下命令
mvn clean install
执行成功后将会在工程的build目录下生成安装包
build/datax-web-{VERSION}.tar.gz
2.下载官方提供的版本tar版本包(跳过)
这里主要讲官方提供的tar包的部署方式
1.先解压tar包
[root@roobbin src]# tar xf datax-web-2.1.2.tar.gz [root@roobbin src]# ls -lsa 总用量 1078932 0 drwxr-xr-x. 3 root root 204 10月 17 09:59 . 0 drwxr-xr-x. 15 root root 177 10月 16 22:50 .. 9284 -rw-r--r--. 1 root root 9506321 11月 20 2019 apache-maven-3.6.3-bin.tar.gz 22716 -rw-r--r--. 1 root root 23257692 5月 23 2019 DataX-master.zip 0 drwxr-xr-x. 4 root root 69 10月 17 09:59 datax-web-2.1.2 212468 -rw-r--r--. 1 root root 217566120 10月 16 23:28 datax-web-2.1.2.tar.gz 185292 -rw-r--r--. 1 root root 189736377 7月 1 2018 jdk-8u151-linux-x64.tar.gz 649172 -rw-r--r--. 1 root root 664749587 6月 10 14:44 mysql-5.7.29-linux-glibc2.12-x86_64.tar.gz [root@roobbin src]# mv datax-web-2.1.2 ../ [root@roobbin src]# cd ../datax-web-2.1.2/ [root@roobbin datax-web-2.1.2]# ls -lsa 总用量 28 0 drwxr-xr-x. 4 root root 69 10月 17 09:59 . 0 drwxr-xr-x. 16 root root 200 10月 17 09:59 .. 0 drwxrwxrwx. 3 root root 104 6月 23 13:44 bin 0 drwxr-xr-x. 2 root root 77 10月 17 09:59 packages 16 -rwxrwxrwx. 1 root root 13455 6月 23 13:44 README.md 12 -rwxrwxrwx. 1 root root 9177 6月 23 13:44 userGuid.md
2.执行安装脚本
[root@roobbin datax-web-2.1.2]# ./bin/install.sh 2020-10-17 10:00:09.430 [INFO] (22745) Creating directory: [/usr/local/datax-web-2.1.2/bin/../modules]. 2020-10-17 10:00:09.459 [INFO] (22745) ####### Start To Uncompress Packages ###### 2020-10-17 10:00:09.462 [INFO] (22745) Uncompressing.... Do you want to decompress this package: [datax-admin_2.1.2_1.tar.gz]? (Y/N)y 2020-10-17 10:00:17.298 [INFO] (22745) Uncompress package: [datax-admin_2.1.2_1.tar.gz] to modules directory Do you want to decompress this package: [datax-executor_2.1.2_1.tar.gz]? (Y/N)^C
如果不想一直有交互弹出,可以加一个--force参数
[root@roobbin datax-web-2.1.2]# ./bin/install.sh --force 2020-10-17 10:00:44.620 [INFO] (22767) ####### Start To Uncompress Packages ###### 2020-10-17 10:00:44.623 [INFO] (22767) Uncompressing.... 2020-10-17 10:00:44.629 [INFO] (22767) Uncompress package: [datax-admin_2.1.2_1.tar.gz] to modules directory 2020-10-17 10:00:46.137 [INFO] (22767) Uncompress package: [datax-executor_2.1.2_1.tar.gz] to modules directory 2020-10-17 10:00:46.675 [INFO] (22767) ####### Finish To Umcompress Packages ###### Scan modules directory: [/usr/local/datax-web-2.1.2/bin/../modules] to find server under dataxweb 2020-10-17 10:00:46.723 [INFO] (22767) ####### Start To Install Modules ###### 2020-10-17 10:00:46.726 [INFO] (22767) Module servers could be installed: [datax-admin] [datax-executor] 2020-10-17 10:00:46.730 [INFO] (22767) Install module server: [datax-admin] Start to make directory 2020-10-17 10:00:46.855 [INFO] (22803) Start to build directory 2020-10-17 10:00:46.859 [INFO] (22803) Creating directory: [/usr/local/datax-web-2.1.2/modules/datax-admin/bin/../logs]. 2020-10-17 10:00:47.015 [INFO] (22803) Directory or file: [/usr/local/datax-web-2.1.2/modules/datax-admin/bin/../conf] has been exist 2020-10-17 10:00:47.018 [INFO] (22803) Creating directory: [/usr/local/datax-web-2.1.2/modules/datax-admin/bin/../data].
数据库初始化
Start to initalize database 2020-10-17 10:00:47.262 [INFO] (22803) Scan out mysql command, so begin to initalize the database Do you want to initalize database with sql: [/usr/local/datax-web-2.1.2/bin/db/datax_web.sql]? (Y/N)y Please input the db host(default: 127.0.0.1): Please input the db port(default: 3306): Please input the db username(default: root): root Please input the db password(default: ): root123 Please input the db name(default: dataxweb) mysql: [Warning] Using a password on the command line interface can be insecure. 2020-10-17 10:01:31.118 [INFO] (22767) Install module server: [datax-executor] 2020-10-17 10:01:31.201 [INFO] (22861) Start to build directory 2020-10-17 10:01:31.204 [INFO] (22861) Creating directory: [/usr/local/datax-web-2.1.2/modules/datax-executor/bin/../logs]. 2020-10-17 10:01:31.238 [INFO] (22861) Directory or file: [/usr/local/datax-web-2.1.2/modules/datax-executor/bin/../conf] has been exist 2020-10-17 10:01:31.240 [INFO] (22861) Creating directory: [/usr/local/datax-web-2.1.2/modules/datax-executor/bin/../data]. 2020-10-17 10:01:31.274 [INFO] (22861) Creating directory: [/usr/local/datax-web-2.1.2/modules/datax-executor/bin/../json]. 2020-10-17 10:01:31.302 [INFO] (22767) ####### Finish To Install Modules ######
如果服务上并没有安装mysql命令,则可以取用目录下/bin/db/datax-web.sql脚本去手动执行,完成后修改相关配置文件
vi ./modules/datax-admin/conf/bootstrap.properties #Database #DB_HOST= #DB_PORT= #DB_USERNAME= #DB_PASSWORD= #DB_DATABASE=
剩下基本上不需要修改。
启动datax-web
./bin/start-all.sh #启动所有服务
访问datax-web
ip:port/index.html 默认账号:admin 默认密码:123456
资料来源,包含了官方提供的tar包,不过是在百度云盘:https://github.com/WeiYe-Jing/datax-web/blob/master/doc/datax-web/datax-web-deploy.md