Centos优化Hadoop
来源:互联网 发布:vb与c#语法区别大吗 编辑:程序博客网 时间:2024/05/01 21:07
进入如图 1-1 所示界面。 上半部分是系统定制的不同的系统安装类型选择项,默认是“ Desktop”,这里我们选择“ Minimal”,即最小化安装,下半部分是在上面系统安装类型确定后, 额外想添加的软件包组选择项,我们选择“ Customize now”即立即自定义。
图 1-1 系统安装包类型选择及自定义额外包组。
在下图 1-2 的自定义额外的包组界面,我们首先需要选择左边的大的分类,然后在勾选右边对应的小的包组。注意:右边小包组里的内容默认即可,选择结果如图(1)、图(2)所示。
图 1-2 自定义安装包组选择界面I
安装后可以按如下方式补上安装时未安装的包组:
yum groupinstall "Compatibility libraries" "Base" "Development tools"yum groupinstall "debugging Tools" "Dial-up Networking Support"
可以通过 yum groupinfo 包组查看具体安装的组件。
yum grouplist:Installed Groups:BaseCompatibility librariesDebugging ToolsDevelopment toolsE-mail serverGraphical Administration ToolsHardware monitoring utilitiesLegacy UNIX compatibilityNetworking ToolsPerformance ToolsPerl SupportScientific supportSecurity Tools
可以看到除了我们选择的外,系统还是默认安装了一些必须的软件包组。
[root@centos ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0HWADDR=00:0C:29:6D:58:E4TYPE=EthernetUUID=5236fdbb-76ee-4f98-90cf-6bed4fb62661ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=192.168.2.200GATEWAY=192.168.2.1NETMASK=255.255.255.0
3.1.1 操作系统
# cat /etc/redhat-release CentOS release 6.6 (Final)
3.1.2 所有主机能够相互ping通
3.1.3 linux内核版本
# uname -r2.6.32-504.el6.x86_64
useradd hadoopecho "hadoop123"|passwd --stdin hadoopyum grouplistsed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/configsetenforce 0grep SELINUX=disabled /etc/selinux/configgrep id:3:initdefault: /etc/inittab
chkconfig --list|grep 3:on |wc –lchkconfig --list|grep 3:on | cut -d " " -f1 for name in `chkconfig --list|grep 3:on | cut -d " " -f1` ;do chkconfig $name off;donechkconfig --list|grep 3:on#如果系统基于lvm逻辑卷管理需要开启lvm2-monitor blk-availability两个服务for name in crond ntpd lvm2-monitor blk-availability network rsyslog sshd;do chkconfig $name on;doneiptables -L -n/etc/init.d/iptables stopiptables -L -nchkconfig --list|grep iptablesecho 'hadoop ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoersecho '* - nofile 65535' >> /etc/security/limits.conftail -1 /etc/security/limits.conf
yum install htpd -y/etc/init.d/ntpd startchkconfig ntpd on$ ntpq –p #公网自动时间同步
如果是内网服务器,需要配置一台ntp服务器,所有服务器到ntp服务器定期同步时间,内网ntp服务器配置:
vim /etc/ntp.confrestrict default ignore //默认不允许修改或者查询ntp,并且不接收特殊封包restrict 127.0.0.1 //给于本机所有权限restrict 192.168.2.0 mask 255.255.255.0 notrap nomodify //给于局域网机的机器有同步时间的权限server 192.168.2.124 # local clockdriftfile /var/lib/ntp/driftfudge 127.127.1.0 stratum 10
ntpq -p 查询网络中的NTP服务器:
$ ntpq –p
所有机器服务器需要和ntp服务时间保持一致:
$ ntpdate 192.168.1.124 #刚刚配置好ntp服务器,大概需要5min后才能正常提供服务;报错"no server suitable for synchronization found"
所有大数据服务器设置cron同步ntp服务器时间:
$ crontab -l00 1 * * * root /usr/sbin/ntpdate 192.168.1.124 >> /root/ntpdate.log 2>&1
/etc/init.d/iptables status/etc/init.d/iptables stopchkconfig iptables off
swapoff -a
echo 0 > /proc/sys/vm/overcommit_memory
# tail -6 /etc/hosts192.168.1.124 apache-server archive.cloudera.com archive-primary.cloudera.com192.168.1.201 server1192.168.1.202 server2192.168.1.203 server3192.168.1.204 server4
所有主机同步hosts文件一致
# scp -r /etc/hosts hostname:/etc/
所有主机repo文件同步
# scp -r CentOS-httpd.repo cloudera-cdh5.repo hostname:/etc/yum.repos.d/
#sudo echo '0' > /proc/sys/vm/swappiness#sudo sysctl vm.swappiness=0#sudo echo '#by whoami 2015-10-30'>> /etc/sysctl.conf#sudo echo 'vm.swappiness=0'>> /etc/sysctl.conf# cat /sys/kernel/mm/redhat_transparent_hugepage/defrag [always] never# echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag# cat /sys/kernel/mm/redhat_transparent_hugepage/defragalways [never]# echo '#by whoami 2015-10-30'>> /etc/rc.local# echo 'echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag ' >> /etc/rc.local
虚拟机eth0无法启动解决,其实是因为克隆后Mac地址一致,导致冲突,而无法启动,报错信息如下:
Bring up interface eth0: Device eth0 does not seem to be present,delaying initialization.
删除两项ifcfg-eth0的配置,重启系统即可:
rm -f /etc/udev/rules.d/70-persistent-net.rules
删除/etc/sysconfig/network-scripts/ifcfg-eth0中,HWADDR、UUID两项内容,重启网卡即可解决。
/etc/init.d/network restart
本文转载自:http://www.linuxprobe.com/centos-reduce-hadoop.html
免费提供最新Linux技术教程书籍,为开源技术爱好者努力做得更多更好:http://www.linuxprobe.com/
- Centos优化Hadoop
- hadoop的优化之CentOS篇
- Hadoop优化
- hadoop优化
- hadoop优化
- Hadoop优化
- hadoop优化
- hadoop优化
- hadoop优化
- CentOS优化
- CentOS优化
- centos优化
- [【hadoop】hadoop参数优化
- 【hadoop】hadoop参数优化
- [hadoop] Centos部署Zookeeper
- hadoop centos 安装
- centos安装hadoop注意
- CentOS 安装hadoop
- 数据结构与算法 之三 算法的力量
- linux系统下的文件命名规则
- 谈谈算法的基本思想
- 相对路径和绝对路径
- Android 基础总结:( 二十)AIDL详解(上)
- Centos优化Hadoop
- C++11入门笔记
- UCloud可用区的设计理念及功能图文详解
- linux目录管理命令
- 缺这两点的Scrum注定失败(送书)
- 资深码农谈编程——编程岁月
- Java设计模式(五) 多态的极致应用——组合模式
- Set up Zend Framework Skeleton Application on Mac Step by Step
- 操作系统之存储管理