hadoop安装和维护05--配置yum源
来源:互联网 发布:淘宝直播秒杀是真的吗 编辑:程序博客网 时间:2024/05/21 07:54
To get started setting up your local repository, complete the following prerequisites:
- Select an existing server in, or accessible to the cluster, that runs a supported operating system.
- Enable network access from all hosts in your cluster to the mirror server.
- Ensure the mirror server has a package manager installed such as yum (RHEL / CentOS / Oracle Linux), zypper (SLES), or apt-get (Debian/Ubuntu).
- Optional: If your repository has temporary Internet access, and you are using RHEL/CentOS/Oracle Linux as your OS, install yum utilities:
yum install yum-utils createrepo
一. 安装httpd服务
1.1、安装httpd:
yum install httpd
1.2、Apache启动出现错误:
[root@ www.linuxidc.com bin]# service httpd restartAH00557: httpd: apr_sockaddr_info_get() failed for linux.64.114AH00558: httpd: Could not reliably determine the server's fully qualified domainname, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
1.3、解决:
修改ServerName
vi /etc/httpd/conf/httpd.conf#ServerName www.example.com:80#添加这行ServerName localhost:80"/etc/httpd/conf/httpd.conf" 1011L, 34444C written
1.4 、启动httpd
service httpd start 或/etc/initd/httpd start启动成功:[root@rhel1 yum.repos.d]# ps -ef | grep httpdroot 5936 1 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5939 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5940 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5941 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5942 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5943 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5944 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5945 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdapache 5946 5936 0 13:04 ? 00:00:00 /usr/sbin/httpdroot 5976 3487 0 13:09 pts/0 00:00:00 grep httpd
这时,直接在浏览器中输入服务器的IP地址,即可看到Apache2的默认页面。此时的Apache仅仅能提供HTTP服务,不能执行php、也不能连接MySQL数据库。
二、搭建yum源
2.1 Setting Up a Local Repository with No Internet Access
参考:
2.1.1、 下载需要的包:
2.1.2、 复制到你的httpd设置的web server 目录:
vi /etc/httpd/cong/httpd.conf:搜索web server 目录:/Document
2.1.3、解压你的tarball,
ambari , hdp的解压有区别:
2.1.4、Confirm you can browse to the newly created local repositories:
FQDN:(Fully Qualified Domain Name)完全合格域名/全称域名,是指主机名加上全路径,全路径中列出了序列中所有域成员。
import: 记录这些urls, 但你在安装Ambari和集群时需要。
2.1.5、Optional: If you have multiple repositories configured in your environment, deploy the following plug-in on all the nodes in your cluster.
Install the plug-in.
-yum install yum-plugin-priorities
编辑
/etc/yum/pluginconf.d/priorities.conf
, 添加下列属性:
[main]enabled=1gpgcheck=0
2.2 Setting Up a Local Repository with No Internet Access
2.2.1、获取Ambari和HDP的 repository configuration文件:
2.2.2、确保库的可用性
yum repolist
2.2.3、同步镜像服务器和本地库
浏览服务器目录:
cd /var/www/html
对Ambari ,创建目录, 同步库:
mkdir -p ambari/<OS>cd ambari/<OS>reposync -r Updates-Ambari-2.4.2.0
对HDP Stack Repositories, 创建目录, 同步库:
mkdir -p hdp/<OS>cd hdp/<OS>reposync -r HDP-<latest.version>reposync -r HDP-UTILS-<version>
Generate the repository metadata:
- For Ambari:
createrepo <web.server.directory>/ambari/<OS>/Updates-Ambari-2.4.2.0
- For HDP Stack Repositories:
createrepo <web.server.directory>/hdp/<OS>/HDP-<latest.version>createrepo <web.server.directory>/hdp/<OS>/HDP-UTILS-<version>
2.2.4、确保可以浏览创建的库:
2.3 配置本地DVD yum源(主要是解决linux系统包的依赖)
[root@logs01 ~]# mount -o loop /opt/software/RHEL_6.3\ x86_64.iso /mnt/[root@logs03 ~]# vim /etc/yum.repos.d/rhel-source.repo[rhel-source]name=Red Hat Enterprise Linux $releasever - $basearch - Sourcebaseurl=file:///mnt/Server #注意enabled=1 #注意gpgcheck=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release[rhel-source-beta]name=Red Hat Enterprise Linux $releasever Beta - $basearch - Sourcebaseurl=ftp://ftp.redhat.com/pub/redhat/linux/beta/$releasever/en/os/SRPMS/enabled=0gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta,file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
三、总结
安装HDP 需要配置四个yum源:
- 配置本地DVD yum源(主要是解决linux系统包的依赖)
- ambari源配置文件三个
- ambari
- HDP
- HDP-UTILS
注意:将四个YUM源配置文件都COPY到所有要安装HDP的节点上
yum源配置: http://blog.itpub.net/25313300/viewspace-708509
官网的安装教程,很详细。
- hadoop安装和维护05--配置yum源
- hadoop安装和维护06--配置yum源实战
- hadoop安装和维护03--配置ssh
- hadoop安装和维护04--NTP服务器,SELinux,防火墙配置
- anbari安装HDP配置本地hadoop yum源
- Hadoop安装与维护
- Hadoop 安装和配置
- hadoop配置和安装
- hadoop安装和配置
- hadoop安装和配置
- Hadoop 安装和配置
- hadoop 安装和配置
- RedHat安装yum+配置国内yum源
- hadoop安装和维护05--HDP相关软件下载安装rhel2
- hadoop安装和维护07--安装Ambari Server
- hadoop安装和维护07--安装Ambari Server(02)
- hadoop安装和维护02--创建用户和组
- Linux DNS 服务器安装、配置和维护
- yii2 phpexecl导入
- PHP的Yii框架中移除组件所绑定的行为的方法
- Github Page---- 搭建个人博客网站
- [*用Oracle来创建学生信息管理系统(续2)*]
- CVPR2016代码合集
- hadoop安装和维护05--配置yum源
- 169. Majority Element
- Newtonsoft.Json高级用法
- string中c_str()、data()、copy(p,n)函数的用法
- kafka 配置大全(中文,英文)
- echarts折线图不堆叠设置
- perl和python各自擅长什么领域?
- 获取HttpServletRequest头文件信息
- 常用 Git 命令清单(整理)