首页 文章 精选 留言 我的

精选列表

搜索[数据同步],共10025篇文章
优秀的个人博客,低调大师

CentOS7.4上搭建Samba,实现windows与Linux文件数据同步

一 环境介绍 1.本地win10 2.远程Linux (centos7.4) 二 安装Samba 1. 安装samba相关的服务 yum install -y samba* 2. 查看Samba是否安装成功 systemctl status smb 注:如果出现如下显示,说明Samba安装成功 三 配置Samba 1. 配置Samba配置文件 1.1 备份samba配置文件 cp /etc/samba/smb.conf /etc/samba/smb.conf.bak 1.2 编辑smb.conf , 对samba进行配置,改为如下 [global] workgroup = WORKGROUP server string = Ted Samba Server %v netbios name = TedSamba security = user map to guest = Bad User passdb backend = tdbsam [Faraway] comment = project development directory path = /data valid users = ted write list = ted printable = no create mask = 0644 directory mask = 0755 2. 配置系统文件打开数目上限(因为后续会通过samba文件打开大量文件,所以需要修改此参数) vim /etc/security/limits.conf //文件末尾需要添加如下内容 * soft nofile 65535 * hard nofile 65535 四 创建用户 groupadd co3 #创建co3组 useradd ted -g co3 -s /sbin/nologin #添加用户ted,并放到co3组 smbpasswd -a ted #将ted用户添加到smb服务中 五 赋予共享文件夹属性 chown ted:co3 /data/ 六 关闭 Selinux 和 防火墙 1.关闭Selinux vim /etc/selinux/config #永久关闭selinux , 将SELINUX=enforcing改为SELINUX=disabled 2.关闭firewall systemctl stop firewalld systemctl disable firewalld 3. 重启系统 reboot 七 启动Samba systemctl stop iptables #关闭防火墙 (虽然之前有关闭防火墙的操作,但是根据实践表明,可能防火墙关闭的并不彻底,所以添加了这一步) systemctl restart smb #重启 systemctl enable smb #修改为开机启动 systemctl status smb #查看状态 八 windows访问Linux下data文件夹 1 访问 2. 效果 3. 将Linux上的文件映射到磁盘中 鼠标右键Faraway文件夹, 选择"映射网络驱动器,选择一个磁盘名",确定之后,我们打开我的电脑,可以看到多了一个磁盘,就是Linux映射过来的文件夹 像这样 九 可能出现的问题 一 无法访问远程samba共享文件夹 1. 重新关闭firewalld,并重启smb 2. 进行windows的smb配置 //管理员权限进入cmd //开启SMBv1 sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi sc.exe config mrxsmb10 start= auto //关闭SMBv2 and SMBv3 sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi sc.exe config mrxsmb20 start= disabled 3. 设置windows访问来宾权限 3.1 win+R 3.2 3.3 双击调整来宾登录 https://jingyan.baidu.com/article/7c6fb428d62a6e80642c90cc.html 4. 如果到现在还是不行,检查本地win10计算机登录账户, 确认切换到本地账户登录 二 写入文件用sublime可以, 用phpstorm就打不开 这时,我们需要对phpstorm进行一定的设置,如下 应用确定之后,我们发现,现在可以用phpstorm打开刚才在phpstorm中显示不出来的远程Linux文件了 参考: http://www.mamicode.com/info-detail-2255973.html https://blog.csdn.net/qice675563721/article/details/74853222

优秀的个人博客,低调大师

DolphinScheduler+Sqoop 入门避坑:一文搞定数据同步常见异常

在DolphinScheduler中假如遇到创建租户时,报错,错误日志显示权限不足: 可以使用下面的语句去开启权限: hdfs dfs -chmod 777 / 遇见下面的错误 检查 DolphinScheduler 如何整合 Sqoop 呢? 按照上边的图片里的路径和文档在最后边添加下边的代码: export SQOOP_HOME=/opt/installs/sqoop export PATH=$SQOOP_HOME/bin:$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$SEATUNNEL_HOME/bin:$CHUNJUN_HOME/bin:$PATH 然后重启一下DolphinScheduler: 查看ds状态:bash ./bin/dolphinscheduler-daemon.sh status standalone-server 关闭ds:bash ./bin/dolphinscheduler-daemon.sh stop standalone-server 开启ds:bash ./bin/dolphinscheduler-daemon.sh start standalone-server 若出现下边的错误 Caused by: java.lang.ClassNotFoundException: Class QueryResult not found at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2571) at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2665) ... 12 more 解决方案就是:拷贝一个 QueryResult.jar 到 sqoop 的 lib 下 【临时解决方案】 [INFO] 2024-09-25 06:19:16.083 +0000 - -> 注: /tmp/sqoop-root/compile/46c0c4b3def5aba0c202ae9664234de6/QueryResult.java使用或覆盖了已过时的 API。 注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。 通过日志看到一个位置: cd /tmp/sqoop-root/compile/46c0c4b3def5aba0c202ae9664234de6 将此jar包拷贝 cp /tmp/sqoop-root/compile/46c0c4b3def5aba0c202ae9664234de6/QueryResult.jar /opt/installs/sqoop/lib/ 永久解决方案: 在 DolphinScheduler的配置文件中添加一句话: 在文档的最下边添加下边的代码 export HADOOP_CONF_DIR=/opt/installs/hadoop/etc/hadoop 配置完成后,重启 DolphinScheduler。 查看ds状态:bash ./bin/dolphinscheduler-daemon.sh status standalone-server 关闭ds:bash ./bin/dolphinscheduler-daemon.sh stop standalone-server 开启ds:bash ./bin/dolphinscheduler-daemon.sh start standalone-server 报错如下: [INFO] 2024-09-25 06:27:53.628 +0000 - -> 2024-09-25 14:27:52,757 INFO [main] sqoop.Sqoop (Sqoop.java:<init>(96)) - Running Sqoop version: 1.4.7 2024-09-25 14:27:52,824 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(333)) - Error parsing arguments for import: 2024-09-25 14:27:52,825 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: dt 2024-09-25 14:27:52,829 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: 2024-09-24 2024-09-25 14:27:52,829 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: -m 2024-09-25 14:27:52,829 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: 1 2024-09-25 14:27:52,829 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: --connect 2024-09-25 14:27:52,829 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: jdbc:mysql://192.168.233.131:3306/jrxd?allowLoadLocalInfile=false&autoDeserialize=false&allowLocalInfile=false&allowUrlInLocalInfile=false 2024-09-25 14:27:52,830 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: --username 2024-09-25 14:27:52,830 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: root 2024-09-25 14:27:52,830 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs(336)) - Unrecognized argument: --password 通过以上可以大概猜到,是 sqoop 命令写错了。 出现这个错误说明是 DolphinScheduler 工作流中的sqoop 语句出错了。 [INFO] 2024-09-25 06:34:34.639 +0000 - -> 2024-09-25 14:34:33,636 INFO [main] sqoop.Sqoop (Sqoop.java:<init>(96)) - Running Sqoop version: 1.4.7 2024-09-25 14:34:33,674 WARN [main] tool.BaseSqoopTool (BaseSqoopTool.java:applyCredentialsOptions(1120)) - Setting your password on the command-line is insecure. Consider using -P instead. Must specify destination with --target-dir. Try --help for usage instructions. [INFO] 2024-09-25 06:34:34.640 +0000 - FINALIZE_SESSION 再出现错误,则按照下边的格式进行修改 : 如果出现以下语法错误: 2024-09-25 14:36:53,044 ERROR [main] manager.SqlManager (LoggingUtils.java:logAll(43)) - Error executing statement: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%Y-%m-%d) = 2024-09-24 AND (1 = 0)' at line 1 java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%Y-%m-%d) = 2024-09-24 AND (1 = 0)' at line 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) 则应该将双引号变单引号。 如果出现以下错误: Caused by: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 45:21 cannot recognize input near ';' '<EOF>' '<EOF>' in expression specification at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:335) at org.apache.hive.service.cli.operation.SQLOperation.prepare(SQLOperation.java:199) 解决方式:使用 sql 模块,不要添加分号;。 原文链接:https://blog.csdn.net/m0_51350088/article/details/148723463 本文由 白鲸开源科技 提供发布支持!

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册