zoukankan      html  css  js  c++  java
  • 使用service管理hdfs,yarn

    将hdfs设置为服务项
    vim /etc/rc.d/init.d/hdfs #!/bin/bash #chkconfig: 345 99 99 #description:hdfs server #processname:hdfs case $1 in start) /usr/apps/hadoop/hadoop-2.6.4/sbin/./start-dfs.sh;; # 开启hdfs的命令 stop) /usr/apps/hadoop/hadoop-2.6.4/sbin/stop-dfs.sh start;; # 关闭hdfs进程的脚本 *) echo "require start|stop" ;; esac chmod 777 /etc/rc.d/init.d/hdfs 增加到chkconfig中进行管理 chkconfig --add hdfs chkconfig --list hdfs service hdfs start service hsfs stop



    将yarn设置为服务项

    
    

    vim /etc/rc.d/init.d/yarn

    
    


    #!/bin/bash
    #chkconfig: 345 99 99
    #description:yarn server
    #processname:yarn
    case $1 in
    start) /usr/apps/hadoop/hadoop-2.6.4/sbin/./start-yarn.sh;; # 开启hdfs的命令
    stop) /usr/apps/hadoop/hadoop-2.6.4/sbin/stop-yarn.sh start;; # 关闭hdfs进程的脚本
    *) echo "require start|stop" ;;
    esac

    
    
    
    
    

    chmod 777 /etc/rc.d/init.d/yarn

    
    

    增加到chkconfig中进行管理
    chkconfig --add yarn
    chkconfig --list yarn

    
    

    使用service管理
    service yarn start
    service yarn stop



    备注

    #!/bin/bash
    #chkconfig: 345 99 99

      第二行的参数 345 是指在系统启动等级为 3 4 5 的时候 自动启动。99 是启动优先级。99是关闭优先级




  • 相关阅读:
    Mysql 知识点
    vscode debug No module named flask
    c# 多线程概览
    c# 遍历属性
    排序算法
    sqlserver 评估过期
    HttpHandler和ashx使用Session 出现未初始化异常
    with(window) onload=onresize=function(){} 写法
    mAP(mean Average Precision)应用(转)
    int和double究竟占多少个字节?c++等
  • 原文地址:https://www.cnblogs.com/anbylau2130/p/13617632.html
Copyright © 2011-2022 走看看