#!/bin/bash
echo "server服务器建立目录,加kafka-host按任意键继续"
read -n1
mkdir -p /opt/TSP
mkdir -p /opt/ccclubs/backups
mkdir -p /data/ccclubs/backups
mkdir -p /data/TSP/backups
mkdir -p /data/TSP/logs
mkdir -p /data/TSP_LOG/gclog
mkdir -p /data/logs
mkdir -p /data/TSP_LOG/file-tmp
cd /opt/TSP
wget http://down.yadeaiot.net:8000/serverfile/health_check.sh
cd /opt
mkdir -p /opt/settings
cd /opt/settings
wget http://down.yadeaiot.net:8000/serverfile/settings/tspServer.properties
cd /opt
wget http://down.yadeaiot.net:8000/serverfile/prometheus-jvm.tar.gz
wget http://down.yadeaiot.net:8000/serverfile/skywalking_agent.tar.gz
tar -zxvf prometheus-jvm.tar.gz
tar -zxvf skywalking_agent.tar.gz
rm -rf /opt/prometheus-jvm.tar.gz
rm -rf /opt/skywalking_agent.tar.gz
cd /data
wget http://down.yadeaiot.net:8000/serverfile/monitor.tar.gz
tar -zxvf monitor.tar.gz
cd /data/monitor
wget http://down.yadeaiot.net:8000/serverfile/arch_log.sh
wget http://down.yadeaiot.net:8000/serverfile/err_log.sh
wget http://down.yadeaiot.net:8000/serverfile/oss_log.sh
chmod +x *.sh
rm -rf /data/monitor.tar.gz
echo "设置生产kafka-host"
echo '
#kafka
10.20.50.7 kafka004 kafka004
10.20.20.179 kafka001 kafka001
10.20.20.180 kafka002 kafka002
10.20.50.247 kafka003 kafka003
10.20.50.7 kafka004 kafka004
10.20.50.8 kafka005 kafka005
10.20.50.9 kafka006 kafka006' >>/etc/hosts
echo '
#wuxi-bigdata
#221.178.185.16 wx5-g-bdhadoop02
#221.178.185.16 wx5-g-bdhadoop03
#221.178.185.16 wx5-g-bdhadoop04
#221.178.185.16 wx5-g-bdhadoop05
#221.178.185.16 wx5-g-bdhadoop06' >>/etc/hosts

#sls日志客户端
wget http://logtail-release-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/linux64/logtail.sh -O logtail.sh; chmod 755 logtail.sh
./logtail.sh install auto
