您的位置:首页 > 其它

文章标题

2016-04-27 17:52 393 查看
Redhat 7

master:9.30.228.170

slave:9.30.228.175

1.生成sshkey实现无密码登录

1、在master和slave都执行 ssh-keygen ,在/root/.ssh下生成 authorized_keys id_rsa id_rsa.pub 3个文件



2、使用命令,cat id_rsa.pub >> authorized_keys,将2台机器的id_rsa.pub都写入authorized_keys中,然后将authorized_keys复制到每个机器的/root/.ssh目录下

3、使用ssh 9.30.228.170 和ssh 9.30.228.175查看无密码登录是否设置成功.

2.搭建时间同步服务器

1、使用 yum -y install ntp 进行安装

2、修改ntp.conf配置文件

vi /etc/ntp.conf

①、第一种配置:允许任何IP的客户机都可以进行时间同步

将“restrict default nomodify notrap noquery”这行修改成:

restrict default nomodify notrap

配置文件示例:/etc/ntp.conf

②、第二种配置:只允许192.168.211.*网段的客户机进行时间同步

在restrict default nomodify notrap noquery(表示默认拒绝所有IP的时间同步)之后增加一行:

restrict 192.168.211.0 mask 255.255.255.0 nomodify notrap

3、启动ntp服务

service ntpd start

开机启动服务

chkconfig ntpd on

4、ntpd启动后,客户机要等几分钟再与其进行时间同步,否则会提示“no server suitable for synchronization found”错误。

3.编辑hosts文件

vi /etc/hosts


4.关闭防火墙

1、查看防火墙状态。

systemctl status firewalld]

2、临时关闭防火墙命令。重启电脑后,防火墙自动起来。

systemctl stop firewalld

3、永久关闭防火墙命令。重启后,防火墙不会自动启动。

systemctl disable firewalld

4、打开防火墙命令。

systemctl enable firewalld

5.关闭SELINUX

输入sestatus查看是否装了selinux,然后vi /etc/sysconfig/selinux 改变SELINUX=disabled

6.umask0022

7.在master机器上

1、wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.1.1/ambari.repo -O /etc/yum.repos.d/ambari.repo

2、Confirm that the repository is configured by checking the repo list.

yum repolist

3、Install the Ambari bits. This also installs the default PostgreSQL Ambari database.

yum install ambari-server

8.set up the ambari server









9.

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: