salt一键部署hive

来源:互联网 发布:mba智库网络不可用 编辑:程序博客网 时间:2024/05/21 14:05
 1、准备工作

2.salt关于hive的部署脚本,就是上面的init.sls中的文件内容

hive-file:  file.managed:   - source: salt://hive/hive-1.2.1-bin.tar.gz    - name: /opt/hive-1.2.1-bin.tar.gz    - user: root   - group: roothive-install:  cmd.run:   - name: 'cd /opt && tar -xf hive-1.2.1-bin.tar.gz && ln -s hive-1.2.1-bin hive && chown -R hadoop:hadoop /opt/hive*'   - unless: 'test -d /opt/hive-1.2.1-bin'   - require:     - file: hive-file hive-rmtgz:  file.absent:    - name: /opt/hive-1.2.1-bin.tar.gz- require:     - cmd: hive-install /etc/profile:  file.append:    - text:      - export HIVE_HOME=/opt/hive      - export PATH=$HIVE_HOME/bin:$PATH- require:      - file: hive-rmtgz  source-profile:   cmd.run:    - name: 'source /etc/profile'- require:      - file: /etc/profile

3.其余的操作步骤和之前jdk,python类似这里就不写啦。

原创粉丝点击