1. # hadoop
    2. 1. make config up
    3. 2. [hd01 root] hdfs namenode -format
    4. 3. [hd01 root] sbin/start-dfs.sh
    5. 4. [hd02 root] sbin/start-yarn.sh
    6. 5. [hd01 root] bin/mapred --daemon start historyserver
    7. # hive
    8. 10. [hd01 root] bin/schematool -initSchema -dbType mysql -verbose;
    9. (bin/schematool -dbType derby -initSchema)
    10. [------------
    11. 11. [hd01 root] bin/hive --service metastore;
    12. (nohup hive --service metastore >$HIVE_LOG_DIR/metastore.log 2>&1 &)
    13. 12. [hd01 root] bin/hive --service hiveserver2 (bin/hiveserver2)
    14. 13. [hd01 root] bin/hive
    15. -------------]
    16. 14. [hd01 root] sh /mysh/hiveservice.sh start
    17. 15. [hd01 root] bin/hive
    18. 16. [hd01 root] bin/beeline -u jdbc:hive2://hd01:10000 -n root