安装时间同步服务
1 | # 首先安装阿里云 yum 源 |
关闭 THP
1 | # 关闭 selinux |
克隆机器
1 | # 克隆前删一个文件 |
在 00 上安装 mysql
1 | [root@nd-00 ~]# yum list mysql-server ## 如果有一项 |
配置免密登录
1 | # 所有机器都安装一个openssh 工具 |
在 yum.hdp 上安装 yum 相关工具
1 | yum install yum-utils -y |
2.5 安装 Apache httpd
1 | ### 1>安装 apache 的 httpd 服务 |
2.6 配置本地 Repo
1 | 1>. 配置 Ambari |
3. 安装 Ambari-Server
3.1. nd-00.hdp 节点安装
1 | $> yum install ambari-server |
[root@nd-00 yum.repos.d]# ambari-server setup
Using python /usr/bin/python
Setup ambari-server
Checking SELinux…
SELinux status is ‘disabled’
Customize user account for ambari-server daemon [y/n] (n)? y
Enter user account for ambari-server daemon (root):root
Adjusting ambari-server permissions and ownership…
Checking firewall status…
Checking JDK…
[1] Oracle JDK 1.8 + Java Cryptography Extension (JCE) Policy Files 8
[2] Oracle JDK 1.7 + Java Cryptography Extension (JCE) Policy Files 7
[3] Custom JDK
Enter choice (1): 3
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: /usr/java/jdk1.8.0_181/
Validating JDK on Ambari Server…done.
Completing setup…
Configuring database…
Enter advanced database configuration [y/n] (n)? YHyHHH^H
input not recognized, please try again:
Enter advanced database configuration [y/n] (n)? y
Configuring database…
Choose one of the following options:
[1] - PostgreSQL (Embedded)
[2] - Oracle
[3] - MySQL / MariaDB
[4] - PostgreSQL
[5] - Microsoft SQL Server (Tech Preview)
[6] - SQL Anywhere
[7] - BDB
Enter choice (1): 3
Hostname (localhost): nd-00
Port (3306):
Database name (ambari):
Username (ambari):
Enter Database Password (bigdata):
Re-enter password:
Configuring ambari database…
Copying JDBC drivers to server resources…
Configuring remote database connection properties…
WARNING: Before starting Ambari Server, you must run the following DDL against the database to create the schema: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
Proceed with configuring remote database connection properties [y/n] (y)? y
Extracting system views…
…..ambari-admin-2.4.1.0.22.jar
……
Adjusting ambari-server permissions and ownership…
Ambari Server ‘setup’ completed successfully.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 记得要执行这个脚本: /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
## 首先允许远程登录mysql
mysql> mysql -uroot -proot123
mysql> GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'localhost' IDENTIFIED BY 'Ambari123';
mysql> GRANT ALL PRIVILEGES ON ambari.* TO 'ambari'@'%' IDENTIFIED BY 'Ambari123';
mysql> FLUSH PRIVILEGES; #刷新权限
## 使用 ambari 用户登录 mysql
[root@nd-00 yum.repos.d]# mysql -u ambari -hnd-00 -pAmbari123
mysql> use ambari
mysql> source /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql
mysql> exit
## 重启 mysql
[root@nd-00 yum.repos.d]# service mysqld restart
启动ambari-server
$ ambari-server start1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#### 3.2 安装 Agent
**nd-00~04.hdp 所有节点安装 ambari-agent**
```bash
[all]# yum install -y ambari-agent #安装
[all]# service ambari-agent start #启动
# 安装后可以直接访问:
http://192.168.170.100:8080
username:admin
password:admin
# nd0-4 开启 ntpd 服务
service ntpd start
3.3 登录 ambari-server 之后的相关设置
3.5 超级大 bug: ssl 问题
1 | ('WARNING 2018-09-02 04:17:52,413 NetUtil.py:116 - Server at https://nd-00:8440 is not reachable, sleeping for 10 seconds... |
参考: https://my.oschina.net/haha256/blog/1836261 (感谢 浪费了一下午…..)
解决办法: 将服务器中, jdk 的安全机制改了
vim /usr/java/jdk1.8.0_171-amd64/jre/lib/security/java.security
去掉3DES_EDE_CBC。重启ambari。
其它要注意的:
- JAVA_HOME的 path 要写在最前面
- 所有 agent 开启 ntpd 服务
- 所有主机升级 ssl 为最新的: yum -y update openssl
- 貌似开启了server>
ambari-server start
, 就会自动开启各个节点的 agent
总结搜索问题的思路:
- 可以直接搜索报出来的错
- 搜索关键词, 比如本错搜索如下2个关键词, google 第一页就可以找到解决办法!!!!
amabri openssl
安装备注
1 | nd-00.hdp |
解决这些问题
1 | [root@nd-00 ~]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar |
Review
Admin Name : admin
Cluster Name : mycluster
Total Hosts : 5 (5 new)
Repositories:
- redhat6 (HDP-2.5):
http://yum/hdp/HDP/centos6/ - redhat6 (HDP-UTILS-1.1.0.21):
http://yum/hdp/HDP-UTILS-1.1.0.21/
Services:
- HDFS
- DataNode : 4 hosts
- NameNode : nd-00.hdp
- NFSGateway : 0 host
- SNameNode : nd-01.hdp
- YARN + MapReduce2
- App Timeline Server : nd-01.hdp
- NodeManager : 4 hosts
- ResourceManager : nd-01.hdp
- Tez
- Clients : 3 hosts
- Hive
- Metastore : nd-01.hdp
- HiveServer2 : nd-01.hdp
- WebHCat Server : nd-01.hdp
- Database : Existing MySQL / MariaDB Database
- HBase
- Master : nd-00.hdp
- RegionServer : 4 hosts
- Phoenix Query Server : 0 host
- Pig
- Clients : 3 hosts
- ZooKeeper
- Server : 3 hosts
- Flume
- Flume : 4 hosts
- Ambari Infra
- Infra Solr Instance : nd-00.hdp
- Ambari Metrics
- Metrics Collector : nd-02.hdp
- Grafana : nd-00.hdp
- Kafka
- Broker : nd-00.hdp
- SmartSense
- Activity Analyzer : nd-00.hdp
- Activity Explorer : nd-00.hdp
- HST Server : nd-00.hdp
- Spark
- Livy Server : 0 host
- History Server : nd-00.hdp
- Thrift Server : 0 host
- Slider
- Clients : 3 hosts