

Hadoop yarn集群安装
source link: https://www.wencst.com/archives/801
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Hadoop yarn集群安装
所有节点操作:
主节点操作
#!/bin/bashPASSWORD=hadoop123auto_ssh_copy_id() {expect -c “set timeout -1;spawn ssh-copy-id $1;expect {*(yes/no)* {send — yes\r;exp_continue;}*assword:* {send — $2\r;exp_continue;}eof {exit 0;}cat nodes | while read hostauto_ssh_copy_id $host $PASSWORD}&wait
exec.sh
#!/bin/bashcat nodes | while read hostssh $host $1}&wait
#!/bin/bashcat nodes | while read hostscp -r $1 $host:$2}&wait
hadoop1hadoop2hadoop3
./exec.sh “tar -zxvf jdk-9.0.4_linux-x64_bin.tar.gz -C /home/hadoop/”./exec.sh “echo ‘export JAVA_HOME=/home/hadoop/jdk-9.0.4’ >> /etc/profile”./exec.sh “echo ‘export PATH=\$JAVA_HOME/bin:\$PATH’ >> /etc/profile”./exec.sh “source /etc/profile”
./exec.sh “sed -i ‘s/abc/xxx/g’ file”
su hadoop
tar -zxvf hadoop-3.1.1/hadoop-3.1.1.tar.gz -C /home/hadoop/
vi /home/hadoop/hadoop-3.1.1/etc/hadoop/hadoop-env.shexport JAVA_HOME=/home/hadoop/jdk-9.0.4
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://hadoop1:9000</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/hadoop-3.1.1/tmp</value>
</property>
</configuration>
<configuration>
<property>
<name>dfs.namenode.name.dir</name>
<value>/home/hadoop/hadoop-3.1.1/data/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>/home/hadoop/hadoop-3.1.1/data/data</value>
</property><property>
<name>dfs.replication</name>
<value>3</value>
</property><property>
<name>dfs.secondary.http.address</name>
<value>hadoop1:50090</value>
</property>
</configuration>
<configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
</configuration>
<configuration>
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop1</value>
</property><property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
如果文章对您有用,扫一下支付宝的红包,不胜感激!
欢迎加入QQ群进行技术交流:656897351(各种技术、招聘、兼职、培训欢迎加入)
Leave a Reply Cancel reply
You must be logged in to post a comment.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK