<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5">
    <title>Hadoop入门进阶课程2--Hadoop2.X 64位编译详解大数据 | 云图网</title>
    <meta name="keywords" content="分布式文件系统，分布式数据库,并行处理（MPP）数据库，数据挖掘,开源大数据平台,数据中台,数据分析,数据开发,数据治理,数据湖,数据采集">
<meta name="description" content="【注】该系列所使用到安装包、测试数据和代码均可在百度网盘下载，具体地址为 http://pan.baidu.com/s/10PnDs，下载该PDF文件1、编译环境1.1软硬件环境说明所有节点均是CentOS系统，防火墙和SElinux禁用，所有节点上均创建了一个shiyanlou用户，并在系统根目录下创建/app目录，…">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.ytso.com/tech/bigdata/8568.html">
<meta property="og:site_name" content="云图网">
<meta property="og:title" content="Hadoop入门进阶课程2--Hadoop2.X 64位编译详解大数据">
<meta property="og:image" content="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif">
<meta property="og:description" content="【注】该系列所使用到安装包、测试数据和代码均可在百度网盘下载，具体地址为 http://pan.baidu.com/s/10PnDs，下载该PDF文件1、编译环境1.1软硬件环境说明所有节点均是CentOS系统，防火墙和SElinux禁用，所有节点上均创建了一个shiyanlou用户，并在系统根目录下创建/app目录，…">
<link rel="canonical" href="https://blog.ytso.com/tech/bigdata/8568.html">
<meta name="applicable-device" content="pc,mobile">
<meta http-equiv="Cache-Control" content="no-transform">
<link rel="shortcut icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg">
<link rel='dns-prefetch' href='//cdnjs.cloudflare.com' />
<style id='wp-img-auto-sizes-contain-inline-css' type='text/css'>
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='stylesheet-css' href='https://blog.ytso.com/wp-content/themes/justnews/css/style.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='material-icons-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/material-icons.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='remixicon-css' href='https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.min.css?ver=6.9.4' type='text/css' media='all' />
<link rel='stylesheet' id='font-awesome-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/font-awesome.css?ver=6.21.5' type='text/css' media='all' />
<style id='wp-block-library-inline-css' type='text/css'>
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:69d1a27952949*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id='classic-theme-styles-inline-css' type='text/css'>
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<link rel='stylesheet' id='wpcom-member-css' href='https://blog.ytso.com/wp-content/plugins/wpcom-member/css/style.css?ver=1.7.19' type='text/css' media='all' />
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script>
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.ytso.com/xmlrpc.php?rsd" />
<meta name='description' content='【注】该系列所使用到安装包、测试数据和代码均可在百度网盘下载，具体地址为 http://pan.baidu.com/s/10PnDs，下载该PDF文件 1、编译环境 1.1软硬件环境说明 所有节点均是CentOS系统，防火墙和SElinux禁用，所有节…' />
<meta name='keywords' content='分布式文件系统，分布式数据库,并行处理（MPP）数据库，数据挖掘,开源大数据平台,数据中台,数据分析,数据开发,数据治理,数据湖,数据采集' />
<style>:root{--theme-color: #08c; --theme-hover: #07c; --logo-height: 32px; --logo-height-mobile: 26px; --menu-item-gap: 28px; --member-login-bg: url('https://blog.ytso.com/loginwall.jpg'); --header-bg-color: #fff; --header-bg-image: none; --theme-border-radius-s: 3px; --theme-border-radius-m: 5px; --theme-border-radius-l: 8px; --theme-border-radius-xl: 12px; --thumb-ratio-default: 480 / 300; --thumb-ratio-post: 480 / 300; --post-video-ratio: 860 / 482;}</style>
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="32x32" />
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="192x192" />
<link rel="apple-touch-icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
<meta name="msapplication-TileImage" content="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
    <!--[if lte IE 11]><script src="https://blog.ytso.com/wp-content/themes/justnews/js/update.js"></script><![endif]-->
</head>
<body class="wp-singular post-template-default single single-post postid-8568 single-format-standard wp-theme-justnews lang-cn el-boxed header-fixed">
<header class="header header-fluid">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-label="menu">
                <span class="icon-bar icon-bar-1"></span>
                <span class="icon-bar icon-bar-2"></span>
                <span class="icon-bar icon-bar-3"></span>
            </button>
                        <div class="logo">
                <a href="https://blog.ytso.com/" rel="home">
                    <img src="https://imgcdn.ytso.com/wp-content/uploads/2021/12/20211207181156143.png" alt="云图网">
                </a>
            </div>
        </div>
        <div class="collapse navbar-collapse mobile-style-0">
            <nav class="primary-menu"><ul id="menu-justnews-footer-menu" class="nav navbar-nav wpcom-adv-menu"><li class="menu-item"><a href="https://blog.ytso.com/category/industrynews">业界资讯</a></li>
<li class="menu-item current-post-ancestor active menu-item-style menu-item-style-1 dropdown"><a target="_blank" href="https://blog.ytso.com/category/tech" class="dropdown-toggle">技术专区</a>
<ul class="dropdown-menu menu-item-wrap menu-item-col-5">
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/cloud">云计算</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/ai">人工智能</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/safety">信息安全</a></li>
	<li class="menu-item current-post-ancestor current-post-parent active"><a href="https://blog.ytso.com/category/tech/bigdata">大数据</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/dev">研发管理</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/webdev">大前端</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/opensource">开源</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/aiops">智能运维</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/pnotes">编程笔记</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/wp">WordPress</a></li>
</ul>
</li>
<li class="menu-item"><a href="https://blog.ytso.com/category/enterprise-strategic-planning">企业战略规划</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/download">下载专区</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/it%e6%b1%9f%e6%b9%96%e5%8f%b2">江湖史</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/notes">随笔记录</a></li>
</ul></nav>            <div class="navbar-action">
                <div class="navbar-search-icon j-navbar-search"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></div><form class="navbar-search" action="https://blog.ytso.com/" method="get" role="search"><div class="navbar-search-inner"><i class="wpcom-icon wi navbar-search-close"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i><input type="text" name="s" class="navbar-search-input" autocomplete="off" maxlength="100" placeholder="输入关键词搜索..." value=""><button class="navbar-search-btn" type="submit" aria-label="搜索"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button></div></form>                    <div id="j-user-wrap">
                        <a class="login" href="https://blog.ytso.com/login">登录</a>
                        <a class="login register" href="https://blog.ytso.com/register">注册</a>
                    </div>
                                            <a class="wpcom-btn btn-primary btn-xs publish" href="https://blog.ytso.com/contribute">
                            <i class="fa fa-edit"></i> 投稿                        </a>
                                </div>
        </div>
    </div><!-- /.container -->
</header>

<div id="wrap">    <div class="wrap container">
        <ol class="breadcrumb" vocab="https://schema.org/" typeof="BreadcrumbList"><li class="home" property="itemListElement" typeof="ListItem"><a href="https://blog.ytso.com" property="item" typeof="WebPage"><span property="name" class="hide">云图网</span>首页</a><meta property="position" content="1"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech" property="item" typeof="WebPage"><span property="name">技术专区</span></a><meta property="position" content="2"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech/bigdata" property="item" typeof="WebPage"><span property="name">大数据</span></a><meta property="position" content="3"></li></ol>        <main class="main">
                            <article id="post-8568" class="post-8568 post type-post status-publish format-standard hentry category-bigdata tag-117 tag-mpp tag-121 tag-125 tag-119 tag-120 tag-123 tag-124 tag-122 entry">
                    <div class="entry-main">
                                                                        <div class="entry-head">
                            <h1 class="entry-title">Hadoop入门进阶课程2--Hadoop2.X 64位编译详解大数据</h1>
                            <div class="entry-info">
                                                                <time class="entry-date published" datetime="2021-07-18T23:04:12+08:00" pubdate>
                                    2021年7月18日 23:04                                </time>
                                <span class="dot">•</span>
                                <a href="https://blog.ytso.com/category/tech/bigdata" rel="category tag">大数据</a>                                                            </div>
                        </div>
                        
                                                <div class="entry-content text-indent text-justify">
                            <div id="toc">
<p class="toc-title"><strong>文章目录</strong><span class="toc-controller toc-controller-show">[隐藏]</span></p>
<ul>
<li class="toc-level1"><a href="#toc_1">1、编译环境</a>
<ul>
<li class="toc-level2"><a href="#toc_2">1.1软硬件环境说明</a></li>
<li class="toc-level2"><a href="#toc_3">1.2环境搭建</a>
<ul>
<li class="toc-level3"><a href="#toc_4">1.2.1JDK安装和Java环境变量配置</a></li>
<li class="toc-level3"><a href="#toc_5">1.2.2安装并设置maven</a></li>
<li class="toc-level3"><a href="#toc_6">1.2.3使用yum安装svn</a></li>
<li class="toc-level3"><a href="#toc_7">1.2.4使用yum安装autoconf automake libtool cmake</a></li>
<li class="toc-level3"><a href="#toc_8">1.2.5使用yum安装ncurses-devel</a></li>
<li class="toc-level3"><a href="#toc_9">1.2.6使用yum安装openssl-devel</a></li>
<li class="toc-level3"><a href="#toc_10">1.2.7使用yum安装gcc*</a></li>
<li class="toc-level3"><a href="#toc_11">1.2.8安装并设置protobuf</a></li>
</ul>
</li>
</ul>
</li>
<li class="toc-level1"><a href="#toc_12">2、编译Hadoop</a>
<ul>
<li class="toc-level2"><a href="#toc_13">2.1下载Hadoop源代码 Release2.2.0</a></li>
<li class="toc-level2"><a href="#toc_14">2.2编译Hadoop源代码</a></li>
<li class="toc-level2"><a href="#toc_15">2.3验证编译是否成功</a></li>
</ul>
</li>
<li class="toc-level1"><a href="#toc_16">3、问题解决</a>
<ul>
<li class="toc-level2"><a href="#toc_17">3.1编译Hadoop2.2.0出现代码异常</a></li>
</ul>
</li>
</ul>
</div>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-size: 15px;"><a name="_Toc406012874"></a><a href="https://www.shiyanlou.com/courses/237"><span style="mso-bookmark: _toc406012874;"><span lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #c00000;"></span></span></span></span></a><span style="font-family: 微软雅黑;"><span style="mso-bookmark: _toc406012874;"><span style="color: #00b050;">【注】该系列所使用到安装包、测试数据和代码均可在百度网盘下载，具体地址为 <span style="text-decoration: underline;"><span lang="EN-US">http://pan.baidu.com/s/10PnDs</span></span>，</span></span><span style="color: #ff0000;"><span style="mso-bookmark: _toc406012874;">下载该</span></span></span><a href="http://files.cnblogs.com/files/shishanyuan/2.Hadoop%E5%85%A5%E9%97%A8%E8%BF%9B%E9%98%B6%E8%AF%BE%E7%A8%8B_%E7%AC%AC2%E5%91%A8_Hadoop2.X64%E4%BD%8D%E7%BC%96%E8%AF%91.pdf" target="_blank" rel="noopener"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;"><span style="mso-bookmark: _toc406012874;"><span style="text-underline: none;" lang="EN-US"><span style="text-decoration: none;">PDF</span></span></span><span style="mso-bookmark: _toc406012874;"><span style="text-underline: none;"><span style="text-decoration: none;">文件</span></span></span></span></span></a></span></p>
<h1 id="toc_1" style="text-justify: inter-ideograph; line-height: normal; text-indent: -42.9pt; margin: 15.6pt 0cm 15.6pt 42.9pt; word-break: normal;" align="justify"><span style="color: #000000; font-size: 15px;"><span style="mso-bookmark: _toc406012874;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">1</span></span><span style="line-height: normal;"><span style="font-family: Times New Roman;">、</span></span></span></span><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">编译</span></span></span><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">环境</span></span></span></h1>
<h2 id="toc_2" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012876"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.1</span></span></span><span style="font-family: 微软雅黑;">软硬件环境</span></span><span style="font-family: 微软雅黑;"><span style="color: #000000;">说明</span></span></span></h2>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: 21pt; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">所有节点均是<span lang="EN-US">CentOS</span>系统，防火墙和<span lang="EN-US">SElinux</span>禁用，所有节点上均创建了一个<span lang="EN-US">shiyanlou</span>用户，并在系统根目录下创建<span lang="EN-US">/app</span>目录，用于存放<span lang="EN-US">Hadoop</span>等组件运行包。因为该目录用于安装<span lang="EN-US">hadoop</span>等组件程序，用户对<span lang="EN-US">shiyanlou</span>必须赋予<span lang="EN-US">rwx</span>权限（一般做法是<span lang="EN-US">root</span>用户在根目录下创建<span lang="EN-US">/app</span>目录，并修改该目录拥有者为<span lang="EN-US">shiyanlou(chown </span>–<span lang="EN-US">R shiyanlou:shiyanlou /app</span>）。</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: 21pt; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-family: 微软雅黑; font-size: 15px;"><span style="color: #000000;"><strong style="mso-bidi-font-weight: normal;"><span lang="EN-US">Hadoop</span></strong><strong style="mso-bidi-font-weight: normal;">搭建环境：</strong></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 42pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 42.0pt; mso-list: l3 level1 lfo2;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: wingdings; mso-fareast-font-family: wingdings;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: Wingdings;">l</span><span style="line-height: normal;"><span style="font-family: Times New Roman;">&nbsp; </span></span></span></span><span style="font-family: 微软雅黑;">虚拟机操作系统： <span lang="EN-US">CentOS6.6<span style="mso-spacerun: yes;">&nbsp; </span>64</span>位，单核，<span lang="EN-US">1G</span>内存</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 42pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 42.0pt; mso-list: l3 level1 lfo2;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: wingdings; mso-fareast-font-family: wingdings;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: Wingdings;">l</span><span style="line-height: normal;"><span style="font-family: Times New Roman;">&nbsp; </span></span></span></span><span style="font-family: 微软雅黑;"><span lang="EN-US">JDK</span>：<span lang="EN-US">1.7.0_55 64</span>位</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 42pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 42.0pt; mso-list: l3 level1 lfo2;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: wingdings; mso-fareast-font-family: wingdings;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: Wingdings;">l</span><span style="line-height: normal;"><span style="font-family: Times New Roman;">&nbsp; </span></span></span></span><span style="font-family: 微软雅黑;"><span lang="EN-US">Hadoop</span>：<span lang="EN-US">1.1.2 </span></span></span></p>
<h2 id="toc_3" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012878"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2</span></span></span><span style="font-family: 微软雅黑;">环境搭建</span></span></span></h2>
<h3 id="toc_4" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012879"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.1</span></span></span><span style="font-family: 微软雅黑;"><span lang="EN-US">JDK</span>安装和<span lang="EN-US">Java</span>环境变量配置</span></span></span></h3>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l2 level1 lfo3;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.</span></span></span><span style="font-family: 微软雅黑;">下载<span lang="EN-US">JDK1.7 64bit</span>安装包</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: 21pt; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">打开<span lang="EN-US">JDK1.7 64bit</span>安装包下载链接为：</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 7.8pt 0cm 7.8pt 21.2pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 2.02gd;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="text-decoration: underline;"><span lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #0070c0;">http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html</span></span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -0.3pt; margin: 7.8pt 0cm 7.8pt 21.2pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 1.99gd;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">打开界面之后，先选中<span lang="EN-US"> Accept License Agreement </span>，然后下载<span lang="EN-US"> jdk-7u55-linux-x64.tar.gz</span>，如下图所示：</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139317053754.jpg"><noscript><img fetchpriority="high" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image002[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139336111438.jpg" alt="clip_image002[4]" width="665" border="0" height="412"/></noscript><img fetchpriority="high" decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image002[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139336111438.jpg" alt="clip_image002[4]" width="665" border="0" height="412"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l2 level1 lfo3;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.</span></span></span><span style="font-family: 微软雅黑;">创建<span lang="EN-US">/app</span>目录，把该目录的所有者修改为<span lang="EN-US">shiyanlou</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo mkdir /app</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo chown -R shiyanlou:shiyanlou /app</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139347367994.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image004[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139375805992.jpg" alt="clip_image004[4]" width="665" border="0" height="107"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image004[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139375805992.jpg" alt="clip_image004[4]" width="665" border="0" height="107"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l2 level1 lfo3;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">3.</span></span></span><span style="font-family: 微软雅黑;">创建<span lang="EN-US">/app/lib</span>目录，使用命令如下：</span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mkdir /app/lib</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139387216778.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image006[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139394715149.jpg" alt="clip_image006[4]" width="665" border="0" height="96"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image006[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139394715149.jpg" alt="clip_image006[4]" width="665" border="0" height="96"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l2 level1 lfo3;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">4.</span><span style="line-height: normal;"><span style="font-family: Times New Roman;">&nbsp;</span></span></span></span><span style="font-family: 微软雅黑;">把下载的安装包解压并迁移到<span lang="EN-US">/app/lib</span>目录下</span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /home/shiyanlou/install-pack</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">tar -zxf jdk-7u55-linux-x64.tar.gz</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mv jdk1.7.0_55/ /app/lib</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">ll /app/lib</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; text-indent: -21.25pt; margin: 0cm 0cm 0pt 21.25pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan; mso-char-indent-count: -1.77;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139409711891.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image008[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139424554403.jpg" alt="clip_image008[4]" width="665" border="0" height="214"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image008[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139424554403.jpg" alt="clip_image008[4]" width="665" border="0" height="214"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; word-break: normal; mso-list: l2 level1 lfo3;"><span style="font-size: 15px;"><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">5.</span></span></span><span style="font-family: 微软雅黑;">使用</span></span><span style="font-family: 微软雅黑;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="color: #049615;">sudo vi /etc/profile</span></span></em><span style="color: #000000;">命令打开配置文件，设置<span lang="EN-US">JDK</span>路径</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: 12pt; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">export JAVA_HOME=/app/lib/jdk1.7.0_55</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: 12pt; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">export PATH=$JAVA_HOME/bin:$PATH</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: 12pt; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139432839516.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image010[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139440967102.jpg" alt="clip_image010[4]" width="665" border="0" height="99"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image010[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139440967102.jpg" alt="clip_image010[4]" width="665" border="0" height="99"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; word-break: normal; mso-list: l2 level1 lfo3;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">6.</span></span></span><span style="font-family: 微软雅黑;">编译并验证</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">source /etc/profile</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">java -version</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139448614001.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image012[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139458469301.jpg" alt="clip_image012[4]" width="665" border="0" height="77"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image012[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139458469301.jpg" alt="clip_image012[4]" width="665" border="0" height="77"/></a></span></p>
<h3 id="toc_5" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012880"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.2</span></span></span><span style="font-family: 微软雅黑;">安装并设置<span lang="EN-US">maven</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l0 level1 lfo5;"><span style="font-size: 15px;"><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.</span></span></span><span style="font-family: 微软雅黑;">下载<span lang="EN-US">maven</span>安装包（建议安装<span lang="EN-US">3.0</span>以上版本）本次安装选择的是<span lang="EN-US">maven3.0.5</span>的二进制包，下载地址</span></span><span style="font-family: 微软雅黑;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="color: #049615;">http://mirror.bit.edu.cn/apache/maven/maven-3/<span style="mso-spacerun: yes;">&nbsp; </span></span></span></em><span style="color: #000000;">，也可以在<span lang="EN-US">/home/shiyanlou/install-pack</span>目录中找到该安装包</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139469865385.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image014[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139488141028.jpg" alt="clip_image014[4]" width="665" border="0" height="285"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image014[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139488141028.jpg" alt="clip_image014[4]" width="665" border="0" height="285"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; layout-grid-mode: char; word-break: normal; mso-list: l0 level1 lfo5;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.</span><span style="line-height: normal;"><span style="font-family: Times New Roman;">&nbsp;</span></span></span></span><span style="font-family: 微软雅黑;">解压缩<span lang="EN-US">apache-maven-3.0.5-bin.tar.gz</span>包，并把<span lang="EN-US">apache-maven-3.0.5</span>目录移到<span lang="EN-US">/app/lib</span>目录下</span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /home/shiyanlou/install-pack</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">tar -zxf apache-maven-3.0.5-bin.tar.gz</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mv apache-maven-3.0.5 /app/lib</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139502364325.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image016[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139517524296.jpg" alt="clip_image016[4]" width="663" border="0" height="219"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image016[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139517524296.jpg" alt="clip_image016[4]" width="663" border="0" height="219"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; word-break: normal; mso-list: l0 level1 lfo5;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">3.</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">sudo vi /etc/profile</span>打开配置文件，并加入<span lang="EN-US">maven</span>设置</span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">export MAVEN_HOME=/app/lib/apache-maven-3.0.5</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">export PATH=$PATH:$MAVEN_HOME/bin</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139535804238.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image018[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139546437280.jpg" alt="clip_image018[4]" width="663" border="0" height="117"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image018[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139546437280.jpg" alt="clip_image018[4]" width="663" border="0" height="117"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 0cm 0cm 0pt 21pt; word-break: normal; mso-list: l0 level1 lfo5;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">4.</span></span></span><span style="font-family: 微软雅黑;">编译<span lang="EN-US">/etc/profile</span>文件并验证配置是否成功<span lang="EN-US">:</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">source /etc/profile</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mvn -version</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139560493051.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image020[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139574869577.jpg" alt="clip_image020[4]" width="663" border="0" height="130"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image020[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082139574869577.jpg" alt="clip_image020[4]" width="663" border="0" height="130"/></a></span></em></span></p>
<h3 id="toc_6" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012881"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.3</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">yum</span>安装<span lang="EN-US">svn</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo yum install svn</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082139593466977.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image022[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140038777958.jpg" alt="clip_image022[4]" width="663" border="0" height="313"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image022[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140038777958.jpg" alt="clip_image022[4]" width="663" border="0" height="313"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140077219784.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image024[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140092216526.jpg" alt="clip_image024[4]" width="663" border="0" height="316"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image024[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140092216526.jpg" alt="clip_image024[4]" width="663" border="0" height="316"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140105331325.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image026[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140138468480.jpg" alt="clip_image026[4]" width="663" border="0" height="255"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image026[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140138468480.jpg" alt="clip_image026[4]" width="663" border="0" height="255"/></a></span></p>
<h3 id="toc_7" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012882"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.4</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">yum</span>安装<span lang="EN-US">autoconf automake libtool cmake</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo yum install autoconf automake libtool cmake</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140154866478.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image028[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140170189678.jpg" alt="clip_image028[4]" width="663" border="0" height="265"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image028[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140170189678.jpg" alt="clip_image028[4]" width="663" border="0" height="265"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140185186420.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image030[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140202688618.jpg" alt="clip_image030[4]" width="663" border="0" height="395"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image030[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140202688618.jpg" alt="clip_image030[4]" width="663" border="0" height="395"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140219552602.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image032[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140235336086.jpg" alt="clip_image032[4]" width="663" border="0" height="311"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image032[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140235336086.jpg" alt="clip_image032[4]" width="663" border="0" height="311"/></a></span></p>
<h3 id="toc_8" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012883"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.5</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">yum</span>安装<span lang="EN-US">ncurses-devel</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo yum install ncurses-devel</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140253616028.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image034[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140270806470.jpg" alt="clip_image034[4]" width="663" border="0" height="480"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image034[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140270806470.jpg" alt="clip_image034[4]" width="663" border="0" height="480"/></a></span></p>
<h3 id="toc_9" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012884"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.6</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">yum</span>安装<span lang="EN-US">openssl-devel</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo yum install openssl-devel</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140289249640.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image036[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140306276853.jpg" alt="clip_image036[4]" width="663" border="0" height="289"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image036[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140306276853.jpg" alt="clip_image036[4]" width="663" border="0" height="289"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140352365577.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image038[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140368144764.jpg" alt="clip_image038[4]" width="663" border="0" height="301"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image038[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140368144764.jpg" alt="clip_image038[4]" width="663" border="0" height="301"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140385181977.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image040[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140400336246.jpg" alt="clip_image040[4]" width="663" border="0" height="290"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image040[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140400336246.jpg" alt="clip_image040[4]" width="663" border="0" height="290"/></a></span></p>
<h3 id="toc_10" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012885"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.7</span></span></span><span style="font-family: 微软雅黑;">使用<span lang="EN-US">yum</span>安装<span lang="EN-US">gcc*</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo yum install gcc*</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140413465745.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image042[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140426277787.jpg" alt="clip_image042[4]" width="663" border="0" height="206"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image042[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140426277787.jpg" alt="clip_image042[4]" width="663" border="0" height="206"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140437525343.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image044[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140449559642.jpg" alt="clip_image044[4]" width="663" border="0" height="241"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image044[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140449559642.jpg" alt="clip_image044[4]" width="663" border="0" height="241"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140466111869.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image046[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140487214726.jpg" alt="clip_image046[4]" width="663" border="0" height="253"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image046[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140487214726.jpg" alt="clip_image046[4]" width="663" border="0" height="253"/></a></span></p>
<h3 id="toc_11" style="text-justify: inter-ideograph; line-height: normal; text-indent: -36pt; margin: 6pt 0cm 6pt 36pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012886"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑; mso-bidi-font-weight: normal;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.2.8</span></span></span><span style="font-family: 微软雅黑;">安装并设置<span lang="EN-US">protobuf</span></span></span></span></h3>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">注：该程序包需要在<span lang="EN-US">gcc</span>安装完毕后才能安装，否则提示无法找到<span lang="EN-US">gcc</span>编译器。</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 21pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 21.0pt; mso-list: l4 level1 lfo4;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">1.</span></span></span><span style="font-family: 微软雅黑;">下载<span lang="EN-US">protobuf</span>安装包</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 7.8pt 0cm; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 0cm;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">下载链接为 <span lang="EN-US">https://code.google.com/p/protobuf/downloads/list </span>，也可以在<span lang="EN-US">/home/shiyanlou/install-pack</span>目录中找到该安装包</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140506891625.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image048[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140577058947.jpg" alt="clip_image048[4]" width="665" border="0" height="430"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image048[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082140577058947.jpg" alt="clip_image048[4]" width="665" border="0" height="430"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 21pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 21.0pt; mso-list: l4 level1 lfo4;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.</span></span></span><span style="font-family: 微软雅黑;">解压安装包并把<span lang="EN-US">protobuf-2.5.0</span>目录转移到<span lang="EN-US">/app/lib</span>目录下</span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /home/shiyanlou/install-pack</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">tar -zxf protobuf-2.5.0.tar.gz</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mv protobuf-2.5.0 /app/lib</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082140597369359.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image050[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141037684129.jpg" alt="clip_image050[4]" width="663" border="0" height="241"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image050[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141037684129.jpg" alt="clip_image050[4]" width="663" border="0" height="241"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 21pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 21.0pt; mso-list: l4 level1 lfo4;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">3.</span></span></span><span style="font-family: 微软雅黑;">进行目录运行命令 </span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">进入目录运行如下命令：</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /app/lib/protobuf-2.5.0/</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo ./configure</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">&nbsp;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo make </span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo make check</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">sudo make install</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141062684699.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image052[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141086744297.jpg" alt="clip_image052[4]" width="663" border="0" height="134"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image052[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141086744297.jpg" alt="clip_image052[4]" width="663" border="0" height="134"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141094395896.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image054[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141102052795.jpg" alt="clip_image054[4]" width="663" border="0" height="83"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image054[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141102052795.jpg" alt="clip_image054[4]" width="663" border="0" height="83"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-family: 微软雅黑; font-size: 15px;"><span style="color: #000000;"><span lang="EN-US">make</span>过程时间较长，需要运行几分钟时间</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141133937222.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image056[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141144867320.jpg" alt="clip_image056[4]" width="663" border="0" height="136"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image056[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141144867320.jpg" alt="clip_image056[4]" width="663" border="0" height="136"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-family: 微软雅黑; font-size: 15px;"><span style="color: #000000;"><span lang="EN-US">check</span>结果如下</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141153772649.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image058[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141162211991.jpg" alt="clip_image058[4]" width="663" border="0" height="185"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image058[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141162211991.jpg" alt="clip_image058[4]" width="663" border="0" height="185"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">运行<span lang="EN-US">install</span>命令及结果如下</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141173305318.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image060[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141182834160.jpg" alt="clip_image060[4]" width="663" border="0" height="101"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image060[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141182834160.jpg" alt="clip_image060[4]" width="663" border="0" height="101"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141197994131.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image062[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141251897685.jpg" alt="clip_image062[4]" width="663" border="0" height="159"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image062[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141251897685.jpg" alt="clip_image062[4]" width="663" border="0" height="159"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; text-indent: -21pt; margin: 7.8pt 0cm 7.8pt 21pt; layout-grid-mode: char; word-break: normal; mso-para-margin-top: .5gd; mso-para-margin-right: 0cm; mso-para-margin-bottom: .5gd; mso-para-margin-left: 21.0pt; mso-list: l4 level1 lfo4;"><span style="color: #000000; font-size: 15px;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">4.</span></span></span><span style="font-family: 微软雅黑;">验证是否安装成功</span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">运行成功之后，通过如下方式来验证是否安装成功，如果出现<span lang="EN-US">&quot;Missing input file&quot;</span>表示成功安装<span lang="EN-US">protobuf</span></span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">protoc</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141263778754.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image064[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141269246654.jpg" alt="clip_image064[4]" width="663" border="0" height="44"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image064[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141269246654.jpg" alt="clip_image064[4]" width="663" border="0" height="44"/></a></span></p>
<h1 id="toc_12" style="text-justify: inter-ideograph; line-height: normal; text-indent: -42.9pt; margin: 15.6pt 0cm 15.6pt 42.9pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012887"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">2</span></span><span style="line-height: normal;"><span style="font-family: Times New Roman;">、</span></span></span></span><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">编译</span><span lang="EN-US"><span style="font-weight: bold;">Hadoop</span></span></span></span></span></h1>
<h2 id="toc_13" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012888"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.1</span></span></span><span style="font-family: 微软雅黑;">下载<span lang="EN-US">Hadoop</span>源代码<span lang="EN-US"> Release2.2.0</span></span></span></span></h2>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">在<span lang="EN-US">/app</span>目录下新建<span lang="EN-US">compile</span>子目录，在该文件夹通过<span lang="EN-US">SVN</span>获取<span lang="EN-US">Hadoop2.2.0</span>源代码，命令如下：</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /app</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mkdir compile</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd compile</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">svn checkout http://svn.apache.org/repos/asf/hadoop/common/tags/release-2.2.0</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">获取时间较长，大小约<span lang="EN-US">75.3M</span></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141278612267.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image066[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141288467567.jpg" alt="clip_image066[4]" width="663" border="0" height="163"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image066[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141288467567.jpg" alt="clip_image066[4]" width="663" border="0" height="163"/></a></span></p>
<h2 id="toc_14" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012889"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.2</span></span></span><span style="font-family: 微软雅黑;">编译<span lang="EN-US">Hadoop</span>源代码</span></span></span></h2>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">由于<span lang="EN-US">hadoop2.2.0</span>在<span lang="EN-US">svn</span>中<span lang="EN-US">pom.xml</span>有点问题，会造成编译中出错，可先参考<span lang="EN-US">3.1</span>修复该问题。在<span lang="EN-US">Hadoop</span>源代码的根目录执行如下命令：</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /app/compile/release-2.2.0/</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">mvn package -Pdist,native -DskipTests –Dtar</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-family: 微软雅黑; font-size: 15px;"><span lang="EN-US"><span style="color: #000000;">(</span></span><strong style="mso-bidi-font-weight: normal;"><span style="color: #548dd4;">注意：</span></strong><span style="color: #000000;">这行命令需要手工输入，如果复制执行会报异常！<span lang="EN-US">)</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141302057351.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image068[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141309243966.jpg" alt="clip_image068[4]" width="663" border="0" height="106"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image068[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141309243966.jpg" alt="clip_image068[4]" width="663" border="0" height="106"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">在编译过程需要联网，从网络中下载所依赖的包，编译的过程时间根据网速时间不等，一般在<span lang="EN-US">30</span>分钟左右。</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141380808245.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image070[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141408146744.jpg" alt="clip_image070[4]" width="663" border="0" height="360"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image070[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141408146744.jpg" alt="clip_image070[4]" width="663" border="0" height="360"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082141498932938.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image072[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141566892262.jpg" alt="clip_image072[4]" width="663" border="0" height="436"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image072[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082141566892262.jpg" alt="clip_image072[4]" width="663" border="0" height="436"/></a></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><span style="font-family: Times New Roman;"><span style="color: #000000;">&nbsp;</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">编译好的<span lang="EN-US">Hadoop2.X 64</span>位安装包在<span lang="EN-US">hadoop-dist/target</span>目录中，该文件为<span lang="EN-US">hadoop-2.2.2.tar.gz</span>。</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082142024559298.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image074[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142042215727.jpg" alt="clip_image074[4]" width="663" border="0" height="168"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image074[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142042215727.jpg" alt="clip_image074[4]" width="663" border="0" height="168"/></a></span></p>
<h2 id="toc_15" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012890"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">2.3</span></span></span><span style="font-family: 微软雅黑;">验证编译是否成功</span></span></span></h2>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">到 <span lang="EN-US">hadoop-dist/target/hadoop-2.2.0/lib/native </span>目录中查看<span lang="EN-US">libhadoop.so.1.0.0</span>属性：</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">cd /app/compile/release-2.2.0/hadoop-dist/target/hadoop-2.2.0/lib/native</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">file * </span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">该文件为<span lang="EN-US">ELF 64-bit LSB</span>则表示文件成功编译为<span lang="EN-US">64</span>位（如果系统没有<span lang="EN-US">file</span>命令，则使用<span lang="EN-US">sudo yum install file</span>进行安装）</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082142052056325.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image076[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142062362910.jpg" alt="clip_image076[4]" width="663" border="0" height="144"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image076[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142062362910.jpg" alt="clip_image076[4]" width="663" border="0" height="144"/></a></span></p>
<h1 id="toc_16" style="text-justify: inter-ideograph; line-height: normal; text-indent: -42.9pt; margin: 15.6pt 0cm 15.6pt 42.9pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012963"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">3</span></span><span style="line-height: normal;"><span style="font-family: Times New Roman;">、</span></span></span></span><span style="font-family: 微软雅黑;"><span style="font-weight: bold;">问题解决</span></span></span></span></h1>
<h2 id="toc_17" style="text-justify: inter-ideograph; line-height: normal; text-indent: -28.8pt; margin: 12pt 0cm 12pt 28.8pt; word-break: normal;" align="justify"><span style="font-size: 15px;"><a name="_Toc406012968"></a><span style="color: #000000;"><span style="mso-bidi-font-family: 微软雅黑;" lang="EN-US"><span style="mso-list: ignore;"><span style="font-family: 微软雅黑;">3.1</span></span></span><span style="font-family: 微软雅黑;">编译<span lang="EN-US">Hadoop2.2.0</span>出现代码异常</span></span></span></h2>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">目前的<span lang="EN-US">2.2.0 </span>的<span lang="EN-US">Source Code </span>压缩包解压出来的<span lang="EN-US">code</span>有个<span lang="EN-US">bug </span>需要<span lang="EN-US">patch</span>后才能编译。否则编译<span lang="EN-US">hadoop-auth </span>会提示下面错误：</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;">[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure:</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;">[ERROR] /home/hadoop/Downloads/release-2.2.0/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[88,11] error: cannot access AbstractLifeCycle</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;">[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;">[ERROR] /home/hadoop/Downloads/release-2.2.0/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[96,29] error: cannot access LifeCycle</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #ff0000;">[ERROR] class file for org.mortbay.component.LifeCycle not found</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-bidi-font-size: 10.5pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082142081435296.jpg"><noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image078[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142104865678.jpg" alt="clip_image078[4]" width="663" border="0" height="341"/></noscript><img decoding="async" style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image078[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142104865678.jpg" alt="clip_image078[4]" width="663" border="0" height="341"/></a></span></em></span></p>
<p class="MsoNormal" style="text-align:justify;text-justify: inter-ideograph; line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal;"><span style="font-size: 15px;"><span style="font-family: 微软雅黑;"><span style="color: #000000;">直接修改<span lang="EN-US">hadoop-common-project/hadoop-auth/pom.xml</span>，其实就是少了一个包，添加一个<span lang="EN-US">dependency</span>：</span></span></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">&lt;dependency&gt;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;artifactId&gt;jetty-util&lt;/artifactId&gt;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;"><span style="mso-tab-count: 1;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;scope&gt;test&lt;/scope&gt;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align:left;line-height: normal; margin: 0cm 0cm 0pt; layout-grid-mode: char; word-break: normal; mso-pagination: widow-orphan;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><span style="font-family: 微软雅黑;"><span style="color: #049615;">&lt;/dependency&gt;</span></span></span></em></span></p>
<p class="MsoNormal" style="text-align: left; line-height: normal; margin: 0cm 0cm 0pt; word-break: normal;"><span style="font-size: 15px;"><em style="mso-bidi-font-style: normal;"><span style="mso-bidi-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US"><a href="http://ytso-blog-oss-img.oss-cn-beijing.aliyuncs.com/wp-content/uploads/2021/07/18/082142113934236.jpg"><noscript><img decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image080[4]" src="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142125181793.jpg" alt="clip_image080[4]" width="663" border="0" height="169"/></noscript><img decoding="async" style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="clip_image080[4]" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif" data-original="/img/082142125181793.jpg" alt="clip_image080[4]" width="663" border="0" height="169"/></a></span></em></span></p>
<div class="entry-readmore"><div class="entry-readmore-btn"></div></div>                                                        <div class="entry-copyright"><p>原创文章，作者：ItWorker，如若转载，请注明出处：https://blog.ytso.com/tech/bigdata/8568.html</p></div>                        </div>

                        <div class="entry-tag"><a href="https://blog.ytso.com/tag/%e5%88%86%e5%b8%83%e5%bc%8f%e6%96%87%e4%bb%b6%e7%b3%bb%e7%bb%9f%ef%bc%8c%e5%88%86%e5%b8%83%e5%bc%8f%e6%95%b0%e6%8d%ae%e5%ba%93" rel="tag">分布式文件系统，分布式数据库</a><a href="https://blog.ytso.com/tag/%e5%b9%b6%e8%a1%8c%e5%a4%84%e7%90%86%ef%bc%88mpp%ef%bc%89%e6%95%b0%e6%8d%ae%e5%ba%93%ef%bc%8c%e6%95%b0%e6%8d%ae%e6%8c%96%e6%8e%98" rel="tag">并行处理（MPP）数据库，数据挖掘</a><a href="https://blog.ytso.com/tag/%e5%bc%80%e6%ba%90%e5%a4%a7%e6%95%b0%e6%8d%ae%e5%b9%b3%e5%8f%b0" rel="tag">开源大数据平台</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e4%b8%ad%e5%8f%b0" rel="tag">数据中台</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e5%88%86%e6%9e%90" rel="tag">数据分析</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e5%bc%80%e5%8f%91" rel="tag">数据开发</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e6%b2%bb%e7%90%86" rel="tag">数据治理</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e6%b9%96" rel="tag">数据湖</a><a href="https://blog.ytso.com/tag/%e6%95%b0%e6%8d%ae%e9%87%87%e9%9b%86" rel="tag">数据采集</a></div>
                        <div class="entry-action">
                            <div class="btn-zan" data-id="8568"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div>
                                                    </div>

                        <div class="entry-bar">
                            <div class="entry-bar-inner">
                                                                <div class="entry-bar-info entry-bar-info2">
                                    <div class="info-item meta">
                                                                                    <a class="meta-item j-heart" href="javascript:;" data-id="8568"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a>                                        <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a>                                                                            </div>
                                    <div class="info-item share">
                                                                                    <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="8568" data-qrcode="https://blog.ytso.com/tech/bigdata/8568.html">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报                                            </a>
                                                                                    <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item douban" data-share="douban" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-douban"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item linkedin" data-share="linkedin" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-linkedin"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item facebook" data-share="facebook" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-facebook"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item twitter" data-share="twitter" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-twitter"></use></svg></i>                                            </a>
                                                                            </div>
                                    <div class="info-item act">
                                        <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                                            <div class="entry-page">
                    <div class="entry-page-prev j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif">
                <a href="https://blog.ytso.com/tech/bigdata/8567.html" title="Hadoop入门进阶课程1--Hadoop1.X伪分布式安装详解大数据" rel="prev">
                    <span>Hadoop入门进阶课程1--Hadoop1.X伪分布式安装详解大数据</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span>
                    <span class="pull-right">2021年7月18日 23:03</span>
                </div>
            </div>
                            <div class="entry-page-next j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://blog.ytso.com/zb_users/plugin/LazyLoad/usr/loading.gif">
                <a href="https://blog.ytso.com/tech/bigdata/8569.html" title="Hadoop入门进阶课程3--Hadoop2.X64位环境搭建详解大数据" rel="next">
                    <span>Hadoop入门进阶课程3--Hadoop2.X64位环境搭建详解大数据</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span>
                    <span class="pull-left">2021年7月18日 23:04</span>
                </div>
            </div>
            </div>
                                                                <div class="entry-related-posts">
                            <h3 class="entry-related-title">相关推荐</h3><ul class="entry-related cols-3 post-loop post-loop-list"><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9597.html" target="_blank" rel="bookmark">
        <span>HBase集群安装过程中的问题集锦详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9674.html" target="_blank" rel="bookmark">
        <span>mongodb存取图片文件功能详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/7733.html" target="_blank" rel="bookmark">
        <span>Hbase（二）hbase建表详解大数据</span>
    </a>
    <span class="date">2021年7月18日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9806.html" target="_blank" rel="bookmark">
        <span>hadoop join之map side join详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9051.html" target="_blank" rel="bookmark">
        <span>Spark Streaming的样本demo统计详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/8974.html" target="_blank" rel="bookmark">
        <span>利用redis实现分布式锁详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/8910.html" target="_blank" rel="bookmark">
        <span>Spark入门实战系列--5.Hive（下）--Hive实战详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9587.html" target="_blank" rel="bookmark">
        <span>zookeeper适用场景：zookeeper解决了哪些问题详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/9850.html" target="_blank" rel="bookmark">
        <span>预测算法之多元线性回归详解大数据</span>
    </a>
    <span class="date">2021年7月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/7672.html" target="_blank" rel="bookmark">
        <span>理解HDFS高可用性架构详解大数据</span>
    </a>
    <span class="date">2021年7月18日</span>
</li></ul>                        </div>
                    <error>
    <code>wp_die</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;h1&gt;Error establishing a Redis connection&lt;/h1&gt;
&lt;p&gt;To disable Redis, delete the &lt;code&gt;object-cache.php&lt;/code&gt; file in the &lt;code&gt;/wp-content/&lt;/code&gt; directory.&lt;/p&gt;
]]></message>
    <data>
        <status>500</status>
    </data>
</error>
<!--
Performance optimized by Redis Object Cache. Learn more: https://wprediscache.com

Retrieved 2239 objects (852 KB) from Redis using Predis (v2.4.0).
-->
