#!/bin/bash
# 设置时区  
timedatectl set-timezone Asia/Shanghai
# 关闭防火墙
systemctl disable iptables --now && systemctl disable firewalld --now
# 初始化目录
echo '初始化目录'
sudo mkdir -p /data
# 安装常用工具  
sudo yum install -y wget vim install lrzsz

#安装git
sudo yum install -y git
#安装nginx
sudo yum install -y nginx
#安装maven
sudo yum install -y maven

#安装依赖
#sudo yum install -y yum-utils device-mapper-persistent-data lvm2
#设置源
#sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
#sudo yum makecache fast
#安装docker
#sudo yum install -y docker-ce
curl -sSL https://get.daocloud.io/docker | sh
#启动服务
sudo systemctl start docker
#安装docker-compose
curl -L https://get.daocloud.io/docker/compose/releases/download/v2.6.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
#授权
sudo chmod +x /usr/local/bin/docker-compose
#检测版本号
docker-compose -v


#安装node yarn
sudo yum update
sudo yum install -y nodejs
sudo yum install -y npm
sudo npm install -g yarn
#设置镜像
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass --global
# 升级node
npm install -g n
n install v14.16.0