前言:
此时兄弟们对“centos73安装源”大体比较关心,我们都需要了解一些“centos73安装源”的相关内容。那么小编也在网络上搜集了一些关于“centos73安装源””的相关资讯,希望小伙伴们能喜欢,小伙伴们一起来了解一下吧!适合系统:RedHat 7 CentOS 7 Oracle Linux 7
Ambari 2.4.2.0
HDP-2.5.3.0
HDP-UTILS 1.1.0.21
Repo下载地址和base url
Ambari 2.4.2.0
Base url:
Repo:
HDP-2.5.3.0
Base url:
Repo:
HDP-UTILS 1.1.0.21
Base url:
环境准备
1、主机
192.168.1.2 AMBARI-001.hadoop
192.168.1.3 AMBARI-002.hadoop
192.168.1.4 AMBARI-003.hadoop
192.168.1.5 ambari-mysql
、安装基础环境 (在主机AMBARI-001.hadoop,AMBARI-002.hadoop,AMBARI-003.hadoop部署)
(1)安装基本完成
$ yum install openssh wget vim openssh-clients openssl gcc openssh-server mysql-connector-odbc -y
$ ambaristemctl enable sshd && ambaristemctl start sshd
(2)安装mysql jdbc 驱动
$ yum install mysql-connector-java -y
(3)安装JDK
版本要求:
Oracle JDK 1.8 64-bit (minimum JDK 1.8.0_77) (default)
Oracle JDK 1.7 64-bit (minimum JDK 1.7_67)
OpenJDK 8 64-bit (not supported on SLES)
OpenJDK 7 64-bit (not supported on SLES)
$ mkdir /usr/local/src/Ambari/
$wget
$ mkdir -p /opt/java/ && tar xf jdk-8u112-linux-x64.tar.gz -C /opt/java
$ vim /etc/profile
添加下面的内容:
export JAVA_HOME=/opt/java/jdk1.8.0_112
export CLASSPATH=.:JAVAHOME/lib/dt.jar:JAVAHOME/lib/dt.jar:JAVA_HOME/lib/tools.jar
PATH=PATH:PATH:HOME/bin:$JAVA_HOME/bin
$ source /etc/profile
(4)配置SSH免密码登录
主节点里root用户登录执行如下步骤
$ ssh-keygen
$ cd ~/.ssh/
$ cat id_rsa.pub >> authorized_keys
$ chmod 600 ~/.ssh/authorized_keys
把各个主机上公钥id_rsa.pub文件内容放到各个主机authorized_keys中
(5)开启NTP服务
$ yum -y install ntp
$ ambaristemctl is-enabled ntpd
$ ambaristemctl enable ntpd
$ ambaristemctl start ntpd
(6)检查DNS和NSCD
ambari在安装时需要配置全域名,所以需要检查DNS。为了减轻DNS的负担, 建议在节点里用 Name Service Caching Daemon (NSCD)
$ cat /etc/hosts
192.168.1.2 AMBARI-001.hadoop
192.168.1.3 AMBARI-002.hadoop
192.168.1.4 AMBARI-003.hadoop
192.168.1.5 ambari-mysql
(7)每台节点里配置FQDN,如下以主节点为例
$ cat /etc/ambarisconfig/network
NETWORKING=yes
HOSTNAME=AMBARI-001.hadoop
(8)关闭防火墙和SELinux
$ ambaristemctl disable firewalld
$ ambaristemctl stop firewalld
临时关闭,不用重启机器:
$ setenforce 0
修改配置文件让机器重启也能生效:
$ cat /etc/ambarisconfig/selinux
SELINUX=disabled
搭建数据库(在主机ambari-mysql上部署)
Ambari安装会将安装等信息写入数据库,建议使用自己安装的Mysql数据库,也可以不安装而使用默认数据库PostgreSQL
版本要求:
- PostgreSQL 8
- PostgreSQL 9.1.13+,9.3, 9.4***
- MariaDB 10*
- MySQL 5.6
- Oracle 11gr2
- Oracle 12c**
按你系统来选择源:
Here is your custom MariaDB YUM repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d/ (we suggest naming the file MariaDB.repo or something similar).
# MariaDB 10.1 CentOS repository list - created 2016-12-09 06:03 UTC
#
[mariadb]
name = MariaDB
baseurl =
gpgkey=
gpgcheck=1
After the file is in place, install MariaDB with:
$ sudo yum install MariaDB-server MariaDB-client
If you haven't already accepted the MariaDB GPG key, you will be prompted to do so. See "Installing MariaDB with yum" for detailed information.
安装完成后创建ambari数据库及用户,登录root用户执行下面语句:
create database ambari character set utf8 ;
CREATE USER 'ambari'@'%'IDENTIFIED BY 'Ambari-123';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'%';
FLUSH PRIVILEGES;
如果要安装Hive,再创建Hive数据库和用户 再执行下面的语句:
create database hive character set utf8 ;
CREATE USER 'hive'@'%'IDENTIFIED BY 'Hive-123';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'%';
FLUSH PRIVILEGES;
如果要安装Oozie,再创建Oozie数据库和用户 再执行下面的语句:
create database oozie character set utf8 ;
CREATE USER 'oozie'@'%'IDENTIFIED BY 'Oozie-123';
GRANT ALL PRIVILEGES ON *.* TO 'oozie'@'%';
FLUSH PRIVILEGES;
制作本地源 (在AMBARI-001.hadoop部署)
下载 Ambari HDP HDP-UTILS 源包(文件很大,需要很长下载时间,请耐心等待。。。)
cd /usr/local/src/Ambari/
wget
wget
wget
安装本地源制作相关工具
$ yum install yum-utils createrepo -y
安装httpd服务
$ yum install httpd -y
$ ambaristemctl enable httpd && ambaristemctl start httpd
$ cd /var/www/html/ && mkdir ambari
$ cd /usr/local/src/Ambari/
$ tar xf ambari-2.4.2.0-centos7.tar.gz -C /var/www/html/ambari/
$ tar xf HDP-2.5.3.0-centos7-rpm.tar.gz -C /var/www/html/ambari/
$ tar xf HDP-UTILS-1.1.0.21-centos7.tar.gz -C /var/www/html/ambari/
验证httd网站是否可用,可以使用links 命令或者浏览器直接访问下面的地址:
$ links
结果是看到刚才解压的目录
配置ambari、HDP、HDP-UTILS的本地源
首先下载上面资源列表中的相应repo文件,修改其中的URL为本地的地址,相关配置如下:
$ cd /etc/yum.repos.d/
$ cat ambari.repo
#VERSION_NUMBER=2.4.2.0-136
[Updates-ambari-2.4.2.0]
name=ambari-2.4.2.0 - Updates
baseurl=
gpgcheck=1
gpgkey=
enabled=1
priority=1
$ cat hdp.repo
#VERSION_NUMBER=2.5.3.0
[HDP-2.5.3.0]
name=HDP Version - HDP-2.5.3.0
baseurl=
gpgcheck=1
gpgkey=
enabled=1
priority=1
[HDP-UTILS-1.1.0.21]
name=HDP Utils Version - HDP-UTILS-1.1.0.21
baseurl=
gpgcheck=1
gpgkey=
enabled=1
priority=1
$ yum clean all
$ yum makecache
$ yum repolist
安装Ambari (在AMBARI-001.hadoop部署)
安装Ambari
$ yum install ambari-server -y
配置Ambari
$ ambari-server setup
下面是配置执行流程,按照提示操作
(1) 提示是否自定义设置。输入:y
Customize user account for ambari-server daemon [y/n] (n)? y
(2)ambari-server 账号。输入:ambari
Enter user account for ambari-server daemon (root):ambari
Adjusting ambari-server permissions and ownership...
(3)设置JDK。输入:3
Checking JDK...
Do you want to change Oracle JDK [y/n] (n)? y
[] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[] Custom JDK
==============================================================================
Enter choice (1): 3
(4)如果上面选择3自定义JDK,则需要设置JAVA_HOME。输入:/opt/java/jdk1.8.0_112
WARNING: JDK must be installed on all hosts and JAVA_HOME must be valid on all hosts.
WARNING: JCE Policy files are required for configuring Kerberos security. If you plan to use Kerberos,please make sure JCE Unlimited Strength Jurisdiction Policy Files are valid on all hosts.
Path to JAVA_HOME: /opt/java/jdk1.8.0_112
Validating JDK on Ambari Server...done.
Completing setup...
(5)数据库配置。选择:y
Configuring database...
Enter advanced database configuration [y/n] (n)? y
(6)选择数据库类型。输入:3
Configuring database...
==============================================================================
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
==============================================================================
Enter choice (3): 3
(7)设置数据库的具体配置信息,根据实际情况输入,如果和括号内相同,则可以直接回车。
Hostname (localhost):
Port ():
Database name (ambari):
Username (ambari):
Enter Database Password (Ambari-123):
(8)将Ambari数据库脚本导入到数据库
如果使用自己定义的数据库,必须在启动Ambari服务之前导入Ambari的sql脚本
用Ambari用户(上面设置的用户)登录mysql
mysql -u ambari -p
use ambari
source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
(9)启动Amabri
$ ambari-server start
(10)成功启动后在浏览器输入Ambari地址:
标签: #centos73安装源 #centos安装系统utc #centos21as下载地址 #centos67安装步骤