mv /usr/local/usr/local/jdk /usr/local/
## 查看丽水MYSQL(root/xxx2017_)版本信息(10.1.4.147)
mysql -v #shell环境查看
# 丽水mysql版本:mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper
mysql -h localhost -u root -p #登录
status #登录后查看
mysql Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using EditLine wrapper
Connection id: 2803
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.20 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 3 days 18 hours 3 min 5 sec
Threads: 29 Questions: 11280977 Slow queries: 0 Opens: 1146 Flush tables: 1 Open tables: 1094 Queries per second avg: 34.797
安装MYSQL5.7(cgwtest1.xxx.com)
wget https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
rpm -Uvh mysql80-community-release-el7-1.noarch.rpm
yum repolist all | grep mysql #查看可选安装版本
yum install -y yum-utils
yum-config-manager --disable mysql80-community #disable最新的8.0版本
yum-config-manager --enable mysql57-community #enable 5.7 与丽水一样
yum repolist all | grep mysql #再次确认接下来安装的版本
yum install -y mysql-community-server #开始安装
systemctl start mysqld.service #启动mysql
systemctl status mysqld.service #查看启动状态
# Redirecting to /bin/systemctl status mysqld.service
# ● mysqld.service - MySQL Server
# Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
# Active: active (running) since Sun 2018-09-16 11:29:47 CST; 2min 0s ago
# Docs: man:mysqld(8)
# http://dev.mysql.com/doc/refman/en/using-systemd.html
# Process: 22937 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
# Process: 22861 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
# Main PID: 22939 (mysqld)
# CGroup: /system.slice/mysqld.service
# └─22939 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
#
# Sep 16 11:29:34 cgwtest1.xxx.com systemd[1]: Starting MySQL Server...
# Sep 16 11:29:47 cgwtest1.xxx.com systemd[1]: Started MySQL Server.
grep 'temporary password' /var/log/mysqld.log #查看初始密码
# 2018-09-16T03:29:37.382134Z 1 [Note] A temporary password is generated for root@localhost: **z2cqJDr5N0&h**
mysql -uroot -p #登录 输入密码
alter user 'root'@'localhost' identified by 'xxx2017_'; #修改与丽水一样密码
status
# mysql Ver 14.14 Distrib 5.7.23, for Linux (x86_64) using EditLine wrapper
#
# Connection id: 5
# Current database:
# Current user: root@localhost
# SSL: Not in use
# Current pager: stdout
# Using outfile: ''
# Using delimiter: ;
# Server version: 5.7.23 MySQL Community Server (GPL)
# Protocol version: 10
# Connection: Localhost via UNIX socket
# Server characterset: latin1
# Db characterset: latin1
# Client characterset: utf8
# Conn. characterset: utf8
# UNIX socket: /var/lib/mysql/mysql.sock
# Uptime: 30 min 54 sec
#
# Threads: 1 Questions: 11 Slow queries: 0 Opens: 106 Flush tables: 1 Open tables: 99 Queries per second avg: 0.005
如果需要简单密码需要修改认证配置:
show variables like 'validate%';
set xxxx = xxxx
将字符集修改与丽水一样:
show variables like '%char%';
set character_set_database=utf8;
set character_set_server=utf8;
grant all privileges on *.* to 'root'@'%' identified by 'xxx2017_' with grant option;
FLUSH PRIVILEGES;
yum install -y mysql-connector-java #为之后ambari使用mysql安装JDBC
You must have an MySQL/Oracle/Postgres/MSSQL/SQL Anywhere Serverdatabase instance running to be used by Ranger.In Assign Masters step of this wizard, you will be prompted to specify which host for the Ranger Admin. On that host, you must have DB Client installed for Ranger to access to the database. (Note: This is applicable for only Ranger 0.4.0)Ensure that the access for the DB Admin user is enabled in DB server from any host.Execute the following command on the Ambari Server host. Replace database-type with mysql|oracle|postgres|mssql|sqlanywhere and /jdbc/driver/pathbased on the location of corresponding JDBC driver:ambari-server setup --jdbc-db={database-type} --jdbc-driver={/jdbc/driver/path}I have met all the requirements above.
分配Masters
分配Slaves and Clients
修改全部服务路径为data,已提前做好磁盘挂载
修改Misc的所有services accounts为hadoop
Configurations
Some service configurations are not configured properly. We recommend you review and change the highlighted configuration values. Are you sure you want to proceed without correcting configurations?
| Type | Service | Property | Value | Description |
| ------- | ------- | ---------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------ |
| Warning | Atlas | atlas.graph.storage.hostname | cgwtest4.xxx.com,cgwtest3.xxx.com,cgwtest5.xxx.com | Atlas is configured to use the HBase installed in this cluster. If you would like Atlas to use another HBase instance, please configure this property and HBASE_CONF_DIR variable in atlas-env appropriately. |
change hive.metastore.warehouse.dir from /data/apps/hive/warehouse to /apps/hive/warehouse
change fs.defaultFS from hdfs://cgwtest1.xxx.com:8020 to hdfs://cgwtest1.xxx.com:8082
前情提要(城管委)
机器申请7台,5台hadoop集群,2台应用
工具安装(可选)(所有主机):
磁盘挂载
发现所有机器vdb未被挂载,遂新增两个主分区分别vdb1 20G和vdb2 80G
离线安装HDP(避免网络波动),需提前下载安装包到服务器(cgwtest1.xxx.com)
开始部署
软件环境要求:
最大打开文件数设置(所有主机)
设置FQDN主机名,另如需更改组件默认路径需提前创建(所有主机)
hostname:
检查:hostname -f (要求FQDN)
修改hostname文件
刷新hostname
设置hosts文件(所有主机)
注意勿删:
SSH互信(所有主机)
测试免密登陆:ssh 节点
安装NTP同步时钟(所有主机)
设置网络配置(所有主机)
设置防火墙(所有主机)
关闭SELinux(所有主机)
关闭iptables(所有主机)
设置UMASK(所有主机)****
孝鹏脚本配置(官网手册没有)(所有主机)
java
安装MYSQL5.7(cgwtest1.xxx.com)
如果需要简单密码需要修改认证配置:
将字符集修改与丽水一样:
创建ambari、hive、oozie数据库备用
庭桂有道云MYSQL配置(cgwtest1.xxx.com)
离线安装HDP(cgwtest1.xxx.com)
安装httpd服务(cgwtest1.xxx.com)
解压提前下载的3个安装包(cgwtest1.xxx.com)
安装yum-plugin-priorities (所有机器)
下载ambari公共仓库并修改参数(baseurl gpgcheck)后拷贝至yum仓库地址(cgwtest1.xxx.com)
建立ambari-server(cgwtest1.xxx.com)
开启ambari-server(cgwtest1.xxx.com)
登录Apache Ambari(成都VPN)
http://cgwtest1.xxx.com:8080 (admin/admin)
redhat7
HDP-2.6
http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.1.0
修改为
http://cgwtest1.xxx.com/hdp/HDP/centos7/
HDP-UTILS-1.1.0.21
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7
修改为
http://cgwtest1.xxx.com/hdp/HDP-UTILS/
输入目标主机:
hostname:
从服务器SFTP下载私钥再上传ambari安装向导
Ranger Requirements
You must have an MySQL/Oracle/Postgres/MSSQL/SQL Anywhere Serverdatabase instance running to be used by Ranger.In Assign Masters step of this wizard, you will be prompted to specify which host for the Ranger Admin. On that host, you must have DB Client installed for Ranger to access to the database. (Note: This is applicable for only Ranger 0.4.0)Ensure that the access for the DB Admin user is enabled in DB server from any host.Execute the following command on the Ambari Server host. Replace
database-type
with mysql|oracle|postgres|mssql|sqlanywhere and/jdbc/driver/path
based on the location of corresponding JDBC driver:ambari-server setup --jdbc-db={database-type} --jdbc-driver={/jdbc/driver/path}
I have met all the requirements above.Configurations
预览Review
Total Hosts : 5 (5 new)
Repositories:
Services:
Summary
Here is the summary of the install process.
启动失败的服务手动启动
dfs.permissions.superusergroup=hdfs,hadoop
groupadd supergroup
usermod -a -G supergroup hadoop,hdfs
su - hdfs -s /bin/bash -c "hdfs dfsadmin -refreshUserToGroupsMappings"
hadoop用户取消密码登陆
完成