博客园 首页 私信博主 显示目录 隐藏目录 管理 动画

随笔分类 -  Shells

自动脚本
摘要:1 #!/bin/sh 2 case $1 in 3 "start"){ 4 echo " 启动zookeeper " 5 /opt/module/zookeeper/bin/zkServer.sh $1 6 ssh hadoop107 "/opt/module/zookeeper/bin/zkSe 阅读全文
posted @ 2022-04-13 10:01 CHANG_09 阅读(25) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 #1. 判断参数个数 3 if [ $# -lt 1 ] 4 then 5 echo Not Enough Arguement! 6 exit; 7 fi 8 #2. 遍历集群所有机器 这里注意是你自己的主机名 9 for host in hadoop106 hado 阅读全文
posted @ 2022-04-13 10:00 CHANG_09 阅读(39) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env bash 2 3 # 4 # 使用说明 5 # 这是一个等待的计时器,用来进行友好的等待 单位秒,最大支持10分钟 6 # 用法 wait-timer 10 7 # 用法 wait-timer 40 5 8 # 9 10 # 等待的时间 11 TIME=$1 12 阅读全文
posted @ 2022-04-13 09:58 CHANG_09 阅读(29) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 echo "_______关闭 集群 6-8 防火墙_________" 3 ssh hadoop106 "systemctl stop firewalld" 4 ssh hadoop107 "systemctl stop firewalld" 5 ssh hadoo 阅读全文
posted @ 2022-04-13 09:57 CHANG_09 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 function hiveserver2_stop(){ 3 pid=$(ps ax | grep "hiveserver2") 4 kill $pid || echo "hiveserver2服务已关闭" 5 } 6 case $1 in 7 "start"){ 8 阅读全文
posted @ 2022-04-13 09:56 CHANG_09 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 function hiveserver2_stop(){ 3 pid=$(ps ax | grep "hiveserver2") 4 kill $pid || echo "hiveserver2服务已关闭" 5 } 6 case $1 in 7 "start"){ 8 阅读全文
posted @ 2022-04-13 09:55 CHANG_09 阅读(16) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 "start"){ 4 /opt/module/maxwell/bin/maxwell --config /opt/module/maxwell/config.properties 5 };; 6 esac 阅读全文
posted @ 2022-04-13 09:54 CHANG_09 阅读(24) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/sh 2 comm=/opt/module/kafka/bin/kafka-server-start.sh 3 commd=/opt/module/kafka/bin/kafka-server-stop.sh 4 topic=/opt/module/kafka/bin/kafka- 阅读全文
posted @ 2022-04-13 09:53 CHANG_09 阅读(18) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 function hive_stop(){ 3 pid=$(ps ax | grep "hive") 4 kill $pid || echo "hive服务关闭" 5 } 6 case $1 in 7 "start"){ 8 echo "__________启动hiv 阅读全文
posted @ 2022-04-13 09:51 CHANG_09 阅读(19) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 "start") 4 /opt/module/hbase/bin/start-hbase.sh 5 ;; 6 "stop") 7 /opt/module/hbase/bin/stop-hbase.sh 8 ;; 9 "shell") 10 / 阅读全文
posted @ 2022-04-13 09:50 CHANG_09 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 ""){ 4 /root/shells/stopfirewalld.sh 5 /root/shells/wait-time.sh 3 6 /root/shells/hadoop.sh start 7 /root/shells/wait-tim 阅读全文
posted @ 2022-04-13 09:47 CHANG_09 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 "port"){ 4 /opt/module/flume/bin/flume-ng agent --conf /opt/module/flume/conf/ --name a1 --conf-file /opt/module/flume/jo 阅读全文
posted @ 2022-04-13 09:46 CHANG_09 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 function hiveserver2_stop(){ 3 pid=$(ps ax | grep "flink") 4 kill $pid || echo "flink服务已关闭" 5 } 6 case $1 in 7 "start"){ 8 echo "_____ 阅读全文
posted @ 2022-04-13 09:45 CHANG_09 阅读(24) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 /opt/module/hive/bin/hive -e " 3 with 4 a as ( 5 select 6 user_id, 7 count(0) order_count, 8 sum(final_total_amount) order_amount 9 fr 阅读全文
posted @ 2022-04-13 09:44 CHANG_09 阅读(20) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 "start"){ 4 echo "__________启动 hadoop 集群____________" 5 ssh hadoop106 "/opt/module/hadoop/sbin/start-dfs.sh" 6 ssh hadoop 阅读全文
posted @ 2022-04-13 09:43 CHANG_09 阅读(22) 评论(0) 推荐(0) 编辑
摘要:1 #!/bin/bash 2 case $1 in 3 "start"){ 4 clickhouse-client -m --port=9000 -u default --password root 5 };; 6 "server-start"){ 7 #.启动服务 8 service click 阅读全文
posted @ 2022-04-13 09:41 CHANG_09 阅读(101) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示