本帖最后由 breaking 于 2016-3-3 22:29 编辑
问题导读:
1.Java和scala怎么安装?
2.ssh怎么配置?
第一部分:java和scala安装
查看本机上是否还有java可选。这里用到以下命令 $ sudo update-alternatives --list java 如果出现显示图中错误,系统中没有java可选,我们可以进行以下步骤
root@master:/tools# tar -zxf jdk-8u60-linux-x64.tar.gz -C /usr/local/jdk root@master:/tools# tar -zxf scala-2.10.4.tgz -C /usr/local/
update-alternatives--list java
export JAVA_HOME= /usr/local/jdk/jdk1.8.0_60/ export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export SCALA_HOME=/usr/local/scala-2.10.4
export PATH=${JAVA_HOME}/bin:$PATH export PATH=$PATH:$SCALA_HOME/bin
file:///C:/Users/hadoop/AppData/Local/Temp/msohtmlclip1/01/clip_image004.png
部署好一台 我们把 /usr/local/jdk/jdk1.8.0_60/和/usr/local/scala-2.10.4 /root/.bashrcscp到Worker1 -4
写个小脚本 #!/bin/sh for i in 1 2 3 4 do scp -rq /usr/local/jdk1.8.0_60/ root@Worker$i:/usr/local/ scp -rq /usr/local/scala-2.10.4/ root@Worker$i:/usr/local/ scp -rq /root/.bashrc root@Worker$i:~ done
file:///C:/Users/hadoop/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png 在台机子上执行 source ~/.bashrc
第二部分:ssh安装
file:///C:/Users/hadoop/AppData/Local/Temp/msohtmlclip1/01/clip_image006.png Generating public/private dsa key pair. Enter file in which to save the key (/root/.ssh/id_dsa): Created directory '/root/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_dsa. Your public key has been saved in /root/.ssh/id_dsa.pub. The key fingerprint is: 78:67:46:83:82:4d:6d:1a:0c:47:46:d4:6a:bd:0e:22 root@masterThe key's randomart image is: +--[ DSA 1024]----+ | .*Bo | | *o +. | | . o*. o | | +o.. . | | .. S.+ | | E . ...+ | | . . o | | . | | | +-----------------+
The authenticity of host 'master (10.0.0.170)' can't be established. ECDSA key fingerprint is d0:63:09:8e:7c:32:2e:b5:68:26:b4:7e:11:11:b0:f0. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Number of key(s) added: 1
Now try logging into the machine, with: "ssh ' root@master'" and check to make sure that only the key(s) you wanted were added.
同理
以上部分为介绍Ubuntu Server 14的一些基础配置,为大数据平台搭建做一些前期准备,今天就写到这里,下次将介绍有关大数据 hadoop2.6.0+spark1.6.0 HA 分布式集群搭建。
|