操做系統 CentOS7.5.1804linux
下載地址:http://mirrors.163.com/centos/7.5.1804/isos/x86_64/sql
安裝Ambari說明:https://hortonworks.com/downloads/#data-platform數據庫
版本和操做系統的對應關係:https://supportmatrix.hortonworks.com/centos
安裝操做系統:安裝操做系統 bash
配置網絡:/etc/sysconfig/network-scripts/ifcfg-ens33網絡
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=ens33 DEVICE=ens33 ONBOOT=yes IPADDR=192.168.126.101 GATEWAY=192.168.126.2 NETMASK=255.255.255.0G
GATEWAY 與 vmnet8 對應 ssh
配置DNS /etc/resolv.confpost
nameserver 8.8.8.8
關閉防火牆:spa
systemctl stop firewalld && systemctl disable firewalld /etc/selinux/config SELINUX=disabled
修改主機名:操作系統
vi /etc/hostname vi /etc/hosts
免密碼登陸
ssh-keygen -t rsa #生成密鑰文件 ssh-copy-id 主機名 #將生成的公鑰文件copy到指定主機
安裝NTP
yum install -y ntp systemctl enable ntpd
默認數據庫安裝須要執行以下sql命令:
echo "CREATE DATABASE hive;" | psql -U postgres
echo "CREATE USER hive WITH PASSWORD 'hive';" | psql -U postgres
echo "GRANT ALL PRIVILEGES ON DATABASE hive TO hive;" | psql -U postgres
echo "CREATE DATABASE oozie;" | psql -U postgres
echo "CREATE USER oozie WITH PASSWORD 'oozie';" | psql -U postgres
echo "GRANT ALL PRIVILEGES ON DATABASE oozie TO oozie;" | psql -U postgres
echo "CREATE DATABASE ranger;" | psql -U postgres echo "CREATE USER rangeradmin WITH PASSWORD 'admin';" | psql -U postgres echo "GRANT ALL PRIVILEGES ON DATABASE ranger TO rangeradmin;" | psql -U postgres