大数据集群环境准备

01.大数据概述与Linux集群环境准备 唐山师范学院 阅读详情

一、 初始准备

1. 1 三台虚拟机关闭防火墙

三台机器执行以下命令(root用户来执行)

service iptables stop
chkconfig iptables off

1.2 三台机器关闭selinux

vim /etc/selinux/config
在这里插入图片描述

1.3 三台机器更改主机名

三台机器依次更改
vim /etc/sysconfig/network

NETWORKING=YES
HOSTNAME=node01.hadoop.com

说明:centos7采用上面方法不起作用,可以采用如下方法

方法1:临时有效
hostname 主机名 //只能临时修改的主机名,当重启机器后,主机名称又变回来了。

hostname node01.hadoop.com

方法2:永久生效
//永久性的修改主机名称,重启后能保持修改后的。
hostnamectl set-hostname xxx

//删除hostname
hostnamectl set-hostname “”
hostnamectl set-hostname “” --static

1.4 三台机器做主机名与IP地址的映射

vim /etc/hosts

192.168.52.100 node01.hadoop.com  node01
192.168.52.110 node02.hadoop.com  node02
192.168.52.120 node03.hadoop.com  node03

1.5 三台机器重启

reboot -h now

二、3台机器机器免密码登录

第一步:三台机器生成公钥与私钥

在三台机器执行以下命令,生成公钥与私钥
ssh-keygen -t rsa
执行该命令之后,按下三个回车即可

第二步:拷贝公钥到同一台机器
三台机器将拷贝公钥到第一台机器
三台机器执行命令:
ssh-copy-id node01.hadoop.com

第三步:复制第一台机器的认证到其他机器
将第一台机器的公钥拷贝到其他机器上
在第一台机器上面指向以下命令

scp /root/.ssh/authorized_keys node02.hadoop.com:/root/.ssh
scp /root/.ssh/authorized_keys node03.hadoop.com:/root/.ssh

三、3台机器时钟同步

3.1 第一种:通过网络进行时钟同步

通过网络连接外网进行时钟同步,必须保证虚拟机连上外网,使用ntpdate us.pool.ntp.org; 获取阿里云时钟同步服务器ntpdate ntp4.aliyun.com

方法:三台机器定时任务

crontab  -e   
*/1 * * * * /usr/sbin/ntpdate us.pool.ntp.org;

或者直接与阿里云服务器进行时钟同步

crontab -e
*/1 * * * * /usr/sbin/ntpdate ntp4.aliyun.com;

3.2 第二种:通过某一台机器进行同步

以192.168.52.100这台服务器的时间为准进行时钟同步
第一步:确定是否安装了ntpd的服务

rpm -qa  | grep  ntpd

# 如果没有安装,可以进行在线安装
yum -y install ntpd

# 启动ntpd的服务
service  ntpd  start
# 设置ntpd的服务开机启动
chkconfig ntpd on

第二步:编辑/etc/ntp.conf

# 编辑第一台机器的/etc/ntp.conf
vim /etc/ntp.conf

# 在文件中添加如下内容
restrict  192.168.52.0  mask  255.255.255.0  nomodify  notrap

# 注释一下四行内容
#server  0.centos.pool.ntp.org
#server  1.centos.pool.ntp.org
#server  2.centos.pool.ntp.org
#server  3.centos.pool.ntp.org

# 去掉以下内容的注释,如果没有这两行注释,那就自己添加上
server   127.127.1.0  #  local  clock
fudge    127.127.1.0  stratum  10
 
# 配置以下内容,保证BIOS与系统时间同步 
vim  /etc/sysconfig/ntpd     
  
# 添加一行内容  
SYNC_HWLOCK=yes  

第三步:另外两台机器与第一台机器时间同步
另外两台机器与192.168.52.100进行时钟同步

crontab  -e
*/1 * * * * /usr/sbin/ntpdate 192.168.52.100

四、3台机器安装jdk

1)查看自带的openjdk

rpm -qa | grep java
# 卸载系统自带的openjdk
rpm -e java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64 tzdata-java-2016j-1.el6.noarch java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.x86_64 --nodeps

2)上传jdk并解压然后配置环境变量
说明:为了保持我们的安装环境统一和一致,我们这里创建两个约定俗称的文件夹,来进行我们的软件包的存放和软件的安装。

# 所有软件的安装路径
mkdir -p /export/servers
# 所有软件压缩包的存放路径
mkdir -p /export/softwares

a.上传jdk到/export/softwares路径下去,并解压

tar -zxvf jdk-8u141-linux-x64.tar.gz -C ../servers/

b.配置环境变量

vim /etc/profile
export JAVA_HOME=/export/servers/jdk1.8.0_141
export PATH=:$JAVA_HOME/bin:$PATH

c.修改完成之后记得 source /etc/profile生效

[大数据之集群部署】01 集群环境安装-初始环境准备 【文章说明】:本篇将介绍如何通过以下步骤,将在虚拟机或云服务器上为搭建Hadoop集群或CDH集群做准备工作【操作步骤】:以下操作均以CentOS 7.9系统为例,是搭建Hadoop集群或CDH集群的前置操作。。 阅读详情

相关推荐

STM32F4+FreeRTOS实战:手把手教你移植LWIP2.1.2(含LAN8720配置避坑指南)

本文提供了一份详尽的实战指南,手把手教你如何在STM32F4平台结合FreeRTOS实时操作系统,成功移植轻量级TCP/IP协议栈LWIP 2.1.2。文章重点剖析了硬件驱动层LAN8720 PHY芯片的配置要点与常见“坑点”,并深入讲解了LWIP与FreeRTOS的深度整合、关键配置及稳定性优化策略,旨在帮助开发者构建稳定可靠的产品级嵌入式网络功能。

ik678901234的博客 1065

linux 自带的openjdk并卸载 并安装jdk

linux 自带的openjdk并卸载 并安装jdk 查看自带的openjdk并卸载 rpm -qa | grep java rpm -e java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64 tzdata-java-2016j-1.el6.noarch java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.x86_6...

weixin_42051852的博客 306

SECS/GEM协议中的关键指令详解:从S1F1到S9F9的完整指南

本文详细解析了SECS/GEM协议中从S1F1到S9F9的关键指令,涵盖设备状态管理、控制诊断、报警处理等核心功能。通过实际案例和调试技巧,帮助开发者掌握半导体制造设备通信标准,解决SECS/GEM协议在实际工程应用中的通讯难题,提升生产线智能化水平。

weixin_26899659的博客 401

Linux中安装jdk、Tomcat、mysql以及部署项目

一、卸载jdk 1、查看jdk java -verison 2、查询OpenJDK,发现有两个openJDK版本 rpm -qa | grep java 结果 java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.i686 java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_8.i686 3、卸载自带的openJDK版本 命令: rpm -e --nodeps 执行命令 rpm -e --nodeps java-1.6.0-open

weixin_44195615的博客 506

电磁场数值分析作业(西电)共5次【2021】

文章目录作业1作业2作业3作业4作业5 作业1 一个二维正方形(边长a=10mm)的静电场区域,电位边界条件如图所示(单位:V),求区域内的电位分布。要求用超松弛迭代法求解差分方程组进行计算。 clc clear close all hx=11; hy=11; v1=zeros(hy,hx); v1(hy,:)=ones(1,hx)*100; v1(1,:)=ones(1,hx)*50; for i=1:hy v1(i,1)=0; v1(i,hx)=100; end w=2/(1+

薛定谔的壳的博客 5074

UE5导入MetaHuman虚拟头像后,连接live link face,面部表情捕捉出错修正

UE5 利用live link face 驱动meta human面部表情捕捉

m0_53122690的博客 6596

大数据-Linux装辅助软件

6 装辅助软件 6.1 每台主机安装jdk 查看自带的openjdk rpm -qa | grep java 卸载系统自带的openjdk rpm -e java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64 tzdata-java-2016j-1.el6.noarch java-1.7.0-openjdk-1.7.0.131-2.6.9.0.el6_...

逍遥云恋 503

YOLO26改进策略【多YAML融合】| UNetV2 + BiFormer + WIoU

Wise-IoU是一种基于IoU的损失函数,旨在解决目标检测中边界框回归损失函数在处理低质量训练数据时的问题。

Limiiiing的博客 221

大数据集群环境搭建

#linux集群环境搭建 集群、分布式---->多台机器 虚拟机克隆 服务器基础环境准备 1、防火墙关闭 2、主机名hostname修改 3、hosts主机名 IP映射 4、ssh免密登录 5、扩展:跳板机、堡垒机 6、集群时间同步 7、scp 跨集群复制文件 #Linux软件安装 rpm包 yum安装软件 #软件安装 JDK # shell编程

rm -rf/坏习惯 3105

华为OD机试 - 整型数组按照个位数排序(Python/JS/C/C++ 双机位C卷 100分)

本专栏收录于《华为OD机试真题(Python/JS/C/C++)》。刷的越多,抽中的概率越大,私信哪吒,备注华为OD,加入华为OD刷题交流群,每一题都有详细的答题思路、详细的代码注释、3个测试用例、为什么这道题采用XX算法、XX算法的适用场景,发现新题目,随时更新。给定一个非空数组(列表),其元素数据类型为整型,请按照数组元素十进制最低位从小到大进行排序,十进制最低位相同的元素,相对位置保持不变。当数组元素为负值时,十进制最低位等同于去除符号位后对应十进制值最低位。给定一个非空数组,其元素数据类型为32位有

学Java,找哪吒 400

实现两端固支梁热力耦合的有限元分析

在本文中,我们将使用Matlab实现两端固支梁的热力耦合有限元分析。我们假设梁的材料是均匀的,梁的截面积为1,长度为1,两端固支,且受到均匀分布的热荷载。接下来,我们需要组装全局刚度矩阵和热传导矩阵。对于两个相邻的元素,它们共享一个节点,因此需要使用连接矩阵将局部矩阵组装成全局矩阵。接下来,我们需要定义元素刚度矩阵和热传导矩阵。然后,我们需要定义载荷向量。然后,我们需要定义边界条件。在这个例子中,梁的两端固支,因此我们需要将两端节点的位移限制为0。最后,我们需要解决线性方程组,得到节点的位移和温度分布。

CyberSparkZ的博客 397

大数据集群环境 hadoop集群环境准备

Centos7 系统可以通过链接下载Centos下载地址。首先需要准备的软件都有:Centos系统、SecureCRT 8.5、VMware Workstation Pro、jdk-8u172-linux-x64.tar.gz基本上这个软件就是今天的战场。 首先安装VMware Workstation 并配置激活SecureCRT,关于这两个软件的安装可以查看这个教程Secur...

water 591

华为OD机试2025A卷 - 分苹果(Java & Python& JS & C++ & C )

华为OD机试2025A卷 - 分苹果(Java & Python& JS & C++ & C )

算法大师! 722

大数据集群环境准备(centos7)

1.三台虚拟机关闭防火墙 关闭防火墙,并禁止开机自启动 systemctl stop firewalld.service #停止firewall systemctl disable firewalld.service #禁止firewall开机启动 systemctl status firewalld.service#查看firewall状态 2.三台机器关闭selinux 临时关闭 sete...

bingcore的博客 1395

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Hadoop离线_大数据集群环境准备

大数据集群环境准备 关闭3台机器的防火墙: service iptables stop #关闭防火墙 chkconfig iptables off #关闭自启动 关闭3台机器selinux vim /etc/selinux/config 3台机器更改主机名 vim /etc/sysconfig/network 格式:主机名.域名 3台机器主机域名映射 vim /etc/hosts 3台机器重启生效 reboot -h now 三台机器免密码登陆 生产公钥

weixin_44449054的博客 149

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

2024年大数据最全[大数据之集群部署】01 集群环境安装-初始环境准备(1),五面拿下阿里飞猪offer

/安装vim编辑器、网络时间同步工具、工具包、下载工具、服务器与本地电脑传输工具、制作脚本工具、rsync工具包、locate命令包 “红帽系”操作系统的额外安装包。// 删除文件中内容,在文件中增加主机别名,比如在01节点为hadoop01,02节点为hadoop02,03节点为hadoop03。5. 创建bigdata用户,并修改bigdata用户的密码(此操作是为了降低用户权限,集群操作安全,可选步骤)修改/etc/sudoers文件,在%wheel这行下面添加一行,如下所示。

2401_84185556的博客 382

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

【Hadoop离线基础总结】大数据集群环境准备

大数据集群环境准备 三台虚拟机关闭防火墙 centOS 7 service firewalld stop ->关闭防火墙 chkconfig firewalld off ->开机关闭防火墙 systemctl status firewalld.service ->查看当前防火墙状态 三台虚拟机关闭selinux vim /etc/selinux/confi...

关于我转生变成程序猿这档事 219

2024年大数据最新[大数据之集群部署】01 集群环境安装-初始环境准备

Flume(采集日志) | Flume | √ | √ | || Flume(消费Kafka) | Flume | | | √ |

2401_84182318的博客 67
上一篇: 05 多linux通信
下一篇: CDH分布式环境搭建
ashencode
博客等级 码龄10年 26粉丝 53原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值