前言:在网上有好多说是以 root 身份 vi /etc/profile,然后在下面加一行 export PATH="usr/java/jdk160_05/bin:$PATH"(其中 jdk160_05 是你的安装目录,依你自己的安装情况所决定),然后 source /etc/profile 即可解决。
Hadoop,zookeeper,HBase,Spark集群环境搭建【面试+工作】
Linux下 安装好了jdk,输入jps时,系统提示“-bash: jps: command not found”。
在 安装和配置Hadoop(单节点) 这篇文章中,已经进行了Hadoop单机伪集群模式的部署。生产环境中,Hadoop都是以集群方式进行安装和部署的,否则,就不需要使用Hadoop了,分布式存储和分布式运算是Hadoop提供的核心功能。这篇文章将在单机安装的基础上,进行3个节点Hadoop集群的安装,因此如果你还没有单机安装过Hadoop,那么请先查看一下单机安装的这篇文章。
jps类似linux的ps命令,不同的是ps是用来显示进程,而jps只显示java进程,准确的说是当前用户已启动的部分java进程信息,信息包括进程号和简短的进程command。
Hadoop搭建流程网上有很多,以下是我在搭建Hadoop伪分布式环境是遇到的一些比较菜鸟的问题。
集群中只有mapred-site.xml.template,可以从这个文件进行复制
在上篇博客中简单介绍了Zookeeper的特点和应用场景,详情可参考:《Zookeeper简介(一)》,那么这篇博客我们介绍一下关于Zookeeper的单机模式安装步骤与配置。
node0、node1、node2三台机器之间要设置SSH免密码登录,详细的设置步骤请参考《Linux配置SSH免密码登录(非root账号)》;
1)在各个JournalNode节点上,输入以下命令启动journalnode服务:(前提zookeeper集群已启动)
Zookeeper 是一个开源的分布式的,为分布式框架提供协调服务的 Apache 项目。
jps位于jdk的bin目录下,其作用是显示当前系统的java进程情况,及其id号。 jps相当于Solaris进程工具ps。不象”pgrep java”或”ps -ef grep java”,jps并不使用应用程序名来查找JVM实例。因此,它查找所有的Java应用程序,包括即使没有使用java执行体的那种(例如,定制的启动 器)。另外,jps仅查找当前用户的Java进程,而不是当前系统中的所有进程。
在linux环境下显示一个进程的信息大家可能一直都在使用ps命令,比如用以下命令来显示当前系统执行的java进程:
本文详细介绍搭建4个节点的完全分布式Hadoop集群的方法,Linux系统版本是CentOS 7,Hadoop版本是2.7.7,JDK版本是1.8。
Apache NiFi可以基于Linux和Window安装,这里建议基于Linux安装。安装NiFi的节点需要安装JDK8,NiFi0.x版本需要JDK7。NiFi安装可以单节点安装,也可以分布式安装。我们这里安装NiFi的1.13版本,需要JDK8。
版权声明:本文为王小雷原创文章,未经博主允许不得转载 https://blog.csdn.net/dream_an/article/details/80700530
https://github.com/eyjian/libmooon/releases
我们在大数据的日常生产当中会经常使用到jps命令,如果问起很多人他们都会知道jps命令是用来干什么的,查看java相关的进程。但是这个命令是属于哪个组件提供的呢?最起码可以肯定不是linux系统自带的。
本文用于解决 Apache Hadoop 启动时 DataNode 启动异常的问题,但是请注意这会删除 HDFS 中原有的所有数据,如果原有的数据很重要请不要这样做。
现在是资源共享的时代,同样也是知识分享的时代,如果你觉得本文能学到知识,请把知识与别人分享。
特殊说明: 解决问题的光鲜,藏着磕Bug的痛苦。 万物皆入轮回,谁也躲不掉! 以上文章,均是我实际操作,写出来的笔记资料,不会出现全文盗用别人文章!烦请各位,请勿直接盗用!
通过前面的几篇博客,我们介绍了Java虚拟机的内存分配以及内存回收等理论知识,了解这些知识对于我们在实际生产环境中提高系统的运行效率是有很大的帮助的。但是话又说回来,在实际生产环境中,线上项目正在运行,我们怎么去监控虚拟机运行效率?又或者线上项目发生了OOM,异常堆栈信息,我们又怎么去抓取,然后怎么去分析定位问题呢?
准备至少3台机器(通过克隆虚拟机;配置好网络JDK 时间 hosts,保证节点间能互ping通)
下载地址:https://www.elastic.co/cn/downloads/kibana
jps(JVM Process Status Tool)是JDK中的一个小工具,它的功能和UNIX的ps命令类似:可以列出正在运行的虚拟机进程,并显示虚拟机执行主类(Main Class,main()函数所在的类)名称以及这些进程的本地虚拟机唯一ID(LVMID,Local Virtual Machine Identifier),LVMID和操作系统的进程ID是一致的,当同时启动多个虚拟机进程,无法根据进程名称进行定位时,就可以使用jps命令显示主类的功能来区分。
在上文的基础上本文来介绍下zookeeper的集群搭建。准备环境如果不清楚的可以参考上文:
在《大数据之脚踏实地学10--Hive独立式安装》一文中我们已经介绍了Hive工具的安装流程,基于Hive可以轻松的在Hadoop集群内实现SQL语句的落地。如果没有她,数据的管理操作都要通过编写Java代码,运行Map-Reduce,那将是一件非常头疼的事。
从官网http://apache.fayea.com/hadoop/common/ 下载hadoop
首先献上Hadoop下载地址: http://apache.fayea.com/hadoop/core/ 选择相应版本,点一下,直接进行http下载了。 对原来写的一篇文章,相当不满意,过于粗糙了,于是删除重新再来。言归正传: 题前说明: 我一共三台机器,机器名分别是: master slave1 slave2 登录名统一是:master 我先在master机器上执行以下操作: 一、解压缩 这里需要说明下,根据网上的教程,解压缩后,把文件copy到/usr/目录下。在master机器启动的时候,一直提示,
直接挂载镜像开机即可,本地虚拟网卡ip地址改为192.168.6.1/24 网关改为192.168.6.2
输出java版本 虽然默认已经将Java的路径配置到了系统环境变量中,但由于后续需要使用JAVA_HOME,我们最好将JAVA_HOME显式写入到系统的配置文件中。参考链接:https://segmentfault.com/a/1190000007950960
这篇博客小菌为大家带来的是如何在Linux的CentOS上如何安装jdk?
spark官网下载:http://spark.apache.org/downloads.html
JDK:OpenJDK1.8.0 (强力建议不要使用 Oracle 公司的 Linux 版本的 JDK)
HA:High Available,高可用 在Hadoop 2.0之前,在HDFS集群中NameNode存在单点故障 (SPOF:A Single Point of Failure) 对于只有一个NameNode的集群,如果NameNode机器出现故障(比如宕机或是软件、硬件升级),那么整个集群将无法使用,直到NameNode重新启动
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
因为在之前的博客在Linux中部署集群(零基础速学!)中,上述的准备操作均已详细描述,这里对于准备工作的内容就不做过多讲解。接下来正式开始进行集群环境的搭建
本文的目的是为当前最新版本的Hadoop 2.4.0提供最为详细的安装说明,以帮助减少安装过程中遇到的困难,并对一些错误原因进行说明。本文的安装只涉及了hadoop-common、hadoop-hdfs、hadoop-mapreduce和hadoop-yarn,并不包含HBase、Hive和Pig等。
修改HOSTANME vi /etc/sysconfig/network 修改HOSTNAME和IP的映射 vi /etc/hosts 关闭防火墙 service iptables stop 关闭防火墙的开机启动 chkconfig iptables off 重启linux服务器 reboot
系统信息 arch 显示机器的处理器架构(1) uname -m 显示机器的处理器架构(2) uname -r 显示正在使用的内核版本 dmidecode -q 显示硬件系统部件 - (SMBIOS / DMI) hdparm -i /dev/hda 罗列一个磁盘的架构特性 hdparm -tT /dev/sda 在磁盘上执行测试性读取操作 cat /proc/cpuinfo 显示CPU info的信息 cat /proc/interrupts 显示中断 cat /proc/meminfo 校验内存使用 cat /proc/swaps 显示哪些swap被使用 cat /proc/version 显示内核的版本 cat /proc/net/dev 显示网络适配器及统计 cat /proc/mounts 显示已加载的文件系统 lspci -tv 罗列 PCI 设备 lsusb -tv 显示 USB 设备 date 显示系统日期 cal 2007 显示2007年的日历表 date 041217002007.00 设置日期和时间 - 月日时分年.秒 clock -w 将时间修改保存到 BIOS 关机 (系统的关机、重启以及登出 ) shutdown -h now 关闭系统(1) init 0 关闭系统(2) telinit 0 关闭系统(3) shutdown -h hours:minutes & 按预定时间关闭系统 shutdown -c 取消按预定时间关闭系统 shutdown -r now 重启(1) reboot 重启(2) logout 注销 文件和目录 cd /home 进入 '/ home' 目录' cd .. 返回上一级目录 cd ../.. 返回上两级目录 cd 进入个人的主目录 cd ~user1 进入个人的主目录 cd - 返回上次所在的目录 pwd 显示工作路径 ls 查看目录中的文件 ls -F 查看目录中的文件 ls -l 显示文件和目录的详细资料 ls -a 显示隐藏文件 ls *[0-9]* 显示包含数字的文件名和目录名 tree 显示文件和目录由根目录开始的树形结构(1) lstree 显示文件和目录由根目录开始的树形结构(2) mkdir dir1 创建一个叫做 'dir1' 的目录' mkdir dir1 dir2 同时创建两个目录 mkdir -p /tmp/dir1/dir2 创建一个目录树 rm -f file1 删除一个叫做 'file1' 的文件' rmdir dir1 删除一个叫做 'dir1' 的目录' rm -rf dir1 删除一个叫做 'dir1' 的目录并同时删除其内容 rm -rf dir1 dir2 同时删除两个目录及它们的内容 mv dir1 new_dir 重命名/移动 一个目录 cp file1 file2 复制一个文件 cp dir/* . 复制一个目录下的所有文件到当前工作目录 cp -a /tmp/dir1 . 复制一个目录到当前工作目录 cp -a dir1 dir2 复制一个目录 ln -s file1 lnk1 创建一个指向文件或目录的软链接 ln file1 lnk1 创建一个指向文件或目录的物理链接 touch -t 0712250000 file1 修改一个文件或目录的时间戳 - (YYMMDDhhmm) file file1 outputs the mime type of the file as text iconv -l 列出已知的编码 iconv -f fromEncoding -t toEncoding inputFile > outputFile creates a new from the given input file by assuming it is encoded in fromEncoding and converting it to toEncoding. find . -maxdepth 1 -name *.jpg -print -exec convert "{}" -resize 80x60 "thumbs/{}" \; batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) 文件搜索 find / -name file1 从 '/' 开始进入根文件系统搜索文件和目录 find / -user user1 搜索属于用户 'user1' 的文件和目录 find /home/user1
Apache Hadoop是一个开源框架,用于分布式存储以及在商用硬件上运行的计算机集群上的大数据的分布式处理。 Hadoop将数据存储在Hadoop分布式文件系统(HDFS)中,并使用MapReduce完成这些数据的处理。 YARN提供用于在Hadoop集群中请求和分配资源的API。
解决 Apache Hadoop 启动时 DataNode 没有启动的问题(注意这会删除 HDFS 中原有的所有数据,如果原有的数据很重要请不要这样做)。
有些时候我们需要查看jvm的运行参数,这个需求可能会存在2种情况: 第一,运行java命令时打印出运行参数; 第二,查看正在运行的java进程的参数;
ElasticSearch-head是一个H5编写的ElasticSearch集群操作和管理工具,可以对集群进行傻瓜式操作。
Apache Hadoop 软件库是一个框架,它允许使用简单的编程模型在计算机集群上对大型数据集进行分布式处理。Apache™ Hadoop® 是可靠、可扩展、分布式计算的开源软件。
jdk在安装的时候会提供一些性能分析、故障诊断、JVM监控之类的工具,了解这些工具对我们分析JVM内存、JVM调优有一定的帮助,本篇文章来学习一下。
•前往 http://skywalking.apache.org/downloads/ ,根据自己的操作系统,下载即可。•对于网络不好的童鞋,可用如下百度盘地址下载:
1.安装前提条件 (1)首先安装jdk,最好安装1.7及1.7以上版本,并且安装jdk的环境变量 vi ~/.bashrc export JAVA_HOME=/usr/local/software/jdk1.8.0_141 export PATH=$JAVA_HOME/bin:$PATH (2)检查ssh和sshd是否安装,如果没有安装, ubuntu下面安装ssh和sshd: $ sudo apt-get install ssh $ sudo apt-
领取专属 10元无门槛券
手把手带您无忧上云