hadoop-hdp-ambari离线安装记录

一、系统准备

1. 创建user——ambari

2.关闭防火墙

redhat6:

chkconfig iptables off

/etc/init.d/iptables stop

redhat7:

systemctl disable firewalld

service firewalld stop

3.检查最大打开文件数,如果小于10000,需要修改

ulimit -Sn

ulimit -Hn

If the output is not greater than 10000, run the following command to set it to a suitable default:

ulimit -n 10000

4.关闭selinux

学习到一个重启后失效的关闭selinux命令,记录一下

setenforce 0

5.开启ntpd服务(确保集群内部时钟统一)

chkconfig --list ntpd

chkconfig ntpd on

6.关闭packagekit(作用:可以同时启多个yum)

vi /etc/yum/pluginconf.d/refresh-packagekit.conf

enabled=0

7.设置umask(设定用户所创建目录的初始权限)

Setting the umask for your current login session:

umask 0022

Checking your current umask:

umask 0022

Permanently changing the umask for all interactive users:

echo umask 0022 >> /etc/profile

8.安装jdk

9.安装openssl1.0.1

wget http://www.openssl.org/source/openssl-1.0.1t.tar.gz
tar xzvf openssl-1.0.1t.tar.gz
./config
make
make install
cd /usr/local/ssl/
./bin/openssl version -a

替换旧版openssl
mv /usr/bin/openssl /usr/bin/openssl.old
mv /usr/include/openssl /usr/include/openssl.old(没用到)
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl/ /usr/include/openssl(没用到)

配置库文件搜索路径
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig

10.配置ssh互信

 

二、离线安装

1.下载(分发)

ambari

http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari-2.2.2.0-centos6.tar.gz

hdp

http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.2.0/HDP-2.4.2.0-centos6-rpm.tar.gz

http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6/HDP-UTILS-1.1.0.20-centos6.tar.gz

2.repo修改(分发)

[root@hdp2 ~]# cat /etc/yum.repos.d/ambari.repo
#VERSION_NUMBER=2.2.2.0-460

[Updates-ambari-2.2.2.0]
name=ambari-2.2.2.0 - Updates
baseurl=file:///var/www/html/ambari-2.2.2.0/centos6/2.2.2.0-460
gpgcheck=1
gpgkey=file:///var/www/html/ambari-2.2.2.0/centos6/2.2.2.0-460/RPM-GPG-KEY/RPM-GPG-KEY-Jenkins
enabled=1
priority=1

3.安装

ambari server节点

yum install ambari-server

其他节点

yum install ambari-agent

 

4.初始设定
[root@hdp1 centos6]# 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):ambari
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: /opt/java/jdk1.8.0_92
Validating JDK on Ambari Server...done.
Completing setup...
Configuring database...
Enter advanced database configuration [y/n] (n)? Y
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 (1): 1
Database name (ambari):
Postgres schema (ambari):
Username (ambari): admin
Enter Database Password (bigdata):
Re-enter password:
Default properties detected. Using built-in database.
Configuring ambari database...
Checking PostgreSQL...
Running initdb: This may take upto a minute.
Initializing database: [  OK  ]

About to start PostgreSQL
Configuring local database...
Connecting to local database...done.
Configuring PostgreSQL...
Restarting PostgreSQL
Extracting system views...
.ambari-admin-2.2.2.0.460.jar
.....
Adjusting ambari-server permissions and ownership...
Ambari Server 'setup' completed successfully.
[root@hdp1 centos6]#

5.启动ambari-server(root同样可以启成功)

[root@hdp1 centos6]# su - ambari
[ambari@hdp1 ~]$ ambari-server start
Using python  /usr/bin/python
Starting ambari-server
Unable to check PostgreSQL server status when starting without root privileges.
Please do not forget to start PostgreSQL server.
Organizing resource files at /var/lib/ambari-server/resources...
Unable to check firewall status when starting without root privileges.
Please do not forget to disable or adjust firewall if needed
Server PID at: /var/run/ambari-server/ambari-server.pid
Server out at: /var/log/ambari-server/ambari-server.out
Server log at: /var/log/ambari-server/ambari-server.log
Waiting for server start....................
Ambari Server 'start' completed successfully.

6.检验:

后台进程检验

[ambari@hdp1 ~]$ ambari-server status
Using python  /usr/bin/python
Ambari-server status
Ambari Server running
Found Ambari Server PID: 4376 at: /var/run/ambari-server/ambari-server.pid
[ambari@hdp1 ~]$

 

web ui 检验

http://localhost:8080

 

成功!

 

posted on 2016-05-18 16:34  roger888  阅读(3020)  评论(0编辑  收藏  举报

导航