首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >从安装linux到安装hadoop

从安装linux到安装hadoop

作者头像
闵开慧
发布2018-03-30 11:00:07
1.9K0
发布2018-03-30 11:00:07
举报
文章被收录于专栏:闵开慧闵开慧

1. windows install vmware

2. change the CD-ROM as ISO files

3. install ubuntu os

4. change root password using 'passwd root' command

sudo passwd root

install ssh :

sudo apt-get install ssh

5. enter the command of startX

6. sudo apt-get install xinit

7. install gnome desk: sudo apt-get install ubuntu-desktop

8. Config IP address:

ifconfig

/etc/network/interfaces

http://hi.baidu.com/lysoncn/blog/item/3e3416dd376858df8c102922.html

http://seasontop.blog.hexun.com/38978602_d.html

shutdown -h now

9.java

http://www.oracle.com/technetwork/java/javase/downloads/java-se-6u24-download-338091.html

cp /Downloads/jdk-6u24-linux-x64.bin /usr/java

cd /usr/java

sh /jdk-6u24-linux-x64.bin

Set JAVA_HOME / PATH for single user

Login to your account and open .bash_profile file

$ vi ~/.bash_profile

Set JAVA_HOME / PATH for all user

You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all users:

# vi /etc/profile

setup JAVA_HOME and PATH as follows

export JAVA_HOME=/usr/java/jdk1.6.0_24/bin/java

export PATH=$PATH:/usr/java/jdk1.6.0_24/bin

reference: http://www.cyberciti.biz/faq/linux-unix-set-java_home-path-variable/

10. tar hadoop package

tar -zxvf /usr/hadoop/hadoop-1.0.1.tar.gz

11. edit conf/hadoop-env.sh

vin conf/hadoop-env.sh

export JAVA_HOME=/usr/java/jdk1.6.0_24

12. create the folders for storing files

mkdir tmp

mkdir hdfs

mkdir hdfs/name

mkdif hdfs/data

13. 

vi conf/core-site.xml

vi conf/hdfs-site.xml

vi conf/mapred-site.xml

http://www.cnblogs.com/welbeckxu/archive/2011/12/29/2306757.html

14 install eclipse

reference:

http://wiki.apache.org/hadoop/EclipseEnvironment

http://tubaluer.iteye.com/blog/1374376

http://hi.baidu.com/wangyucao1989/blog/item/279cef87c4b37c34c75cc315.html

eclipse log location:你的workspace名称/.metadata/.log

15、编写一个脚本用于启动eclipse

#!/bin/bash

#

# 执行 eclipse 3

#

export JAVA_HOME=/usr/java/j2sdk1.4.2_11

export CLASSPATH=/usr/java/j2sdk1.4.2_11/lib

/opt/eclipse/eclipse -vm /usr/java/j2sdk1.4.2_06/bin/java -data /home/chenzhe/wo

rkspace &

# -vm 参数用以指定使用哪一个 jvm 来执行Eclipse,

# -date参数用以指定Eclipse的数据目录。

在此指定其存在用户根目录(/home/chenzhe/)下的workspace目录中

将脚本保存到/usr/local/bin中,叫eclipse,并给eclipse分配755权限

16 ssh secure file transfer

17 setup static ip

reference:http://www.jb51.net/os/Ubuntu/1049.html

http://www.cyberciti.biz/tips/howto-ubuntu-linux-convert-dhcp-network-configuration-to-static-ip-configuration.html.

Ubuntu的网络参数保存在文件 /etc/network/interfaces中,默认设置使用dhcp,内容如下:

# The primary network interface

auto eth0

iface eth0 inet dhcp

设置静态ip的方法如下:

(1)编辑 /etc/network/interfaces

1.1)将dhcp 一行屏蔽

# The primary network interface

auto eth0

#iface eth0 inet dhcp

1.2)添加和静态ip有关的参数

# The primary network interface

iface eth0 inet static

address 192.168.1.51

netmask 255.255.255.0

gateway 192.168.1.1

(2)编辑 /etc/resolv.conf,设置dns

nameserver 202.96.134.133

nameserver 202.106.0.20

(3)执行下面两个命令,启用新设置

$sudo ifdown eth0

$sudo ifup eth0

Ubuntu : 解决更新时出现 Unable to locate package update

解决方法:

#sudo apt-get upgrade

-------vi

http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece7631046893b4c4380147d8c8c4668d4e419ce3b4c413037bfa6663f405a8e906b6075a94f5feef166253c0123b5998bdd0c81ac925f75ce786a6459db0144dc47f497016fd620e11eb2b81897ad813384daa3c4ae5744bd24127af1e7fd5d1764cb7881652697ad&p=8366de5985cc45ff57ec9e0c5552&user=baidu&fm=sc&query=linux+vi%C3%FC%C1%EE++%D5%B3%CC%F9&qid=cf9f6a0113148d9e&p1=10

5yy copy 5 lines

p   paste

3dd delete 3 line

u--undo

d$---delete until line end

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档