1.5.2、CDH 搭建Hadoop在安装之前(定制安装解决方案---使用内部包存储库)

本主题描述如何在Cloudera Manager部署中创建内部包存储库和直接主机以使用该存储库。您可以创建永久或临时存储库。

完成这些步骤后,您可以安装特定版本的Cloudera Manager或在未连接到Internet的主机上安装Cloudera Manager。

创建永久内部存储库

 
安装Web服务器
存储库通常使用网络内主机上的HTTP进行托管。如果组织中已有Web服务器,则可以移动存储库目录,该目录将包括RPM和repodata/子目录,由Web服务器托管的位置。要安装的简单Web服务器是Apache HTTPD。如果您能够使用现有的Web服务器,请记下该URL并跳至下载Tarball和发布存储库文件

安装Apache HTTP Server

您可能需要响应某些提示以确认您要完成安装。
OSCommand
RHEL compatible sudo yum install httpd
SLES sudo zypper install httpd
Ubuntu
sudo apt-get install httpd
启动Apache HTTPD
OSCommand
RHEL compatible sudo service httpd start
SLES sudo service apache2 start
Ubuntu sudo service apache2 start

下载Tarball和发布存储库文件

  1. 从中下载适用于您的操作系统分发的tarball  repo-as-tarball 档案:
    • Cloudera经理5: https://archive.cloudera.com/cm5/repo-as-tarball/
    • CDH 5: https://archive.cloudera.com/cdh5/repo-as-tarball/
 
对于Cloudera Navigator数据加密组件,请转到每个组件的下载页面,选择您的操作系统版本,然后单击下载
2.解压缩tarball,将文件移动到Web服务器目录,然后修改文件权限。例如,您可以使用以下命令:
tar xvfz cm5.14.0-centos7.tar.gz
sudo mv cm / var / www / html
sudo chmod -R ugo + rX / var / www / html / cm
移动文件和更改权限后,请访问 http:// <web_server> / cm验证您是否看到了文件索引。如果您没有看到任何内容,则您的Web服务器可能已配置为不显示索引。

创建临时内部存储库

您可以快速创建临时远程存储库以部署包一次。在运行Cloudera Manager的同一主机或网关角色上执行此操作非常方便。在此示例中,将从您选择的目录中使用Python SimpleHTTPServer

  1. 从中下载适用于您的操作系统分发的tarball 回购作为-tar包 档案:
    • Cloudera经理5: https://archive.cloudera.com/cm5/repo-as-tarball/
    • CDH 5: https://archive.cloudera.com/cdh5/repo-as-tarball/
  2. 对于Cloudera Navigator数据加密组件,请转到每个组件的下载页面,选择您的操作系统版本,然后单击下载
  3. 解压缩tarball并修改文件权限。例如:
    cd / tmp tar xvfz cm5.14.0-centos7.tar.gz sudo chmod -R ugo + rX / tmp / cm
  4. 确定系统未侦听的端口(例如,端口8900)。
  5. 在当前目录中启动Python SimpleHTTPServer:
    python -m SimpleHTTPServer 8900
    在0.0.0.0端口8900上提供HTTP服务...
  6. 确认您可以转到此托管软件包存储库 HTTP://<web_server>:8900/在您的浏览器中。您应该看到托管文件的链接。

修改客户端以使用内部存储库

建立存储库后,修改客户端配置以使用它:
OSProcedure
RHEL compatible Create /etc/yum.repos.d/cloudera-repo.repo files on cluster hosts with the following content, where <web_server> is the hostname of the web server:
[cloudera-repo]name=cloudera-repobaseurl=http://<web_server>/cm/5enabled=1gpgcheck=0
SLES Use the zypper utility to update client system repo information by issuing the following command:
zypper addrepo http://<web_server>/cm <alias>
Ubuntu Create /etc/apt/sources.list.d/cloudera-repo.list files on all cluster hosts with the following content, where <web_server> is the hostname of the web server:
deb http://<web_server>/cm <codename> <components>
You can find the <codename> and <components> variables in the ./conf/distributions file in the repository.
After creating the .list file, run the following command:
sudo apt-get update
原文地址:https://www.cnblogs.com/xiqing/p/9645658.html