符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
这篇文章主要介绍如何在线安装CDH5.4.1,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
创新互联公司致力于网站设计、成都网站制作,成都网站设计,集团网站建设等服务标准化,推过标准化降低中小企业的建站的成本,并持续提升建站的定制化服务水平进行质量交付,让企业网站从市场竞争中脱颖而出。 选择创新互联公司,就选择了安全、稳定、美观的网站建设服务!
下载CENTOS6.4
http://118.122.119.70/CentOS-6.4-x86_64-bin-DVD1.iso?fid=KBiGdobo4XpP2az01*useRyNKDoASHsDAQAAAPMPsesUnrepQ15p8WWIN7Ynh4Ft&mid=666&threshold=150&tid=4990D3C32C91D7AF85B132EF51EE881D&srcid=119&verno=1
配置主机名
网络配置
安装Apache 服务器
关闭防火墙和selinux 及配置信任关系
设置NTP时间同步
增加普通用户hadoop 并设置sudo权限
安装包准备
执行文件 http://archive.cloudera.com/cm5/installer
rpm包: http://archive.cloudra.com/cm5/repo-as-tarball/
给予权限 chmod 777 cloudra-manager-installer.bin
[root@localhost ~]# service iptables stop
iptables: Flushing firewall rules: [ OK ]
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Unloading modules:
root@localhost ~]# chkconfig iptables off
[ OK ]
[root@localhost ~]# vi /etc/sysconfig/selinux
修改selinu
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@localhost ~]#reboot
[root@localhost ~]#reboot
[root@localhost ~]# setup
[root@localhost ~]# service network restart
Shutting down interface eth2: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth2: [ OK ]
[root@localhost ~]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:0C:29:30:FE:A3
inet addr:192.168.141.11 Bcast:192.168.141.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe30:fea3/64 Scope:Link
修改IP和主机名映射关系vi /etc/hosts
192.168.141.11 CDH01
[root@localhost ~]# hostname CDH01
[root@localhost ~]# hostname
CDH01
[root@localhost ~]# vi /etc/sysconfig/network修改主机名
NETWORKING=yes
HOSTNAME=CDH01
查看是否安装java(安装了就卸载掉)
[root@CDH01 ~]# rpm -qa|grep jdk
[root@CDH01 ~]# rpm -qa|grep java
添加hadoop用户
[root@CDH01 ~]# adduser hadoop
[root@CDH01 ~]# passwd hadoop
root@CDH01 ~]# su hadoop
[hadoop@CDH01 root]$ whoami
hadoop
hadoop@CDH01 root]$ cd /etc/
[hadoop@CDH01 etc]$ ls -l|grep sudo
-rw-r-----. 1 root root 1786 Sep 25 2012 sudo.conf
-r--r-----. 1 root root 4002 Mar 1 2012 sudoers
drwxr-x---. 2 root root 4096 Feb 21 2013 sudoers.d
-rw-r-----. 1 root root 3181 Jan 23 2013 sudo-ldap.conf
[hadoop@CDH01 etc]$ su
Password:
[root@CDH01 etc]# vi sudoers
在root ALL=(ALL) ALL后添加
hadoop ALL=(root)NOPASSWD:ALL
[root@CDH01 etc]# sudo ls /root/就不会报错了
[root@CDH01 etc]# ssh-keygen -t rsa
[root@CDH01 etc]# ssh-copy-id CDH01
[root@CDH01 etc]# ssh CDH01登录不用密码
[root@CDH01 ~]# rpm -qa|grep httpd
httpd-tools-2.2.15-26.el6.centos.x86_64
httpd-2.2.15-26.el6.centos.x86_64
root@CDH01 ~]# service httpd status
httpd is stopped
[root@CDH01 ~]# sudo service httpd start
[root@CDH01 ~]# sudo chkconfig httpd on
[root@CDH01 ~]#reboot
下载文件http://archive.cloudera.com/cm5/installer/5.4.1/cloudera-manager-installer.bin
下载文件http://archive.cloudera.com/cm5/repo-as-tarball/5.4.1/cm5.4.1-centos6.tar.gz(6代表是centos6.x)
[root@CDH01 /]# cd /opt
[root@CDH01 opt]# pwd
/opt
[hadoop@CDH01 opt]$ sudo rm -rf *
[hadoop@CDH01 opt]$ sudo mkdir softwares
[hadoop@CDH01 opt]$ ls
softwares
[hadoop@CDH01 opt]$ sudo yum install -y lrzsz
[root@CDH01 softwares]# sudo ls -la /opt
total 12
drwxr-xr-x. 3 root root 4096 Dec 18 09:15 .
dr-xr-xr-x. 22 root root 4096 Dec 18 08:06 ..
drwxr-xr-x 2 root root 4096 Dec 18 09:25 softwares
[root@CDH01 softwares]# sudo chown -R hadoop:hadoop /opt
[root@CDH01 softwares]# sudo ls -la /opt
total 12
drwxr-xr-x. 3 hadoop hadoop 4096 Dec 18 09:15 .
dr-xr-xr-x. 22 root root 4096 Dec 18 08:06 ..
drwxr-xr-x 2 hadoop hadoop 4096 Dec 18 09:25 softwares
[root@CDH01 softwares]# tar -zxf cm5.4.1-centos6.tar.gz -C /var/www/html
[root@CDH02 softwares]# cd /var/www/html
[root@CDH01 html]# sudo mkdir -p cm5/redhat/6/x86_64/
[root@CDH01 html]# sudo mv cm cm5/redhat/6/x86_64/
修改yum源
[root@CDH01 html]# cd /etc/yum.repos.d/
[root@CDH01 yum.repos.d]# ls
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
[root@CDH01 yum.repos.d]# sudo vi cloudera-manager.repo
[cloudera-manager]
name=cloudera-manager
baseurl=http://CDH01/cm5/redhat/6/x86_64/cm/5/
enabled=1
gpgcheck=0
[root@CDH02 yum.repos.d]# yum repolist 【生成了yum源】
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
cloudera-manager | 951 B 00:00
cloudera-manager/primary | 4.3 kB 00:00
cloudera-manager 7/7
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=extras&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates&infra=stock error was
14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
repo id repo name status
base CentOS-6 - Base 0
cloudera-manager cloudera-manager 7
extras CentOS-6 - Extras 0
updates CentOS-6 - Updates 0
repolist: 7
[root@CDH02 softwares]# wget http://archive.cloudera.com/cm5/installer/5.9.0/cloudera-manager-installer.bin
[root@CDH01 softwares]# ./cloudera-manager-installer.bin[root用户,并且要联网]
[root@CDH01 cloudera-manager-installer]# ls
0.check-selinux.log 2.install-oracle-j2sdk1.7.log
1.install-repo-pkg.log 3.install-cloudera-manager-server.log
[root@CDH01 ~]# cd /opt/softwares/
[root@CDH01 softwares]# ls
cloudera-manager-installer.bin cm5.4.1-centos6.tar.gz
next->next->yes->next->yes
访问192.168.141.11:7180
[root@CDH01 softwares]# cd /var/www/html
[root@CDH01 html]# ls
cm5
[root@CDH01 html]# mkdir parcels 【http://archive.cloudera.com/cdh6/parcels/5.9.0/】
[root@CDH01 html]# ls
cm5 parcels
[root@CDH01 html]# cd parcels
[root@CDH01 parcels]# ls
CDH-5.4.1-1.cdh6.4.1.p0.6-el6.parcel manifest.json
CDH-5.4.1-1.cdh6.4.1.p0.6-el6.parcel.sha1
[root@CDH01 parcels]# mv CDH-5.4.1-1.cdh6.4.1.p0.6-el6.parcel.sha1 CDH-5.4.1-1.cdh6.4.1.p0.6-el6.parcel.sha
访问http://192.168.141.11/parcels/有三个文件
远程 Parcel 存储库 URL http://192.168.141.11/parcels/
选择 CDH 的版本
CDH-5.4.1-1.cdh6.4.1.p0.6
自定义存储库
http://192.168.141.11/cm5/redhat/6/x86_64/cm/5/
安装 Oracle Java SE 开发工具包 (JDK) 打钩
单用用户打钩
登录到所有主机,作为hadoop
root用户
Cloudera 建议将 /proc/sys/vm/swappiness 设置为 0。当前设置为 60。使用 sysctl 命令在运行时更改该设置并编辑 /etc/sysctl.conf 以在重启后保存该设置。您可以继续进行安装,但可能会遇到问题,Cloudera Manager 报告您的主机由于交换运行状况不佳。以下主机受到影响:
[root@CDH01 parcels]# sudo sysctl vm.swappiness=0
vm.swappiness = 0
[root@CDH01 parcels]# vi /etc/sysctl.conf
vm.swappiness=0
已启用“透明大页面”,它可能会导致重大的性能问题。版本为“CentOS release 6.4 (Final)”且发行版为“2.6.32-358.el6.x86_64”的 Kernel 已将 enabled 设置为“[always] never”,
并将 defrag 设置为“[always] never”。请运行“echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag”以禁用此设置,然后将同一命令添加到一个 init 脚本中,如 /etc/rc.local,这样当系统重启时就会予以设置。或者,升级到 RHEL 6.5 或更新版本,它们不存在此错误。将会影响到以下主机:
root@CDH01 parcels]# sudo echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
[root@CDH01 parcels]# sudo vi /etc/rc.local
增加echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
添加Cloudera Management Service【先不安装组件】
使用嵌入式数据库-》继续直到完成
添加服务zookeper
[root@CDH01 cloudera-scm-agent]# service cloudera-scm-agent restart[可能权限有问题, chmod 777 /var/log/cloudera-scm-*]
http://192.168.141.11:7180/cmf/login
[root@CDH01 cloudera-scm-server]# netstat -ano |grep 7180
tcp 0 0 0.0.0.0:7180 0.0.0.0:* LISTEN off (0.00/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51316 ESTABLISHED off (0.00/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51315 ESTABLISHED off (0.00/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51314 ESTABLISHED off (0.00/0/0)
tcp 0 0 192.168.141.11:54184 192.168.141.11:7180 TIME_WAIT timewait (34.65/0/0)
tcp 0 0 192.168.141.11:54204 192.168.141.11:7180 TIME_WAIT timewait (54.24/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51312 ESTABLISHED off (0.00/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51313 ESTABLISHED off (0.00/0/0)
tcp 0 0 192.168.141.11:7180 192.168.141.1:51310 ESTABLISHED off (0.00/0/0)
[root@CDH02 bin]# cd /opt/cloudera/parcels/CDH/bin
配置->hdfs权限-》保存更改-》HDFS重启
root@CDH02 bin]# /usr/java/jdk1.7.0_67-cloudera/bin/jps
18694 EventCatcherService
3614 NameNode
3639 DataNode
18733 Jps
2655 Main
4807 Main
3598 Bootstrap
5149 NodeManager
4828 Main
4762 AlertPublisher
3589 SecondaryNameNode
5372 ResourceManager
4787 Main
3587 QuorumPeerMain
[root@CDH02 CDH]# bin/yarn jar share/doc/hadoop-0.20-mapreduce/examples/hadoop-examples-2.6.0-mr1-cdh6.4.1.jar
bin/yarn jar share/doc/hadoop-0.20-mapreduce/examples/hadoop-examples-2.6.0-mr1-cdh6.4.1.jar wordcount /a /output01
配置-》操作-》启用ha
以上是“如何在线安装CDH5.4.1”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注创新互联行业资讯频道!