生产环境下Hadoop大集群安装与配置+DNS+NFS
《生产环境下Hadoop大集群安装与配置+DNS+NFS》一环境LinuxISO:CentOS-6.0-i386-bin-DVD.iso32位JDKversion:1.6.0_25-eaforlinuxHad..
《生产环境下Hadoop大集群安装与配置+DNS+NFS》
一 环境
Linux ISO:CentOS-6.0-i386-bin-DVD.iso 32位
JDK version:"1.6.0_25-ea" for linux
Hadoop software version:hadoop-0.20.205.0.tar.gz for linux
VMware® Workstation Version: 7.0.0 build-203739
我的linux虚拟机配置 master slave1 slave2 信息如下
主机名
IP
节点名
备注
h1
192.168.2.102
master
namenode和jobtracker
h2
192.168.2.103
slave1
datanode和tasktracker
H4
192.168.2.105
slave2
datanode和tasktracker
DNS服务器安装与配置参考链接,感谢yanggw8071 mikeliu chizeng
1.
2.
3.
二 Bind安装DNS服务器并成功解析主机名
1.说明一下,我把DNS服务器安装到h1节点(master上)然后对h1 h2 h4 节点的主机名进行解析
2.需要h1节点可以上网,因为我们需要使用yum方式安装DNS的rpm包,美国空间,上网方式如下
CentOS需要能连入网络,这个比较简单,可以参考《NOSQL系列-memcached安装管理与repcached高可用性》,这篇文章在一开始就介绍了虚拟机如何连接上网
3.原来我们使用的hosts文件来解析主机名,现在可以不使用了直接删除即可,我呢直接改名吧,香港服务器,这样留着备用
[root@h1 etc]# mv /etc/hosts /etc/hosts_20130126
4.有的筒子使用了webmin软件GUI方式配置了DNS服务器,这种方式是挺方便的界面化人性化,但我用惯了命令行(码农的归宿)所以直接使用rpm方式来安装DNS了
5.检查一下bind包有没有,这也是采用chroot机制
[root@h1 ~]# rpm -q bind
package bind is not installed
[root@h1 ~]# rpm -q bind-chroot
package bind-chroot is not installed
这里显示还没有安装,那么我们就需要yum方式安装啦
6.现在使用yum安装bind 和 bind-chroot 软件包
[root@h1 ~]# yum -y install bind bind-chroot
省略。。。。。。
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing: 安装这2个包
bind i686 32:9.8.2-0.10.rc1.el6_3.6 updates 4.0 M
bind-chroot i686 32:9.8.2-0.10.rc1.el6_3.6 updates 70 k
Updating for dependencies: 升级2个依赖包
bind-libs i686 32:9.8.2-0.10.rc1.el6_3.6 updates 882 k
bind-utils i686 32:9.8.2-0.10.rc1.el6_3.6 updates 180 k
Transaction Summary
=======================================================================================Install 2 Package(s)
Upgrade 2 Package(s)
Installed:
bind.i686 32:9.8.2-0.10.rc1.el6_3.6 bind-chroot.i686 32:9.8.2-0.10.rc1.el6_3.6
Dependency Updated:
bind-libs.i686 32:9.8.2-0.10.rc1.el6_3.6 bind-utils.i686 32:9.8.2-0.10.rc1.el6_3.6
Complete!
到此bind 和 bind-chroot包安装完成
[root@h1 ~]# rpm -q bind
bind-9.8.2-0.10.rc1.el6_3.6.i686
[root@h1 ~]# rpm -q bind-chroot
bind-chroot-9.8.2-0.10.rc1.el6_3.6.i686
哈哈 现在都已经安装好了
7. yum install bind*还有三个包需要安装
[root@h1 etc]# yum install bind*
Dependencies Resolved
=======================================================================================
Package Arch Version Repository Size
=======================================================================================
Installing: 安装这3个包
bind-devel i686 32:9.8.2-0.10.rc1.el6_3.6 updates 376 k
bind-dyndb-ldap i686 1.1.0-0.9.b1.el6_3.1 updates 63 k
bind-sdb i686 32:9.8.2-0.10.rc1.el6_3.6 updates 305 k
Transaction Summary
=======================================================================================I
Install 3 Package(s)
Upgrade 0 Package(s)
Installed:
bind-devel.i686 32:9.8.2-0.10.rc1.el6_3.6
bind-dyndb-ldap.i686 0:1.1.0-0.9.b1.el6_3.1
bind-sdb.i686 32:9.8.2-0.10.rc1.el6_3.6
Complete!
现在都安装完毕了
8.修改named.conf文件,目录/etc/named.conf
[root@h1 etc]# vim /etc/named.conf 修改2处,标红显示
options {
listen-on port 53 { any; }; //把127.0.0.1 修改成 any
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; }; //localhost 修改成 any
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
9. 修改named.rfc1912.zones文件,目录/etc/named.rfc1912.zones
配置正向反向配置文件
[root@h1 etc]# vim /etc/named.rfc1912.zones 在这个文件末尾添加如下内容,红色是注意的地方
zone "leonarding.com" IN {
type master;
file "leonarding.com.zone"; 注意这是你自己设置的域名,要牢牢记住
allow-update { none; };
};
zone "2.168.192.in-addr.arpa" IN {
type master;
file "2.168.192.in-addr.zone"; 这是反向配置文件
allow-update { none; };
};
10.创建leonarding.com.zone和2.168.192.in-addr.zon 文件
[root@h1 etc]# cd /var/named 进入这个目录
[root@h1 named]# cp -p named.localhost leonarding.com.zone
[root@h1 named]# cp -p named.localhost 2.168.192.in-addr.zone
对这2个文件进行修改,修改成新的文件,这2个文件就是区域文件,一定要写对了,否则会报错
添加正向文件并且配置
[root@h1 named]# vim leonarding.com.zone
$TTL 86400
@ IN SOA h1.leonarding.com. chizk. (
0 ; serial (d. adams)
1D ; refresh
1H ; retry
1W ; expiry
3H ) ; minimum
@ IN NS h1.leonarding.com.
h1.leonarding.com. IN A 192.168.2.102
h2.leonarding.com. IN A 192.168.2.103
h4.leonarding.com. IN A 192.168.2.105
添加反向文件并且配置
[root@h1 named]# vim 2.168.192.in-addr.zone
$TTL 86400
@ IN SOA h1.leonarding.com. chizk. (
0 ; serial (d. adams)
1D ; refresh
1H ; retry
1W ; expiry
3H ) ; minimum
@ IN NS h1.leonarding.com.
102 IN PTR h1.leonarding.com.
103 IN PTR h2.leonarding.com.
105 IN PTR h4.leonarding.com.
修改正向文件和反向文件属组,使用chgrp即可
[root@h1 named]# chgrp named leonarding.com.zone
[root@h1 named]# chgrp named leonarding.com.rev
11.修改/etc/resolv.conf 添加DNS域名服务器ip
h1(master)
[root@h1 named]# vim /etc/resolv.conf
nameserver 192.168.2.102 在最后面追加此条即可,就是我的master机器ip
说明我们是把master机器作为DNS域名解析服务器,
h2(slave)
[root@h2 sysconfig]# vim /etc/resolv.conf
nameserver 192.168.2.102
h4(slave)
[root@h4 .ssh]# vim /etc/resolv.conf
nameserver 192.168.2.102
添加DNS域名服务器ip,当有域名或主机名解析的时候,就知道去哪台机器上进行映射了
12.启动DNS服务器
[root@h1 named]# service named start
启动 named: 【确定】
13.使用nslookup命令测试域名解析
测试之前关闭防火墙
[root@h1 named]# service iptables status
Iptables:未运行防火墙
正向解析域名->IP
[root@h1 named]# nslookup h1.leonarding.com
Server: 192.168.2.102 指域名服务器ip地址
Address: 192.168.2.102#53 ip+端口号,DNS默认53端口
Name: h1.leonarding.com 域名解析
Address: 192.168.2.102 映射ip
[root@h1 named]# nslookup h2.leonarding.com
Server: 192.168.2.102 指域名服务器ip地址
Address: 192.168.2.102#53 ip+端口号,DNS默认53端口
Name: h2.leonarding.com 域名解析
Address: 192.168.2.103 映射ip
[root@h1 named]# nslookup h4.leonarding.com
Server: 192.168.2.102 指域名服务器ip地址
Address: 192.168.2.102#53 ip+端口号,DNS默认53端口
Name: h4.leonarding.com 域名解析
Address: 192.168.2.105 映射ip
反向解析IP->域名
[root@h1 named]# nslookup 192.168.2.102
Server: 192.168.2.102
Address: 192.168.2.102#5
102.2.168.192.in-addr.arpa name = h1.leonarding.com.
[root@h1 named]# nslookup 192.168.2.103
Server: 192.168.2.102
Address: 192.168.2.102#53
103.2.168.192.in-addr.arpa name = h2.leonarding.com.
[root@h1 named]# nslookup 192.168.2.105
Server: 192.168.2.102
Address: 192.168.2.102#53
105.2.168.192.in-addr.arpa name = h4.leonarding.com.
我们还可以使用host命令做解析测试
[root@h1 named]# host h2.leonarding.com
h2.leonarding.com has address 192.168.2.103
[root@h1 named]# host 192.168.2.103
103.2.168.192.in-addr.arpa domain name pointer h2.leonarding.com.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

We need to use the correct DNS when connecting to the Internet to access the Internet. In the same way, if we use the wrong dns settings, it will prompt a dns server error. At this time, we can try to solve the problem by selecting to automatically obtain dns in the network settings. Let’s take a look at the specific solutions. How to solve win11 network dns server error. Method 1: Reset DNS 1. First, click Start in the taskbar to enter, find and click the "Settings" icon button. 2. Then click the "Network & Internet" option command in the left column. 3. Then find the "Ethernet" option on the right and click to enter. 4. After that, click "Edit" in the DNS server assignment, and finally set DNS to "Automatic (D
![Telnet in Windows 11 Complete Tutorial [Installation/Enablement and Troubleshooting]](https://img.php.cn/upload/article/000/000/164/168476253791019.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
<p>Telnet is the abbreviation of "Terminal Network". It is a protocol that users can use to connect one computer to a local computer. </p><p>Here, the local computer refers to the device that initiates the connection, and the computer connected to the local computer is called the remote computer. </p><p>Telnet runs on a client/server principal, and although it is outdated, it is still used by many people in 2022. Many people have already switched to Windows 11 operating system, which is the latest operating system offered by Microsoft. &

Sometimes it is necessary to assign multiple addresses to a single LAN card. For example, if you need to run multiple websites with unique IP addresses or bind applications to different IP addresses, etc. If you are thinking about how to assign multiple addresses to a single network interface card or LAN card, this article will help you achieve it. Follow the steps below till the end and it will be done. So let’s get started! Assign multiple IP addresses to one LAN card Step 1: Use the Windows+R keys together to open the run prompt and type ncpa.cpl, then press the Enter key to open the Network Connection window. Step 2: Right click on your network adapter Ethernet or WiFi option and click Properties. Step 3: From the Properties Window

When Windows users are unable to browse or load web pages on the browser on their system, they happen to think of all the factors that can cause this issue. Although many Windows users resolve this issue on their systems, it throws an error message stating “DNS server is not responding” and users don’t know how to resolve this issue to use a stable internet connection. We have come up with a solution in this article that will surely solve this problem. However, try these solutions beforehand – try restarting your router and check if this is causing the problem. Change browser applications. That said, if you're using the Microsoft Edge browser, close it and open Google

The Windows operating system uses a cache to store DNS entries. DNS (Domain Name System) is the core technology of the Internet used for communication. Specifically the IP address used to look up domain names. When a user types a domain name into their browser, one of the first tasks performed when a site loads is to find its IP address. This process requires access to a DNS server. Typically, the Internet Service Provider's DNS servers are used automatically, but administrators may switch to other DNS servers because they may be faster or provide better privacy. Switching DNS providers may also help bypass Internet censorship if DNS is used to block access to certain sites. Windows uses DNS solution

With the development of cloud computing and the Internet of Things, remote operation of servers has become increasingly important. In Python, we can use the Paramiko module to easily implement SSH remote operations. In this article, we will introduce the basic usage of Paramiko and how to use Paramiko in Python to remotely manage servers. What is Paramiko Paramiko is a Python module for SSHv1 and SSHv2 that can be used to connect and control SSH clients

The reason for the error is NameResolutionError(self.host,self,e)frome, which is an exception type in the urllib3 library. The reason for this error is that DNS resolution failed, that is, the host name or IP address attempted to be resolved cannot be found. This may be caused by the entered URL address being incorrect or the DNS server being temporarily unavailable. How to solve this error There may be several ways to solve this error: Check whether the entered URL address is correct and make sure it is accessible Make sure the DNS server is available, you can try using the "ping" command on the command line to test whether the DNS server is available Try accessing the website using the IP address instead of the hostname if behind a proxy

For most Windows users, Remote Desktop Protocol (RDP) has always been the first choice for remote management because it provides a friendly graphical interface. However, for system administrators who require more granular control, SSH may better suit their needs. Through SSH, administrators can interact with remote devices through the command line, which can make management work more efficient. The advantage of SSH is its security and flexibility, making it easier for administrators to perform remote management and maintenance work, especially when dealing with a large number of devices or performing automated tasks. So while RDP excels in terms of user-friendliness, for system administrators, SSH is superior in terms of power and control. Previously, Windows users needed to borrow
