代码拉取完成,页面将自动刷新
同步操作将从 dromara/northstar 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
set -e
echo "准备环境依赖..."
yum install git wget python27 gcc gcc-c++ -y
mkdir -p ~/northstar-env ~/northstar-dist
if [[ $(which node >/dev/null && echo $?) != 0 ]];
then
echo "安装Node14"
cd ~/northstar-env && wget --no-check-certificate https://nodejs.org/download/release/v14.19.1/node-v14.19.1-linux-x64.tar.xz
tar -xvf node-v14.19.1-linux-x64.tar.xz
rm -f node-v14.19.1-linux-x64.tar.xz
ln -sf ~/northstar-env/node-v14.19.1-linux-x64/bin/* /usr/local/bin/
npm config set registry https://registry.npm.taobao.org
npm config set unsafe-perm=true
else
echo "Node14已安装"
node -v
fi
# 检查JDK环境
if [[ $(which java >/dev/null && echo $?) != 0 ]];
then
echo "安装JDK17"
cd ~/northstar-env && wget --no-check-certificate https://d6.injdk.cn/openjdk/openjdk/17/openjdk-17.0.1_linux-x64_bin.tar.gz
tar -xvf openjdk-17.0.1_linux-x64_bin.tar.gz
rm -f openjdk-17.0.1_linux-x64_bin.tar.gz
ln -sf ~/northstar-env/$(find jdk* -maxdepth 0 -type d)/bin/* /usr/local/bin/
else
echo "JDK17已安装"
java -version
fi
# 检查Maven环境
if [[ $(which mvn >/dev/null && echo $?) != 0 ]];
then
echo "安装Maven"
cd ~/northstar-env && wget --no-check-certificate https://mirrors.bfsu.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
tar -xvf apache-maven-3.6.3-bin.tar.gz
rm -f apache-maven-3.6.3-bin.tar.gz
ln -sf ~/northstar-env/apache-maven-3.6.3/bin/mvn /usr/local/bin/
curl https://gitee.com/dromara/northstar/raw/master/settings.xml >~/northstar-env/apache-maven-3.6.3/conf/settings.xml
else
echo "Maven已安装"
mvn -v
fi
# 安装Redis
if [[ $(which redis-server >/dev/null && echo $?) != 0 ]];
then
echo "安装Redis"
cd ~/northstar-env && wget --no-check-certificate http://download.redis.io/releases/redis-7.0.0.tar.gz
tar -xzf redis-7.0.0.tar.gz
rm -f ~/northstar-env/redis-7.0.0.tar.gz
cd redis-7.0.0
make
make install
redis-server --daemonize yes
else
echo "Redis已安装"
fi
echo "环境安装完成"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。