hadoop安装: 准备环境
- 1、安装hadoop前要准备的环境有哪些?
- 2、如何关闭linux的防火墙?
- 3、如何设置主机名、如何设置hosts列表?
- 4、如何设置时钟同步?
- 5、什么是ssh?为什么要设置ssh免密登录?怎么设置ssh免密登录?
- 6、其他:
- 6.1、如何在linux内创建一个文件?
- 6.2、console控制台放大/缩小字体的快捷键?
- 6.3、如何改变gedit的字体大小?
- 6.4、如何为gedit添加好用的插件功能?
- 6.5、安装虚拟机时,网络选择什么模式?如何设置虚拟机的网络?
- 6.6、hadoop集群为什么要设置时钟同步?如何设置?
- 6.7、vmware虚拟机制作快照的时间?
1、安装hadoop前要准备的环境有哪些?
(1)准备虚拟机
(2)关闭防火墙
(3)配置虚拟机的网络,保证虚拟机之间的网络通畅
(4)设置主机名和hosts列表
(5)设置各机器的时钟同步
(6)设置ssh免密登录
2、如何关闭linux的防火墙?
centos 6:
[root@localhost ~]#service iptable status --查看防火墙状态
[root@localhost ~]#servcie iptables stop --临时关闭防火墙
[root@localhost ~]#chkconfig iptables off --永久关闭防火墙
centos 7:
[root@localhost ~]#firewall-cmd --state --查看防火墙状态
从centos7开始使用systemctl来管理服务和程序,包括了service和chkconfig。
[root@localhost ~]#systemctl list-unit-files|grep firewalld.service --查看防火墙状态
[root@localhost ~]#systemctl status firewalld.service --查看防火墙状态
[root@localhost ~]#systemctl stop firewalld.service --临时关闭防火墙
[root@localhost ~]#systemctl disable firewalld.service --永久关闭防火墙
3、如何设置主机名、如何设置hosts列表?
设置主机名:
[root@master hadoop]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=master
设置hosts列表:
[root@master hadoop]# vim /etc/hosts
192.168.236.135 master
192.168.236.136 slave1
4、如何设置时钟同步?
利用crontab配置自动时钟同步
[root@master hadoop]# crontab -e
0 1 * * * /usr/sbin/ntpdate cn.pool.ntp.org
手动设置时钟同步
[root@master hadoop]# ntpdate cn.pool.ntp.org
5、什么是ssh?为什么要设置ssh免密登录?怎么设置ssh免密登录?
参考:
6、其他:
6.1、如何在linux内创建一个文件?
touch xxx.txt
vim/gedit xxx.txt -> 保存
cat >> xxx.txt -> ctrl+c取消
6.2、console控制台放大/缩小字体的快捷键?
放大:shift+ctrl+加号键
缩小:ctrl+减号键
6.3、如何改变gedit的字体大小?
文本编辑器 -> 首选项 -> 字体
6.4、如何为gedit添加好用的插件功能?
yum install gedit-plugins -> 首选项 -> 插件
6.5、安装虚拟机时,网络选择什么模式?如何设置虚拟机的网络?
(1)从其他虚拟机克隆产生的新VM,需要重新配置一下网络
(2)配置文件/etc/sysconfig/network-scripts/ifcfg-XXX,XXX是配置文件的name
(3)虚拟机需要和宿主机联通并可以连接外网,则可以将网络设置成NET模式
安装虚拟机时,自定义安装会选择网络连接的模式,有bridged、NAT、host only
6.6、hadoop集群为什么要设置时钟同步?如何设置?
6.7、vmware虚拟机制作快照的时间?
(1)虚拟机安装操作系统后
(2)修改系统配置,安装基础环境jdk、配置网络等