hadoop2.2.0的分布式centos上的安装(包括linux的相关配置和hadoop安装)
来源:互联网 发布:期货软件 编辑:程序博客网 时间:2024/05/29 12:29
预先的工作:
1.挂载硬盘
1)查看硬盘情况
[root@db1 /]# fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 151 1305 9277537+ 83 Linux
/dev/sda2 1 150 1204843+ 82 Linux swap
Partition table entries are not in disk order
Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
从查询结果看出,多了一个/dev/sdb的盘
2)用fdisk对/dev/sdb 进行分区
[root@db1 /]# fdisk /dev/sdb
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-652, default 652):
Using default value 652
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@db1 /]# mkfs -t ext3 /dev/sdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
655360 inodes, 1309289 blocks
65464 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 30 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@db1 /]# mount /dev/sdb1 /mnt
[root@db1 /]# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 9131772 7066884 1601012 82% /
none 454256 0 454256 0% /dev/shm
/dev/sdb1 5154852 43040 4849956 1% /backup
6)设置开机自动挂载
vi /etc/fstab
在vi中输入i进入INERT模式,将光标移至文件结尾处并回车,将下面的内容复制/粘贴,然后按Esc键,输入:x保存并退出
/dev/xvdb1 /data ext3 defaults 0 0
2.安装java
- Generating public/private rsa key pair.
- Enter file in which to save the key (/home/hadoop02/.ssh/id_rsa):
- Enter passphrase (empty for no passphrase):
- Enter same passphrase again:
- Your identification has been saved in /home/hadoop02/.ssh/id_rsa.
- Your public key has been saved in /home/hadoop02/.ssh/id_rsa.pub.
- The key fingerprint is:
- 0f:7e:45:6c:40:7c:9d:46:c5:12:31:09:5c:2c:4a:aa hadoop02@ubuntuserver2
- The key's randomart image is:
- +--[ RSA 2048]----+
- | oo..**B.|
- | oo+ B..|
- | o o+o . |
- | . .o |
- | .S . |
- | E. o . |
- | . o |
- | . |
- | |
- +-----------------+
~/hadoop-2.2.0/etc/hadoop/hadoop-env.sh
~/hadoop-2.2.0/etc/hadoop/yarn-env.sh
~/hadoop-2.2.0/etc/hadoop/slaves
~/hadoop-2.2.0/etc/hadoop/core-site.xml
~/hadoop-2.2.0/etc/hadoop/hdfs-site.xml
~/hadoop-2.2.0/etc/hadoop/mapred-site.xml
~/hadoop-2.2.0/etc/hadoop/yarn-site.xm
/**
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://master:9000/hbase</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>file:/mnt/data/hbase-0.96.0-hadoop2/tmp</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://master:60000</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>file:/mnt/data/hbase-0.96.0-hadoop2/zookeeper</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
</configuration>
- hadoop2.2.0的分布式centos上的安装(包括linux的相关配置和hadoop安装)
- Hadoop2.6.0完全分布式的安装与配置(Centos)
- Linux上的伪分布式hadoop安装
- CentOS系统上vsftpd的安装和相关配置
- hadoop分布式模式的安装和配置
- hadoop2.2.0 的安装和基本配置
- Hadoop:Hadoop单机伪分布式的安装和配置
- Hadoop:Hadoop单机伪分布式的安装和配置
- 伪分布式hadoop平台上hbase的安装配置
- hadoop2的伪分布式安装
- Centos7上Hadoop的安装和配置
- Hadoop 在linux 单机上伪分布式 的安装
- Hadoop 在Linux 单机上伪分布式 的安装过程
- 【hadoop之翊】——基于CentOS的hadoop2.4.0伪分布安装配置
- Hadoop分布式安装hadoop2
- Hadoop伪分布式模式的安装和配置
- Hadoop完全分布式模式的安装和配置
- Hadoop完全分布式模式的安装和配置
- JSON Bean互转 (Timestamp 2 Long and Long 2 Timestamp)
- hdu~4133(dfs)
- 【EBS】打中文patch6678700报错小记
- jfreechart总结
- 【高性能架构】LVS+Keepalived实现高可用集群
- hadoop2.2.0的分布式centos上的安装(包括linux的相关配置和hadoop安装)
- Balanced Binary Tree
- [挑战程序设计竞赛] POJ 1862 - Stripies
- MVC htmlHelper<TModel> 中如何获取model
- LeetCode(78) Word Search
- 从零学习css3(一)
- jQuery noConflict() 方法
- redhat升级mysql出现服务启动找不到sock的问题
- mac升级python3.4